3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Whenever I use arduino IDE this weird error message appears in the box.?



sketch_mar24a.cpp: In function 'void setup()':
sketch_mar24a:7: error: 'pinmode' was not declared in this scope
sketch_mar24a.cpp: In function 'void loop()':
sketch_mar24a:15: error: 'digitalwrite' was not declared in this scope

What does this mean and how do I fix it.

10 answers
sort by: active | newest | oldest
Mar 24, 2011. 3:13 PMsteveastrouk says:
You have a syntax error ! An extra character, a missing brace, whatever, but something just above it is screwed up, ever so slightly.

Steve
Dec 18, 2011. 10:32 AMcrzy engineer says:
hey transuranic, I'll answer your debug question by adding comments above
the ares that are missing a thing or two.


#define LED 13

void setup()
{

//on this tid-bit of code, the FUNCTION that allows us to say "pin X your an output!" requires that we capitalize the first letter of the compound word "pinMode", in this case the word is M in pinMode.

pinMode(LED, OUTPT);

}

void loop()
{

//same applies here transuranic, the FUNCTION digitalWrite, the command we give Arduino that turns an LED on or off, requires that we capitalize the second word of the compound word digitalWrite, W.

// oh, and also don't forget to slap in a semicolon at the end of every instruction
(line of code).

digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);


}


And that' it, this sketch should run in Arduino with no problems :)


Aug 18, 2011. 7:18 PMcoolfolder says:
debugging and adding my formatting to:

#define LED 13


void setup()
{
pinmode(LED, OUTPUT);




}

void loop()
{
digitalwrite(LED, HIGH)
delay(1000)
digitalwrite(LED, LOW)
delay(1000)

corrected:

int LED = 13;

void setup(){
pinmode(LED, OUTPUT);
}

void loop(){
digitalwrite(LED, HIGH);
delay(1000);
digitalwrite(LED, LOW);
delay(1000);
}
Mar 27, 2011. 7:50 AMit hertz says:
Thanx that what i was doing wrong so every second word should start with a capital letter pinMode been deleting curlys rewriting the hole script Thanx
Mar 25, 2011. 12:30 PMastroboy907 says:
yeah looks like it got answered but just as a hint most of the functions in arduino (and other code) the proper syntax is to have the second words first letter capitalized... :) GL!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!