Hello,
I tried toaccess i2c-bus on he 2G-IoT Board to interface an OLED display. With theOrangepi zero H2+ I already had success. I used this manual:
I used the latest Image:
Ubuntu Server
updated:2018-02-07
I'accessing the board by uart and putty.
The 2G-IoT board has, according to its pinout two i2c-busses. I’m using bus 2. First I leti2cdetect run and it shows me the display connect with address 3c. However, itperforms really slow, about 1 sec per address. Orangepi zero had searched alladdresses within 1 second. Nextstrange thing is, if I manually write to /dev/i2c-2 I get anerror:
- root@orangepi:~# echo hello >> /dev/i2c-2
- -bash: echo: write error: Operation not permitted
Copy code its seems that i cant really write to the bus. However, the display is flickering shortly after I entered the command and shows noise, disordered dots and turns off.
- <font color="White"><span style="background-color: black;">(oledenv) root@orangepi:~/ssd1306/examples# python pi_logo.py --port 2
- Traceback (most recent call last):
- File "pi_logo.py", line 3, in <module>
- from demo_opts import device
- File "/root/ssd1306/examples/demo_opts.py", line 33, in <module>
- device = Device(port=args.port, address=args.address)
- File "/root/oledenv/local/lib/python2.7/site-packages/oled/device.py", line 179, in __init__
- const.DISPLAYON)
- File "/root/oledenv/local/lib/python2.7/site-packages/oled/device.py", line 73, in command
- self.bus.write_i2c_block_data(self.addr, self.cmd_mode, list(cmd))
- File "/root/oledenv/local/lib/python2.7/site-packages/smbus2/smbus2.py", line 482, in write_i2c_block_data
- ioctl(self.fd, I2C_SMBUS, msg)
- IOError: [Errno 1] Operation not permitted</span></font>
Copy code Same error here, display flashes shortly and turns off.
Do I have to enable i2c somehow, I have the feeling, that the OS or a device driver is blocking the calls!?
Thanks
|