Pages: [1]   Go Down
Author Topic: Arduino Uno Upload Sketch Not Running?  (Read 1471 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,
I have searched but do not see an answer to my question. Forgive me if I missed the answer elsewhere as I am new here.

I pulled out my Arduino Uno that my wife got me for xmas LAST year to start working on a project. I installed the driver on my Win7 x64 system. I load the Arduino environment and load the basic/blink sketch. When I upload it to the board, I see the TX/RX lights blink a few times, then the board goes back to the single blinking yellow light and solid green light. It never appears to run my sketch. I have looked at the troubleshooting steps, and none of those steps seem to apply. I reviewed my firmware and is REV0001 which appears to be current. I also moved up the baud rate to 115200 and no change when uploading other than it goes faster smiley What am I missing?

I have the Arduino Uno R3 board purchased from Radio Shack last year. I am using a standard USB cable. I get no errors when uploading in the arduino environment. I even tried running it as administrator with no change. I pushed the reset button and immediately uploaded without any change in results. Please help!

Thanks,
Nick
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 209
Posts: 13015
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Post or attach the output from a verbose upload.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 631
Posts: 34491
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
. I load the Arduino environment and load the basic/blink sketch. When I upload it to the board, I see the TX/RX lights blink a few times, then the board goes back to the single blinking yellow light and solid green light.
That sounds like the basic blink sketch is running, what did you expect to see?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That sounds like the basic blink sketch is running, what did you expect to see?
aye
try changing the delays to, say, 100ms ON and 400ms OFF and see if the yellow blink changes speed/pitch :)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking about it last night and it dawned on me that I probably need to have an LED connected to one of the output pins.

After looking at the code and another search, I found this tutorial which confirms what I thought. I was expecting to see one of the onboard LED's light up. Had a DUH moment! Thanks for the suggestions!

http://www.arduino.cc/en/Tutorial/BlinkingLED

Thanks,
Nick
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking about it last night and it dawned on me that I probably need to have an LED connected to one of the output pins.

After looking at the code and another search, I found this tutorial which confirms what I thought. I was expecting to see one of the onboard LED's light up. Had a DUH moment! Thanks for the suggestions!

http://www.arduino.cc/en/Tutorial/BlinkingLED

Thanks,
Nick

I think you are confused. The standard Uno board has two board mounted LEDs. The red one is simply a power on led and tells you the arduino board is getting power either from the USB cable or from an external source of DC voltage via it's external power connector.

The yellow LED is operated by the pin 13 output pin and the example blink program will flash that led on and off at a one second rate. You are free to control the on-board yellow led with any sketch you write using the digitalWrite() command and specifying pin # 13. The board's bootloader program also manipulates the yellow led when it's activated by power-up or uploading a new sketch, but once you sketch is running the yellow led is under your control.

 Most important if you are going to wire LEDs to arduino output pins (even to pin 13) never do so without also wiring a series current limiting resistor with the led or you risk damage to the arduino output pin and the led. That picture showing a led being used without a resistor is from a very old early version of the arduino board and is no longer applicable to current boards, so do not do what that picture shows, ever!

Lefty
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"The standard Uno board has two board mounted LEDs."
There are 4 LEDs:
Power- turns on with board power
L - high when D13 is high as described by Lefty. Very often used for debug indication. Usually programmed to flash by the bootloader; sketch dependent after that.
Rx - controlled by USB/Serial chip (the little ATmega16U2) when USB serial transfer is underway - not under direct sketch control
Tx - controlled by USB/Serial chip (the little ATmega16U2) when USB serial transfer is underway - not under direct sketch control.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the comments. Lefty, Any recommendation on the size of the current limiting resistor to put in series with the LED?

I will make changes to the sketch tonight and see if it changes the speed of the blink of the on board LED.

I thought that was the LED that the sketch controlled, but after thinking about it, I realized that PIN13 is one of the digital output pins and it could possibly be controlling an external LED I didn't have in place. Glad to know I was right on both accounts. Also glad to know I need a limiting resistor as well. I was going to buy an LED today to test it and I would not have thought to pickup a small resistor as well.

My ultimate plan is to build a race timer for a Lego Mindstorm race we are going to be having in January. Any recommendations on a segment board that will easily integrate with the arduino's output? I have some basic knowledge of electronics from college 20 years ago when I was pursuing a EEE degree. I haven't used it much, so I have alot to relearn. Now I write C++/C# code for a living. So, once I learn a little more about the possibilities of this kewl toy, I hope to create some useful toys! smiley

Thanks again in advance,
Nick
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 631
Posts: 34491
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any recommendation on the size of the current limiting resistor to put in series with the LED?
If you don't know any better then put a 330R in line with the LED.

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My ultimate plan is to build a race timer for a Lego Mindstorm race we are going to be having in January. Any recommendations on a segment board that will easily integrate with the arduino's output? I have some basic knowledge of electronics from college 20 years ago when I was pursuing a EEE degree.

If you mean by 'segment board' some kind of alphanumeric display, there are literally a gazillion different options out there. A lot depends if the display needs to be remoted from the arduino board or shield mounted. For raw basic display purposes this is a popular style (the HD44780 driver chip is a popular standard) to use and there is an arduino software library support for this kind of raw display. This same display type can be shield mounted and there are even versions that can use serial or I2C communications to cut down on the number of I/O pins used by the 'raw display'.

http://www.ebay.com/itm/1pcs-16x2-1602-HD44780-Character-Display-Module-LCM-blue-blacklight-New-LCD-/110950891695?pt=LH_DefaultDomain_0&hash=item19d53040af

Lefty

 
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 544
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Or just a MAX7219 to control up to 8 seven segment, common cathode displays.
Anodes to all segments are in parallel, 8 unique cathodes turn on each digit as they get multiplexed.
$1.25 at taydaelectronics.
1" displays too,
http://www.taydaelectronics.com/led-displays/7-segment-1-digit.html

or many options for bigger ones, such as discrete LEDs wired in parallel for each segment like I did here

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you both for the feedback. I got home tonight and tried the different delays and what do you know, the speed of the on board LED changed! smiley

I looked at both segment LED's and decided on http://www.sainsmart.com/sainsmart-1602-lcd-keypad-shield-for-arduino-duemilanove-uno-mega2560-mega1280.html.

Now I'll just need to add on a sensor that will start my clock and do a little programming and I'll be set. Any suggestons on sensors for starting the race? IR, Laser? Something easy and cheap!

Thanks again,
Nick
Logged

Pages: [1]   Go Up
Jump to: