/* Header
Writing a code
*/
// Gobal Variables and Pin declaration
// Pins we are going to use?
// voltage reading variable
int VoltReading; // currently no value
// other option
// int VoltReading = 0;
// '=' --> assignment --> reads left to right
//Pins declaration
int LEDPin = 8;
void setup() {
// put your setup code here, to run once:
// need to endable our pin
// LED pin --> power out --> actuator -> digital
// Actuator --> output
pinMode (LEDPin, OUTPUT);
}
void loop(){
//how to view values --> debugging
//print values --> serial monitor and serial plotter
Serial.begin(9600); //starts serial monitoring
//always 9600 - baud rate
//turn LED on | digital pin | output
// digital | write
digitalWrite(LEDPin, HIGH);
//HIGH - 5v - 1
//LOW - 0v - 0
//measure voltages --> collecting values --> sensor
//sensor READ --> analog signal
VoltReading = analogRead(A0);
//10-bit --> 0 and 1023: 0 and 5V
Serial.print(VoltReading);
//Serial.print(" | ");
Serial.println(VoltReading);
delay(100);
}