Created
June 7, 2016 05:42
-
-
Save monpetit/3d7f4d02535b1d9d87dfb4bb484f6b84 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const int measurePin = A0; | |
| const int ledPower = 3; | |
| const int samplingTime = 280; | |
| const int deltaTime = 40; | |
| const int sleepTime = 9680; | |
| float voMeasured = 0; | |
| void adc10_measure_dust_density(void) | |
| { | |
| digitalWrite(ledPower, LOW); // LED 켜기 | |
| delayMicroseconds(samplingTime); // 0.28 밀리초 대기 | |
| voMeasured = analogRead(measurePin); // 센서값 측정 | |
| delayMicroseconds(deltaTime); // 0.04 밀리초 대기 | |
| digitalWrite(ledPower, HIGH); // LED 끄기 | |
| delayMicroseconds(sleepTime); // 9.68 밀리초 대기 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment