Open wawawa15 opened 4 years ago
Im going to check for that
Looks like you're missing the smbus package.
Just run:
sudo apt-get install python3-smbus
Im going to include that in the install.sh
Im going to include that in the install.sh
Still: https://imgur.com/a/RnTQ4jv Ignore second display :)))
Ohh...
raspi-config
?sudo i2cdetect -y 0
sudo i2cdetect -y 1
https://imgur.com/a/K7VKkyF Yes, I activated i2c in raspi config but still not working. I don't have a 16x2 display without i2c.
Can you give me he output of 2. / 3.?
Can you be more specific? I'm begginer with Rpi. Now I try with rpi 3 but same problem.
Run those two Comands and send me the outputs.
sudo i2cdetect -y 0
sudo i2cdetect -y 1
Here's the output: https://imgur.com/a/jOdFSAO
pi@raspberrypi:~ $ sudo i2cdetect -y 0
Error: Could not open file /dev/i2c-0' or
/dev/i2c/0': No such file or directory
pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3f
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
or
pi@raspberrypi:~/corona-display $ sudo i2cdetect -y 0
Error: Could not open file /dev/i2c-0' or
/dev/i2c/0': No such file or directory
pi@raspberrypi:~/corona-display $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3f
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Okey, looks alright..
Try changing sudo nano modules/i2c.py
Line 9: I2C_ADDR = 0x27 # I2C device address to I2C_ADDR = 0x3f # I2C device address
Also try this Guide
Now i have this problem: pi@raspberrypi:~/corona-display $ python3 display_16x2.py
Traceback (most recent call last):
File "display_16x2.py", line 28, in
Looking better!
Try: sudo nano display_16x2.py
on line 16
lcd_string((cc), (deaths_c)+(" Deaths"),LCD_LINE_1)
to lcd_string((cc)+(" ")+(deaths_c)+(" Deaths"),LCD_LINE_1)
I make what you said but this error appeared: pi@raspberrypi:~/corona-display $ sudo nano display_16x2.py pi@raspberrypi:~/corona-display $ python display_16x2.py File "display_16x2.py", line 28 lcd_string((cc)+ (" ") + (deaths_c)+(" Deaths"),LCD_LINE_1) ^ IndentationError: unindent does not match any outer indentation level
Try again: sudo nano display_16x2.py
on line 16 lcd_string((cc), (deaths_c)+(" Deaths"),LCD_LINE_1) to lcd_string((cc)+(" ")+(deaths_c)+(" Deaths"),LCD_LINE_1)
And you ned to run with python3
Still problem: pi@raspberrypi:~/corona-display $ sudo nano display_16x2.py pi@raspberrypi:~/corona-display $ python3 display_16x2.py File "display_16x2.py", line 28 lcd_string((cc)+(" ")+(deaths_c)+(" Deaths"),LCD_LINE_1) ^ IndentationError: unindent does not match any outer indentation level
Thats wired, mabey try updating the files with sudo git pull
in the /corona-display
folder.
Rpi zero with 16x2 display i2c. After sudo./install.sh I run python3 display_16x2.py :
Traceback (most recent call last): File "display_16x2.py", line 4, in
from module.i2c import *
File "/home/pi/corona-display/module/i2c.py", line 30, in
bus = smbus.SMBus(1) # Rev 2 Pi uses 1
FileNotFoundError: [Errno 2] No such file or directory