Adding LEDs

This is my first time using the Arduino Uno. I have successfully connected the Arduino to my computer, and the "Blink" test is working.

I am attempting the simple project of Adding LEDs. Here is the error code:


Arduino: 1.6.12 (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 998 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: ser_open(): can't open device "\.\COM1": The system cannot find the file specified.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


I am new to this, so would appreciate any help! Thank you!

(deleted)

I have COM3 Arduino/Genuino Uno selected. Any other suggestions?

The error message says otherwise. It says you have COM1 selected.

I attached a screenshot; there is no COM 1 option.

(deleted)

I did that. Same. I refreshed the list in the WiFi 101 Module. COM3 is listed as the port, but when I test the connection, it says, "Programmer Not Responding".

My error code when I run the program no longer lists issues with COM1. Here is the most recent error code:


Arduino: 1.6.12 (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 998 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

(deleted)

I do. It is an Arduino Uno. I don't understand how the blink test could work, but this basic function of lighting up LEDs doesn't. What were you thinking?

speterson:
I do. It is an Arduino Uno. I don't understand how the blink test could work, but this basic function of lighting up LEDs doesn't. What were you thinking?

The errors you are seeing have nothing to do with the code. Your code is compiling fine. The issue is with the computer trying to talk to the Arduino to upload the code and it isn't finding the Arduino.

speterson:
I did that. Same. I refreshed the list in the WiFi 101 Module.

What was this about a 101?

The device manager says that it is recognizing the Arduino in the port. How do I fix this?

BTW - to answer your second question, I uploaded the screenshot.

I don't recognize this screen. What type of board is this for? The 101 and the UNO are completely different boards. The UNO doesn't have any wifi or any of that. Not sure? Upload a picture of the board you're compiling for.

https://drive.google.com/file/d/0B-qt9O_sfXBuNXhVS2NnbXF5SXc/view?usp=sharing

Thank you for looking at this!

That's an UNO. You're going to the wrong place to upload the code. I found where you got to that screen from the tools menu. Don't go there. That's for a completely different board. Look at the top of the window on the left hand side. The check-mark will verify (compile) your code and tell you if there are any errors or not. The button with the little arrow pointing right that is next to the check-mark button will upload the code. The only thing you need to do on the tools menu is set the board to UNO and the port to your UNO.

When I selected the check mark, I received the following:


Sketch uses 998 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

When I selected the right arrow, I received the following:


Arduino: 1.8.1 (Windows Store 1.8.1.0) (Windows 10), Board: "Arduino/Genuino Uno"

collect2.exe: error: ld returned 5 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


When I allowed verbose output, I received the following:


https://docs.google.com/document/d/1UGvXQNi2QnzvCc6-IkCJWUYgokte6pbD3cZfAcWULHc/edit?usp=sharing

Did you change the code between the time you used the check and the time you used the arrow? Because it compiled once and then failed to compile. Code can't do that if you didn't change it.

What you have on that share site shows a successful compile and upload. The code should be running on the board now.

Hi,
I agree with Delta_G, the screen shot tells you at the end all is well.
In verbose mode you get all the processing stages that the compiler does, not just errors, but everything it does, so a long screen like that does not mean it has failed to load.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :slight_smile:

The only thing that I changed was uninstalling Arduino IDE and then reinstalling, then uninstalling again and then downloading the Windows 10 Arduinio IDE app. There have not been any changes to the code. As requested, here is the code that I am using:

 */

// Pins
int greenLED = 5;
int yellowLED = 6;
int redLED = 7;

void setup() {
  // set to output to LED pins
  pinMode(greenLED, OUTPUT);
  pinMode(yellowLED, OUTPUT);
  pinMode(redLED, OUTPUT);
}

void loop() {
  // turn on all LEDs
  digitalWrite(greenLED, HIGH);
  digitalWrite(yellowLED, HIGH);
  digitalWrite(redLED, HIGH);

  // wait 1 second
  delay(1000);
  
  // turn off all LEDs
  digitalWrite(greenLED, LOW);
  digitalWrite(yellowLED, LOW);
  digitalWrite(redLED, LOW); 
  
  //wait 1 second
  delay(1000);
}

Thank you again!

Sure. So what's the issue now? According to your last screen dump you have had a successful compile and upload.