I'm using Pi Zero/ Pi ZeroW with StrechLite to display an output on a 16X2 LCD display.
drivers was installed as instructed on PiGuy official site.
while running a sample code after installing - an error occurs:
guy@rpi2:~/Documents/github/Rpi/GPIO_Projects/lcd $ python3 demo_clock.py Traceback (most recent call last): File "demo_clock.py", line 12, in <module> display = lcddriver.lcd() File "/home/guy/Documents/github/Rpi/GPIO_Projects/lcd/lcddriver.py", line 67, in __init__ self.lcd_device = i2c_lib.i2c_device(ADDRESS) File "/home/guy/Documents/github/Rpi/GPIO_Projects/lcd/i2c_lib.py", line 7, in __init__ self.bus = smbus.SMBus(port) PermissionError: [Errno 13] Permission denied
But when using
sudo it runs OK (taken from here):
guy@rpi2:~/Documents/github/Rpi/GPIO_Projects/lcd $ sudo python3 demo_clock.py [sudo] password for guy: Writing to display : https://www.theraspberrypiguy.com/raspberry-pi-mini-lcd-display-tutorial/
Any ideas how to solve it ?