programming problem

This my code:

Arduino: 1.6.7 (Windows 7), Board: “Arduino/Genuino Uno”

sketch_oct01a:1: error: found ‘:’ in nested-name-specifier, expected ‘::’

Objective : make a one way traffic light */


sketch_oct01a:1: error: ‘Objective’ does not name a type

Objective : make a one way traffic light */


C:\Users\Edu.Robot.Stem\Desktop\sketch_oct01a\sketch_oct01a.ino: In function ‘void setup()’:

sketch_oct01a:9: error: ‘green’ was not declared in this scope

pinMode(green, OUTPUT);


C:\Users\Edu.Robot.Stem\Desktop\sketch_oct01a\sketch_oct01a.ino: In function ‘void loop()’:

sketch_oct01a:23: error: ‘green’ was not declared in this scope

digitalWrite(green, HIGH);


exit status 1
found ‘:’ in nested-name-specifier, expected ‘::’

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.

Looks like you probably left some stuff at the top of your code that was supposed to be a comment. Since the code didn't get posted it's just a guess though.

It would help if you would post your entire sketch. Use the IDE autoformat function (CTRL-T on a PC), and use code tags which may look like </> on the toolbar.

Until you post your code, my answer is guesswork, but it appears that you left out /* at the beginning of the comment so the comment was taken as incorrect code.