103Views12Replies

Author Options:

Arduino Answered

I am new in the programming stuff and i have, un familiar error problem.
I hope you guys cold help me.
thank for all the answers!!

12 Replies

user
steveastrouk (author)2016-12-15

Can you compile and download "blinky" to your Arduino ? Your message looks like a programming the arduino problem, not a code problem. Try it with known good code.

Select as Best AnswerUndo Best Answer

user
Downunder35m (author)2016-10-19

Details, details, details - most of us won't stress their crystal balls so you have to provide the details we need.

Select as Best AnswerUndo Best Answer

user
ברקו (author)Downunder35m2016-10-19

for exampel:

this is the code:
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

and this is the message that i get:
Sketch uses 928 bytes (2%) 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: verification error, first mismatch at byte 0x0002
0x5d != 0x5c
avrdude: verification error; content mismatch
avrdude: verification error; content mismatch

Select as Best AnswerUndo Best Answer

user
Downunder35m (author)ברקו2016-10-19

I strongly suggest to use Arduino IDE first to compile the sketch - this way you see proper error messages that might make more sense to you.
Once it compiles with no errors you can upload the sketch or if you need to use the programmer flash the corresponding Hex file.
As Caitlinsdad pointed out you need to assign pin numbers for input and output.
The sketch you used is generic for every board out there and needs to be modified to match your actual hardware.

Select as Best AnswerUndo Best Answer

user
ברקו (author)Downunder35m2016-10-20

i use the earliest Arduino IDE and that message appear every time i try to compail.

Select as Best AnswerUndo Best Answer

user
Downunder35m (author)ברקו2016-10-20

And here might be another problem, assuming your code is correct now and you fixed the pin assignment it is time to try a different version of the IDE.
I have 5 or six versions working, including the oldest and depending on what I compile I need to use a different IDE.
Comes down to the code and libraries used....

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)ברקו2016-10-19

You are missing defining the variable used for the led pin number before the void setup() line

const int LED_BUILTIN = 13; // the number of the LED pin

or replace "LED_BUILTIN" everywhere with the pin number.

You need to find out what digital pin number is used for the onboard LED for your model of arduino, it might be 13 or something else.

Select as Best AnswerUndo Best Answer

user
ברקו (author)caitlinsdad2016-10-20

i geve an exampel, it heppend evry time i try to compail(in eny code).

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)2016-10-19

Can you post a screenshot of the error or describe what the problem is? When do you get the error - when you hit compile, uploading, or running the program and it is not doing what you expect it to do? The mindreaders will be here shortly.

Select as Best AnswerUndo Best Answer

user
ברקו (author)caitlinsdad2016-10-19

I am new in the programming stuff and i have, un familiar error problem.
I hope you guys cold help me.
thank for all the answers!! :smiley-confuse:
and it show of when i hit the compile.

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)ברקו2016-10-19

When the IDE loads up ready for you to code something, the setup and loop syntax is there for you to expand on. If you are copying a complete sketch from somewhere else, you can clear that out and paste it in. What is there does nothing but should compile/verify if you have the correct settings/port for the arduino that is connected on USB.

Select as Best AnswerUndo Best Answer

user
ברקו (author)caitlinsdad2016-10-19

i show u an exsampel, the error is show also when i put code in the dicoder.

Select as Best AnswerUndo Best Answer