ADD mbed project
This commit is contained in:
		
							
								
								
									
										24
									
								
								main.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								main.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| /* mbed Microcontroller Library | ||||
|  * Copyright (c) 2019 ARM Limited | ||||
|  * SPDX-License-Identifier: Apache-2.0 | ||||
|  */ | ||||
|  | ||||
| #if !MBED_TEST_MODE | ||||
|  | ||||
| #include "mbed.h"  // NOLINT | ||||
|  | ||||
| // Blinking rate in milliseconds | ||||
| #define BLINKING_RATE 500ms | ||||
|  | ||||
| int main() { | ||||
|     // Initialise the digital pin LED1 as an output | ||||
|  | ||||
|     DigitalOut led(LED1); | ||||
|  | ||||
|     while (true) { | ||||
|         led = !led; | ||||
|         ThisThread::sleep_for(BLINKING_RATE); | ||||
|     } | ||||
| } | ||||
|  | ||||
| #endif  // MBED_TEST_MODE | ||||
		Reference in New Issue
	
	Block a user