|
1 | 1 | /*
|
2 |
| - Blink |
3 |
| - Turns an LED on for one second, then off for one second, repeatedly. |
4 |
| - Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO |
5 |
| - it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to |
6 |
| - the correct LED pin independent of which board is used. |
7 |
| - If you want to know what pin the on-board LED is connected to on your Arduino |
8 |
| - model, check the Technical Specs of your board at: |
9 |
| - https://www.arduino.cc/en/Main/Products |
10 |
| - modified 8 May 2014 |
11 |
| - by Scott Fitzgerald |
12 |
| - modified 2 Sep 2016 |
13 |
| - by Arturo Guadalupi |
14 |
| - modified 8 Sep 2016 |
15 |
| - by Colby Newman |
| 2 | + This example shows how to confirm an update Sketch after a swap |
| 3 | + using MCUboot library. |
| 4 | +
|
| 5 | + Circuit: |
| 6 | + - Arduino Portenta H7 board |
| 7 | +
|
16 | 8 | This example code is in the public domain.
|
17 |
| - https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink |
18 | 9 | */
|
19 | 10 |
|
20 | 11 | #include <MCUboot.h>
|
|
23 | 14 | void setup() {
|
24 | 15 | // initialize digital pin LED_BUILTIN as an output.
|
25 | 16 | pinMode(LED_BUILTIN, OUTPUT);
|
26 |
| - // set confirmed flag to avoid MCUBoot reverts to previous application at next reset |
| 17 | + // set confirmed flag to avoid MCUboot reverts to previous application at next reset |
27 | 18 | MCUboot::confirmSketch();
|
28 | 19 | }
|
29 | 20 |
|
30 | 21 | // the loop function runs over and over again forever
|
31 | 22 | void loop() {
|
32 | 23 | digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
|
33 |
| - delay(1000); // wait for a second |
| 24 | + delay(100); // wait 100ms |
34 | 25 | digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
|
35 |
| - delay(1000); // wait for a second |
| 26 | + delay(100); // wait 100ms |
36 | 27 | }
|
0 commit comments