File tree Expand file tree Collapse file tree 12 files changed +14
-57
lines changed
Expand file tree Collapse file tree 12 files changed +14
-57
lines changed Original file line number Diff line number Diff line change 22# can run arbitrary Python, but best to keep it minimal
33
44import pyb
5- #pyb.main('main.py') # main script to run after this one
6- #pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
7- #pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
Original file line number Diff line number Diff line change 1- import pyb
2-
1+ # your main code goes here
Original file line number Diff line number Diff line change 1- # boot.py -- run on boot-up
2- # can run arbitrary Python, but best to keep it minimal
31
4- import pyb
5- #pyb.main('main.py') # main script to run after this one
6- #pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
7- #pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
2+ import pyb
Original file line number Diff line number Diff line change 1- import pyb
2-
31led = pyb .LED (4 )
42led .on ()
Original file line number Diff line number Diff line change 1- # boot.py -- run on boot-up
2- # can run arbitrary Python, but best to keep it minimal
3-
41import pyb
5- #pyb.main('main.py') # main script to run after this one
6- #pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
7- #pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
2+ led = pyb .LED (4 )
Original file line number Diff line number Diff line change 1- import pyb
2-
3- led = pyb .LED (4 )
41while True :
52 led .on ()
6- delay (1000 )
3+ pyb . delay (1000 )
74 led .off ()
8- delay (1000 )
5+ pyb . delay (1000 )
Original file line number Diff line number Diff line change 1- # boot.py -- run on boot-up
2- # can run arbitrary Python, but best to keep it minimal
3-
41import pyb
5- #pyb.main('main.py') # main script to run after this one
6- #pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
7- #pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
2+
3+ led = pyb .LED (2 )
Original file line number Diff line number Diff line change 1- import pyb
2-
3- led = pyb .LED (4 )
41while True :
52 led .toggle ()
63 pyb .delay (1000 )
Original file line number Diff line number Diff line change 1- # boot.py -- run on boot-up
2- # can run arbitrary Python, but best to keep it minimal
3-
41import pyb
5- # pyb.main('main.py') # main script to run after this one
6- #pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
7- #pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
2+ led = pyb .LED ( 3 )
3+ prev_millis = 0
4+ interval = 1000
Original file line number Diff line number Diff line change 1- import pyb
2-
3- led = pyb .LED (4 )
4- prev_millis = 0
5- interval = 1000
6-
71while True :
82 curr_millis = pyb .millis ()
93
You can’t perform that action at this time.
0 commit comments