Skip to content

Instantly share code, notes, and snippets.

@yuiseki
Created May 20, 2009 15:18
Show Gist options
  • Save yuiseki/114868 to your computer and use it in GitHub Desktop.
Save yuiseki/114868 to your computer and use it in GitHub Desktop.
Arduinoをシリアルデバイスにする。Analog0に光センサーを接続
int analogValue = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
analogValue = analogRead(0)/4;
Serial.println(analogValue, DEC);
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment