Skip to main content
Improved formatting.
Source Link
sa_leinad
  • 3.2k
  • 2
  • 24
  • 53

I notice that your pinMode function calls are not quite correct:

pinMode(Sender = OUTPUT); // Setting pin two to output 
pinMode(Reader = INPUT); // Making pin 12 set to read switch data

Should be:

pinMode(Sender, OUTPUT); // Setting pin two to output 
pinMode(Reader, INPUT); // Making pin 12 set to read switch data

Refer to https://www.arduino.cc/en/Reference/PinMode for more information.

And the whole section where you configure your I/O should be wrapped inside the setup()setup() function.

//configuring I/O
void setup()
{
    pinMode(Sender, OUTPUT); // Setting pin two to output 
    pinMode(Reader, INPUT); // Making pin 12 set to read switch data
    digitalWrite(Sender, HIGH); //Making pin two hot
}

I notice that your pinMode function calls are not quite correct:

pinMode(Sender = OUTPUT); // Setting pin two to output 
pinMode(Reader = INPUT); // Making pin 12 set to read switch data

Should be:

pinMode(Sender, OUTPUT); // Setting pin two to output 
pinMode(Reader, INPUT); // Making pin 12 set to read switch data

Refer to https://www.arduino.cc/en/Reference/PinMode

And the whole section where you configure your I/O should be wrapped inside the setup() function.

//configuring I/O
void setup()
{
    pinMode(Sender, OUTPUT); // Setting pin two to output 
    pinMode(Reader, INPUT); // Making pin 12 set to read switch data
    digitalWrite(Sender, HIGH); //Making pin two hot
}

I notice that your pinMode function calls are not quite correct:

pinMode(Sender = OUTPUT); // Setting pin two to output 
pinMode(Reader = INPUT); // Making pin 12 set to read switch data

Should be:

pinMode(Sender, OUTPUT); // Setting pin two to output 
pinMode(Reader, INPUT); // Making pin 12 set to read switch data

Refer to https://www.arduino.cc/en/Reference/PinMode for more information.

And the whole section where you configure your I/O should be wrapped inside the setup() function.

//configuring I/O
void setup()
{
    pinMode(Sender, OUTPUT); // Setting pin two to output 
    pinMode(Reader, INPUT); // Making pin 12 set to read switch data
    digitalWrite(Sender, HIGH); //Making pin two hot
}
Source Link
sa_leinad
  • 3.2k
  • 2
  • 24
  • 53

I notice that your pinMode function calls are not quite correct:

pinMode(Sender = OUTPUT); // Setting pin two to output 
pinMode(Reader = INPUT); // Making pin 12 set to read switch data

Should be:

pinMode(Sender, OUTPUT); // Setting pin two to output 
pinMode(Reader, INPUT); // Making pin 12 set to read switch data

Refer to https://www.arduino.cc/en/Reference/PinMode

And the whole section where you configure your I/O should be wrapped inside the setup() function.

//configuring I/O
void setup()
{
    pinMode(Sender, OUTPUT); // Setting pin two to output 
    pinMode(Reader, INPUT); // Making pin 12 set to read switch data
    digitalWrite(Sender, HIGH); //Making pin two hot
}