Skip to content

Commit a0441fc

Browse files
committed
examples/accellog.py: Shift long comments to their own line.
To improve interaction with black formatter.
1 parent 17aeb43 commit a0441fc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/accellog.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
accel = pyb.Accel() # create object of accelerometer
66
blue = pyb.LED(4) # create object of blue LED
77

8-
log = open('/sd/log.csv', 'w') # open file to write data - /sd/ is the SD-card, /flash/ the internal memory
8+
# open file to write data - /sd/ is the SD-card, /flash/ the internal memory
9+
log = open('/sd/log.csv', 'w')
10+
911
blue.on() # turn on blue LED
1012

11-
for i in range(100): # do 100 times (if the board is connected via USB, you can't write longer because the PC tries to open the filesystem which messes up your file.)
13+
# do 100 times (if the board is connected via USB, you can't write longer because the PC tries to open the filesystem which messes up your file.)
14+
for i in range(100):
1215
t = pyb.millis() # get time since reset
1316
x, y, z = accel.filtered_xyz() # get acceleration data
1417
log.write('{},{},{},{}\n'.format(t,x,y,z)) # write data to file

0 commit comments

Comments
 (0)