mirror of
				https://github.com/eledio-devices/ESP32Wrover16Template.git
				synced 2025-10-31 00:22:32 +01:00 
			
		
		
		
	First commit - blinking LED.
This commit is contained in:
		
							
								
								
									
										24
									
								
								src/main.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								src/main.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| #include <Arduino.h> | ||||
|  | ||||
| #ifndef LED_BUILTIN | ||||
| # warning Development kit has no built-in LED. Using GPIO4 as default. | ||||
| # define LED_BUILTIN 4 | ||||
| #endif | ||||
|  | ||||
| static uint32_t timeBase = 0; | ||||
|  | ||||
| void setup(void) | ||||
| { | ||||
|  | ||||
|     Serial.begin(115200); // prepare serial debug port | ||||
|     pinMode(LED_BUILTIN, OUTPUT); | ||||
| } | ||||
|  | ||||
| void loop(void) | ||||
| { | ||||
|  | ||||
|     if (millis() - timeBase > 500) { | ||||
|         timeBase = millis(); | ||||
|         digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user