projets:fuz:webduino
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
projets:fuz:webduino [2019-12-03 21:28] – [Components] document RGB LED Lomanic | projets:fuz:webduino [2019-12-03 21:40] – [Photocell] Lomanic | ||
---|---|---|---|
Line 125: | Line 125: | ||
showColor(color); | showColor(color); | ||
delay(200); | delay(200); | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Photocell ==== | ||
+ | <code c++> | ||
+ | |||
+ | /*** | ||
+ | | ||
+ | | ||
+ | |||
+ | */ | ||
+ | |||
+ | #include < | ||
+ | |||
+ | // according to https:// | ||
+ | #define GPIO_PHOTOCELL A0 | ||
+ | #define GPIO_MICRO_SWITCH_BUTTON 4 | ||
+ | |||
+ | void setup() { | ||
+ | Serial.begin(115200); | ||
+ | delay(10); | ||
+ | Serial.println(); | ||
+ | Serial.println(F(" | ||
+ | } | ||
+ | |||
+ | |||
+ | void loop() { | ||
+ | if (digitalRead(GPIO_MICRO_SWITCH_BUTTON) == LOW) { | ||
+ | Serial.println(analogRead(GPIO_PHOTOCELL)); | ||
} | } | ||
} | } |
projets/fuz/webduino.txt · Last modified: 2023-02-02 22:06 by 127.0.0.1