Skip to content

Instantly share code, notes, and snippets.

@neosarchizo
Last active December 29, 2020 05:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neosarchizo/e23906b75fee6ee67c92 to your computer and use it in GitHub Desktop.
Save neosarchizo/e23906b75fee6ee67c92 to your computer and use it in GitHub Desktop.
[아두이노, 상상을 현실로 만드는 프로젝트 입문편] 코드 9 - 1
void setup() {
}
void loop() {
int light = analogRead(A0);
int ledLight = map(light, 0, 1023, 255, 0);
analogWrite(9, ledLight);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment