Skip to content

Commit 2c25cc0

Browse files
committed
firstboot hello bugfix
1 parent 78b711f commit 2c25cc0

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/ttboard/boot/firstboot_operations.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,21 @@ def say_hello(delay_interval_ms:int=200, times:int=1):
119119
tt.clock_project_PWM(1e3) # clock it real good
120120

121121
log.info('First boot: saying hello')
122-
# for bp in tt.bidirs:
123-
# bp.mode = Pins.OUT
124-
# bp(0) # start low
122+
tt.bidir_mode = [Pins.OUT] * 8 # set as outputs
125123
for _i in range(times):
126124
for v in hello_values:
127-
tt.input_byte = v
125+
tt.bidir_byte = v
128126
time.sleep_ms(delay_interval_ms)
129127

130-
tt.input_byte = 0
128+
tt.bidir_byte = 0
131129
time.sleep_ms(int(delay_interval_ms/10))
132130

133-
tt.input_byte = 0
131+
tt.bidir_byte = 0
134132
time.sleep_ms(int(delay_interval_ms/2))
135-
133+
136134
tt.clock_project_stop()
137135

136+
tt.bidir_mode = [Pins.IN] * 8 # reset to inputs, optional but polite
138137
return True
139138

140139

0 commit comments

Comments
 (0)