I've just bought an Arduino Uno Rev 3.
Today it went well with the basic blink and servo example. However, I try the H-bridge to control the 2 motor DC with external 3V pin and the 5V from the board (I'm sure that's everything was arranged correctly). At first it was great. Everything smooth. And then I try to writeAnalog to the digitalPin to control the DC motor speed( I don't know if this is right or wrong actually).
Then lately I tested again, I plug USB connect the Arduino Uno to my Computer (Mac OS). I tried to upload the old sketch, but it turned out to "programmer error". Ok, this is an old problem and I could search on the forum. However, when I unplugged everything from the board, and try to unplug the USA and plugged it again, everything was fine again. I run the sketch with H-bright and 2 DC motor, everything was good EXCEPT from that THE 13 pin LED on the board always on.
These are what I see:
- When upload code from the PC to Arduino, TX and TL led was on TOGETHER WITH 13pin of the board blinking. And after that it remained on( I meant it was bright all the time)
- I tried to upload code with "pinMode(13, OUTPUT); and digitalWrite(13,LOW);" => It was off
- I tried to upload code with "pinMode(13, OUTPUT); and digitalWrite(13,HIGH)'" => It was on
- I tried to upload code with "pinMode(13, OUTPUT); " WITHOUT THE LINE: "digitalWrite..) (the loop() had nothing) => It was off
- I tried to upload a code with only setup() and loop() with nothing in it( Just setup() and loop()) => It was ON (???)
- I tried to attach another LED on pin 13( of course with resister to ground), the 2 led always blinked the same, and it seemed that in this situation the two LEDs shared the same current therefore the onboard led was little bit dim.
So, where is the problem? I tried another pin testing my servo and everything was fine. But why the Led 13 always on even if there is nothing to do in the uploaded code? and why it blinked together with the TX and TL whenever do the upload task?
Please help me. I'm a beginner.