Skip to content

Instantly share code, notes, and snippets.

@neosarchizo
Last active November 8, 2015 13:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save neosarchizo/ed336c68874af2f7baaf to your computer and use it in GitHub Desktop.
[아두이노, 상상을 현실로 만드는 프로젝트 입문편] 코드 9 - 2
void setup() {
}
void loop() {
int light = analogRead(A0);
int hertz = map(light, 0, 1023, 31, 4978);
tone(8, hertz, 100);
delay(100);
noTone(8);
delay(200);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment