Created
May 20, 2009 15:18
-
-
Save yuiseki/114868 to your computer and use it in GitHub Desktop.
Arduinoをシリアルデバイスにする。Analog0に光センサーを接続
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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