Skip to content

Commit 40d8457

Browse files
committed
Make pi_spi_din_4ao_prog instructions clearer
1 parent 9d8fae3 commit 40d8457

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

python/pi_spi_din_4ao_prog.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,37 +45,37 @@ def i2c_write_byte(byte):
4545
for i in range(8):
4646
sleep(DELAY)
4747
GPIO.output(SCK, 0)
48-
48+
4949
if byte & 0x80:
5050
GPIO.output(SDA, 1)
5151
else:
5252
GPIO.output(SDA, 0)
53-
53+
5454
sleep(DELAY)
5555
GPIO.output(SCK, 1)
56-
56+
5757
byte <<= 1
58-
58+
5959
sleep(DELAY)
6060
GPIO.output(SCK, 0)
6161
GPIO.output(SDA, 0)
62-
63-
62+
63+
6464
data = [
6565
(old_address + 0x60) << 1,
6666
0x61 | (old_address << 2),
6767
0x62 | (new_address << 2),
6868
0x63 | (new_address << 2)
6969
]
70-
70+
7171
GPIO.output(SDA, 0)
7272
sleep(DELAY)
7373

7474
i2c_write_byte(data[0])
7575
i2c_ack_byte()
7676

7777
i2c_write_byte(data[1])
78-
input('Insert jumper J1 and press enter')
78+
input('Insert jumper J1 for older modules and J3 for newer modules and press enter')
7979
i2c_ack_byte()
8080

8181
i2c_write_byte(data[2])

0 commit comments

Comments
 (0)