Error when tethering CodeBug to a Pi

Help and questions on programming the codebug
Post Reply
duckstar
Posts: 2
Joined: Sun Jun 12, 2016 6:52 pm

Error when tethering CodeBug to a Pi

Post by duckstar » Sun Jun 12, 2016 7:00 pm

Hi

I think I followed all the instructions correctly - This set - http://www.codebug.org.uk/learn/activit ... -with-i2c/
But when I run the simple code example I get a load of errors.

Traceback (most recent call last):
File "/home/pi/Desktop/example.py", line 5, in <module>
cb.set_pixel(2,2,1)
File "/usr/local/lib/python3.4/dist-packages/codebug_i2c_tether/core.py", line 262, in set_pixel
self.set_bit(channel, bit_index, state)
File "/usr/local/lib/python3.4/dist-packages/codebug_i2c_tether/codebug_i2c.py", line 82, in set_bit
self.or_mask(address, 1 << bit_index)
File "/usr/local/lib/python3.4/dist-packages/codebug_i2c_tether/codebug_i2c.py", line 76, in or_mask
value = struct.unpack('B', self.get(address))[0]
File "/usr/local/lib/python3.4/dist-packages/codebug_i2c_tether/codebug_i2c.py", line 33, in get
reading(self.device_address, 1))[0]
File "/usr/local/lib/python3.4/dist-packages/codebug_i2c_tether/i2c.py", line 85, in transaction
ioctl(self.fd, I2C_RDWR, ioctl_arg)
OSError: [Errno 5] Input/output error

Can anyone suggest anything? Running newest version of Jessie as well.
Thanks

pigraham
Posts: 65
Joined: Sat Aug 15, 2015 1:41 pm

Re: Error when tethering CodeBug to a Pi

Post by pigraham » Mon Jun 13, 2016 12:16 pm

I don't know, It's not something I've tried, but have you enabled i2c, which I think Codebug tethering uses. You can do that from raspi-config or edit the blacklist.

duckstar
Posts: 2
Joined: Sun Jun 12, 2016 6:52 pm

Re: Error when tethering CodeBug to a Pi

Post by duckstar » Mon Jun 13, 2016 2:23 pm

Hi
Thanks yes I have tried this.
Some one I know its an issue with Jessie and i2c.
Nic

Post Reply