Skip to content

Instantly share code, notes, and snippets.

@neosarchizo neosarchizo/ch9_2.ino Secret
Last active Nov 8, 2015

Embed
What would you like to do?
[아두이노, 상상을 현실로 만드는 프로젝트 입문편] 코드 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
You can’t perform that action at this time.