Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #I built a main.py with some Python commands in a forever loop. As long as I start ist from the OpenMV IDE, it is running fine (with #the procedure written in the tutorial).
- # Main Module Example
- import pyb, time, os
- ctr = 0
- led1 = pyb.LED(1) #red LED
- led2 = pyb.LED(2) #green LED
- led3 = pyb.LED(3) #blue LED
- while(1):
- print('looping the thing {}...'.format(ctr))
- ctr += 1
- now = pyb.micros()
- print('/ {}'.format(os.listdir('/')))
- now2 = pyb.micros()
- print('Time needed to print the System Volume Info {} micro seconds'.format(now2 - now))
- led1.toggle()
- pyb.delay(2000)
- led1.toggle()
- pyb.delay(2000)
- led2.on()
- pyb.delay(2000)
- led2.off()
- pyb.delay(500)
- led3.on()
- pyb.delay(500)
- led3.off()
- pyb.delay(500)
- for i in range(0,6):
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement