Hello. Complete newbie here. Trying to test a photocell input. I used the built in digital read serial sketch and get this error when I try to upload. Is this an easy fix? Here is my sketch and thanks in advance.
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the Serial Monitor
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/DigitalReadSerial
*/
// digital pin 2 has a pushbutton attached to it. Give it a name:
int pushButton = 2;
int PNP = 10
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
// make the pushbutton's pin an input:
pinMode(PNP, INPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input pin:
int PNPState = digitalRead(PNP);
// print out the state of the button:
Serial.println("PNP State = " + (String) PNPState);
Serial.println( " " ) ;
delay(1); // delay in between reads for stability
}