expected initializer before string literal.?

Hello. I'm doing cording with arduino. Tomorrow I have to show my cording project to many, many people (elementary-middle-high school's students,). So I have to finish this project today. but .. I have a stuffy problem. And the error message is "expected initializer before string literal ". I tried to fix my cord many times, but I always have this message! I think it is out of my hand, so PLEASE help me.. How can I solve this problem? Here is the cord which I made.

define LED_PIN

define BUTTON_PIN

void setup() "" (pinMode(LED_PIN, OUTPUT); pinMode(BUTTON_PIN, INPUT); ) void loop() "" if(digitalRead(BUTTON_PIN) == HIGH)

digitalWrite(LED_PIN, HIGH); "" else digitalWrite(LED_PIN, LOW); ""

Please kindly check and show me the error part.

Have a good day and waiting for your answer soonest.

-BKite

"" is a string literal. so remove those or comment them out.

void setup()
{

etc

Please remember to use code tags when posting code.

#define LED_PIN     
#define BUTTON_PIN

Define them as what?

@OP

When the directives of Post#1, Post#2, and Post#3 are carried out on the codes (not cord) that you have posted, we come up with:

#define LED_PIN   13  
#define BUTTON_PIN  2

void setup()
//""
//(
{
   pinMode(LED_PIN, OUTPUT);
   pinMode(BUTTON_PIN, INPUT);
//)
}

void loop()
//""
{
   if(digitalRead(BUTTON_PIN) == HIGH)
   {
      digitalWrite(LED_PIN, HIGH);
       //""
   }
   else
   {
      digitalWrite(LED_PIN, LOW);
      //""
   }
}

BTW: Read Post#1 - Post#3 carefully with the codes of this post; try to understand the need for the changes done on your codes.

const byte BUTTON_PIN = 2;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(BUTTON_PIN, INPUT);
}
void loop() {
  digitalWrite(LED_BUILTIN, (digitalRead(BUTTON_PIN)) ? HIGH : LOW);
}
 digitalWrite(LED_BUILTIN, digitalRead(BUTTON_PIN) ? HIGH : LOW);

sp.digitalWrite(LED_BUILTIN, digitalRead(BUTTON_PIN));

AWOL: digitalWrite(LED_BUILTIN, digitalRead(BUTTON_PIN) ? HIGH : LOW);

sp.

 digitalWrite(LED_BUILTIN, digitalRead(BUTTON_PIN));

While it's shorter, I feel it obfuscates the code. Especially if there is need to invert the logic. Oops parenthesis

 digitalWrite(LED_BUILTIN, (digitalRead(BUTTON_PIN)) ? HIGH : LOW);

I have also corrected it in the other post.

While it's shorter, I feel it obfuscates the code.

digitalRead, according to the reference page, returns HIGH or LOW.

AWOL:
digitalRead, according to the reference page, returns HIGH or LOW.

I agree with you. What if you want to turn on the LED by taking the pin LOW, using a pull-up resistor to keep it HIGH in the not pressed state. Now, you can add !digitalRead(), but writing a ternary argument makes the intent very clear and ports to functions such as Serial.available(), which does not return HIGH or LOW.