Bus I2c su Shield Raspberry I/O
Posted: 13/04/2014, 11:52
Buongiorno a tutti, ho acquistato qualche giorno fa il kit contenete raspberry pi libro e scheda I/O,
sto seguendo gli esercizi proposti sul libro ma sono fermo per un errore che mi da utilizzando il bus I2c,
al comando ' i2cdetect -y 1 ' rilevo il seguente output
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- 4d -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
mentre il libro mi dice che dovrei ottenere un dato all'indirizzo 0x48, inoltre quando eseguo il comando ' i2cset -y 1 0x48 0x00 ' ottengo questo errore: '
Error: Write failed ', quindi il software descritto non funziona, ad esempio il programma ' TempLux.py ' opportunamente commentato, restituisce il seguente errore:
root@raspberrypi:~# python /home/LR/TempLux.py
Traceback (most recent call last):
File "/home/LR/TempLux.py", line 82, in <module>
bus.write_byte(adc_address1,adc_channel1)
IOError: [Errno 5] Input/output error
Dov'รจ l'errore ?
sto seguendo gli esercizi proposti sul libro ma sono fermo per un errore che mi da utilizzando il bus I2c,
al comando ' i2cdetect -y 1 ' rilevo il seguente output
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- 4d -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
mentre il libro mi dice che dovrei ottenere un dato all'indirizzo 0x48, inoltre quando eseguo il comando ' i2cset -y 1 0x48 0x00 ' ottengo questo errore: '
Error: Write failed ', quindi il software descritto non funziona, ad esempio il programma ' TempLux.py ' opportunamente commentato, restituisce il seguente errore:
root@raspberrypi:~# python /home/LR/TempLux.py
Traceback (most recent call last):
File "/home/LR/TempLux.py", line 82, in <module>
bus.write_byte(adc_address1,adc_channel1)
IOError: [Errno 5] Input/output error
Dov'รจ l'errore ?