Help to fix this

please help me fix this.

void demoOne()

{digitalWrite(in1, LOW);for (delay(3000)
;digitalWrite(in2, HIGH);for (delay(3000)

/tmp/334589667/robot/robot.ino:24:43: error: expected '}' at end of input

exit status 1

Where is the end of the demoOne() function ?
What is always at the end of a function ?

@noahschu07gmailcom

TOPIC SPLIT.

Please READ THIS POST to help you get the best out of the forum.

Bob.

noahschu07gmailcom:
please help me fix this.

void demoOne()

{digitalWrite(in1, LOW);for (delay(3000)
;digitalWrite(in2, HIGH);for (delay(3000)

/tmp/334589667/robot/robot.ino:24:43: error: expected ‘}’ at end of input

exit status 1

. The IDE has many worked programming examples.

Work through them

Where did you learn coding? It's very unique.

Sorry guys, I did not know because I am new on Arduino and coding but can you tell me what to do about this.

noahschu07gmailcom:
Sorry guys, I did not know because I am new on Arduino and coding but can you tell me what to do about this.

Is that your entire code? If not, please post all of it using code tags.

Have you run through all the Arduino tutorials?

NO that is not all my code I got more that I got to put back up at the top to play a file which this code all starts with a light sensor. BUT can you tell what to put there, please?

noahschu07gmailcom:
BUT can you tell what to put there, please?

It's not really possible from that code to discern what you want to do, so it's difficult to fix unless you explain what it's supposed to do.

It looks a bit like you just want to have a pin low for a while then high for a while (ala the blink sketch?) in which case using the "for" is wrong. So losing them, and heeding the error message which says you're short a }, although you have one in the middle, perhaps you want this?

void demoOne()
{
  digitalWrite(in1, LOW);
  delay(3000);
  digitalWrite(in2, HIGH);
  delay(3000);
}

(But if the pin names are clues that they're inputs, are you sure you want to write to them?)

Here for reference is the relevant part of blink:

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
}

@OP
Post you're full code and give a description of your project.

georgeRyder:
(But if the pin names are clues that they're inputs, are you sure you want to write to them?)

Possibly a motor driver board with pins labled 'in1' etc.

noahschu07gmailcom:
please help me fix this.

void demoOne()
{digitalWrite(in1, LOW);for (delay(3000)
;digitalWrite(in2, HIGH);for (delay(3000)

/tmp/334589667/robot/robot.ino:24:43: error: expected '}' at end of input

exit status 1

You cannot write computer code by hitting the keyboard in frustration until the thing finally compiles. You cannot make a working program that actually does something useful (or at least does what you want) by posting code snippets that dont compile and getting the people on the boards here to fix them one-by-one.

Google "C++ tutorial". Do a C++ tutorial. Google "Arduino tutorial". Find out how to make light blink.

NO that is not all my code I got more that I got to put back up at the top to play a file which this code all starts with a light sensor. BUT can you tell what to put there, please?

At your current level of skill, you will not be able to code something that will play a file in response to input from a light sensor.

No-one here will tell you "what code to put there". You might as well ask us how to turn the wheel in your car to drive to the local shops, or what pieces you need to move to win at chess. Certainly if I had all the hardware you were using and a proper description of what you wanted that hardware to do then I could put together a sketch that would do it. But that's not a matter of "putting some code there".