For some reason I can't wrap my head around the examples given....
Reads the value from a specified digital pin, either
HIGH or LOW.
pin:- the number of the digital pin you want to read (int)
HIGH or LOW
Sets pin 13 to the same value as pin 7, declared as an input.
int ledPin = 13; //LED connected to digital pin 13
int inPin = 7; //push button connected to digital pin 7
int val = 0; //variable to store the read value
Could someone give me a bit of assistance.....not with the way DigitalWrite works....but withthe examples given...... or maybe it goes hand in hand?