In this section, we build a blinking LED program using Blink program via OpenMV IDE. OpenMV board provides onboard LED.
Let's start to write our Blink program by creating a new file on OpenMV IDE. Then, write the following scripts:
import time from pyb import LED led = LED(1) # red led print('Demo blinking...') while 1: print('on') led.on() time.sleep(1000) print('off') led.off() time.sleep(1000)
We use object LED to work with onboard LEDs. The following is onboard LEDs on OpenMV board:
Now you can run the program by clicking green arrow on the left-bottom.
After connected to OpenMV, we shoul see a green arrow. It's used to run the program.
You can see program output on Serial Terminal that is shown in Figure below.
You also see blinking RED led.