703
edits
m (Created page with "thumb === Step 1: Read a sensor value or potentiometer value === run this to receive singles bytes of a sensor value. Receive ...") |
mNo edit summary |
||
Line 7: | Line 7: | ||
<source lang="c"> | <source lang="c"> | ||
int analogValue; | |||
void setup () { | void setup () { | ||
Serial.begin(9600); | Serial.begin(9600); | ||
} | } | ||
void loop () { | void loop () { | ||
analogValue = analogRead(A0); | analogValue = analogRead(A0)/4; | ||
Serial.write(analogValue); | Serial.write((char)analogValue); // char is a byte | ||
delay(100); | delay(100); | ||
} | } |
edits