Let's Make Robots!

Arduino MEGA 2560 Not Connecting Through USB+ Getting extremely HOT!


Normally I work/play with microcontrollers from Microchip, but for my thesis I have to use Arduino, so we got ourselves an Arduino board MEGA 2560 in school.

Easy peasy I thought, download the software, plug the board in through a USB cable, the green light lits so I figure it's working. THEN after even less than a second, the chip gets EXTREMELY HOT! (Nothing is even plugged in yet, so no huge currents drawn)

EDIT: Interrupts (in C) ?


My question is if it is possible to estimate or calculate the time a µcontroller needs in order to execute a few commands. I'm trying to get exactly 1 second that a whole series of commands take, something like this (programmed in C):


//several commands..


Common Anode (seven segment) display problem


I am trying to figure out how 7led segment displays work, I got a few common cathodes and a few common anodes to test. Did the testing with the common cathodes, they seem to work properly. Now I wanted to try the common anodes, they worked, I changed something to my program and connection to make a dual display, and it doesn't seem to work anymore.

I checked my program hundreds of times, same for the connections, and I really can't figure out what's wrong.

The problem is that there are always 4 led's lit (d,e,f and g).

7 segment display problem


So I'm testing my PICkit2 with PIC16F690 to make a 7 segment display work, and it's doing what it should do.

Now I wanted to add a second display, and make the pic count from 0 to 59, and display it on the 2 displays.

PIC programming C language (using MPLAB IDE v8.88)


So I've made a topic in the MPLAB section, but no one seemed to answer, so I thought, maybe it belongs in here, since I'm pretty newb at the moment.


I bought a PCKit2 and looked at the 12 examples, they're pretty neat. But I would like to learn to program the PIC's in C-language.

I have found a guide on the MPLAB CD-ROM that came with this PICKit2, but it doesn't seem to work.

Then I've tried a tutorial on the internet, and here's what that gave me:

I've just made a source file with just a small main like this (using a PIC16F690):



So I've got myself this PICKit2 and looked at the 12 examples in the guide, but I'm wondering how to program in C instead of assembler language, because of having more experience with C-like language than with assembler language.

I've found a tutorial on the internet, but it's from an older version of MPLAB, so I can't follow too much with the settings being different.


I've just made a source file with just a small main like this (using a PIC16F690):

#include <p16F690.h>

void main()


Alarm clock robot!


So I've tried making an alarm clock robot from the LMR First Robot, and it works kind off, so I'll try to make it look more sophisticated. Now it just looks like a speaker and batteries on a plate with some wires, here's what I'm thinking of doing with it (don't think thats proper english, hmm):


So it'll have 2 wheels+electromotor, 1 on each side, a 7-LED Display, 4 buttons to adjust the timer, and 1 to shut off the alarm. The frame should be transparent, so I can put some blue LED's in it.

First Robot: Sound + Servo!?


So I'm trying to adapt my robot to make a wake up robot, that makes an alarm, and as soon as the alarm starts, he starts driving so u have to get up to shut him off.