Arduino won't run skethc

Hi guys,

I have 3 Arduino’s: an Uno, a Mega 2560 and a Micro. I few days ago i tried to load the bootloader on some Atmega328 chips that i bought using the Arduino ISP sketch and the Mega 2560 as ISP programmer. I messed something up and it didn’t work. But that’s not the point of this topic! After my fail…i tried uploading some simple code…like blinking a LED or only sending some data from the Arduino to the computer via Serial and it won’t work in the Mega 2560 anymore:( The odd thing is that nor the Uno works anymore…and the computer won’t even see the Micro anymore as a COM connection:( I did the Loop-Back Test on both Uno and Mega…and everything was fine. If i write digitalWrite(LED,HIGH) in the int main() it even turns the LED on but if i try blinking it in the void loop or with a while(true) in the int main() it won’t work. I just can’t understand what happened. The Uno had nothing to do with my bootloader fail and it is brand new from Arduino!

Please help me! I was working on a project and now i can’t do nothing!

Thank you!

Let's deal with one Arduino at a time. When you have problems with three different Arduinos it gets very confusing which one you are talking about for any given symptom.

What error do you get when you try to upload the basic Blink sketch to the Arduino MEGA 2560?

Note: Your sketch should NOT contain a main() function. That function is in the Arduino library and there will be a compile error if you put one in your sketch.

So...when i upload my sketch to my arduino mega 2560 i get no error messages. It only says done uploading and i can also see tge RX TX LED's blinking while uploading but then...nothing happens. What do you mean i shouldn't have an int main() function? That's where i configure the PINS and begin the Serial comm.

Dude.I'm srry. I can't believe i made such a big confussion. It's like i was writing code for months and one day i woke up and used int main instead of void setup. Srry for the stupid topic

But...there's still a problem. My computer won't see the Micro even though I've been working with it for moths now...

You may have to re-install the bootloader on the Micro using an ISP device.

If you are going to be writing bootloaders more than a couple of times I recommend you order a USBasp from eBay (under $4 delivered!) It comes with a 10-pin CISP cable and the Arduino uses a 6-pin connector so you need to build a custom cable or buy a 10-pin to 6-pin adapter (typically another $4).