Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
rishilol authored Jul 1, 2023
1 parent 28fe77a commit 2fdd05d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions monday_code.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/AnalogReadSerial
*/

// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(115200);
}

// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.print(sensorValue);
delay(1); // delay in between reads for stability
}

0 comments on commit 2fdd05d

Please sign in to comment.