Skip to content
Snippets Groups Projects
Commit 329570e0 authored by Mr. SQUID's avatar Mr. SQUID
Browse files

add Arduino code

parent e6158438
No related branches found
No related tags found
No related merge requests found
void setup() {
// initialize serial communication at 115200 or 9600 bits per second:
Serial.begin(9600);
}
void loop() {
if(Serial.available()>0){
char userinput = Serial.read();
if(userinput == 'g'){
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
delay(100); // delay in between reads for stability
}
}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment