Commit e92b4ca
authored
Add: make digitalRead() for RGB_BUILTIN work (espressif#9419)
* make digitalRead() for RGB_BUILTIN work
Standard Arduino-Way of blinking a LED can be the shortest with:
void loop() {
static uint32_t ledticker = 0;
if (millis() - ledticker > 1000) {
ledticker = millis();
digitalWrite(RGB_BUILTIN, !digitalRead(RGB_BUILTIN));
}
}
Worked with the old LED_BUILTIN on Pin 2, now even works with Pin 48/neopixel.
* Add: make digitalRead() for RGB_BUILTIN work
Standard Arduino-Way of blinking a LED can be the shortest with:
void loop() {
static uint32_t ledticker = 0;
if (millis() - ledticker > 1000) {
ledticker = millis();
digitalWrite(RGB_BUILTIN, !digitalRead(RGB_BUILTIN));
}
}
Worked with the old LED_BUILTIN on Pin 2, now even works with Pin 48/neopixel.
(Retry. Didn't sync my local sources. Sorry.)1 parent 6345350 commit e92b4ca
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| 163 | + | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
| |||
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
173 | 184 | | |
174 | 185 | | |
175 | 186 | | |
| |||
0 commit comments