seven post at 2019-7-13 22:29:12

I2C on 2G-IoT

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:http://codelectron.com/how-to-setup-oled-display-with-orange-pi-zero-python-ssd1306/

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
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: Operation not permitted</span></font>
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

http://www.orangepi.org/orangepibbsen/forum.php?mod=image&aid=1607&size=300x300&key=714ddec7b93f9e3f&nocache=yes&type=fixnonehttp://www.orangepi.org/orangepibbsen/forum.php?mod=image&aid=1606&size=300x300&key=c94b22625f4b0b2f&nocache=yes&type=fixnone






arnel123 post at 2024-4-7 19:23:27

Document thrilled along with the researching you will designed to makes precise put up impressive. Delightful adventure!        Pharmaceutical Sales jobs
page: [1]
View full version: I2C on 2G-IoT