Page 1 of 1

i2c_tether error on RaspberryPi

Posted: Thu Sep 03, 2015 4:26 pm
by jarjargeek
getting the following error when trying to run a .py script with cBug connected to GPIO via expansion port on bug :

‘no module named codebug_i2c_tether’

installed i2c tether like this: sudo pip-3.2 install codebug_i2c_tether

this is the script:

import time
import codebug_i2c_tether


if __name__ == '__main__':
with codebug_i2c_tether.CodeBug() as codebug:
codebug.set_row(4, 0b11100)
codebug.set_row(3, 0b11000)
codebug.set_row(2, 0b10100)
codebug.set_row(1, 0b00010)
codebug.set_row(0, 0b00001)

Re: i2c_tether error on RaspberryPi

Posted: Fri Sep 04, 2015 6:48 am
by DeeJay
I recognise that you are not an RPi 'newbie', so it may not help to say "works for me", other than as a point of comparison -

Code: Select all

pi@RPi2B ~ $ sudo pip-3.2 install codebug_i2c_tether
Downloading/unpacking codebug-i2c-tether
  Downloading codebug_i2c_tether-0.2.0.tar.gz
  Running setup.py egg_info for package codebug-i2c-tether

Installing collected packages: codebug-i2c-tether
  Running setup.py install for codebug-i2c-tether

Successfully installed codebug-i2c-tether
Cleaning up...
pi@RPi2B ~ $ python3
Python 3.2.3 (default, Mar  1 2013, 11:53:50)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import codebug_i2c_tether
>>>
>>>
Prior to this I had also accessed the module by cloning its github repository as described at the end of http://codebug-i2c-tether.readthedocs.o ... ation.html - that worked too. After testing I removed the directory I had cloned into before trying the pip route.

Re: i2c_tether error on RaspberryPi

Posted: Fri Sep 04, 2015 7:01 am
by BMS Doug
jarjargeek wrote:getting the following error when trying to run a .py script with cBug connected to GPIO via expansion port on bug :

‘no module named codebug_i2c_tether’

installed i2c tether like this: sudo pip-3.2 install codebug_i2c_tether

this is the script:

import time
import codebug_i2c_tether


if __name__ == '__main__':
with codebug_i2c_tether.CodeBug() as codebug:
codebug.set_row(4, 0b11100)
codebug.set_row(3, 0b11000)
codebug.set_row(2, 0b10100)
codebug.set_row(1, 0b00010)
codebug.set_row(0, 0b00001)

Did you write your script in Python2 or Python3?
I think the libraries might only be for Python3.

Re: i2c_tether error on RaspberryPi

Posted: Fri Sep 04, 2015 9:36 am
by jarjargeek
DOOOooohhhhhh - well of course, forgot to do python3 :o
but -yeah had to install the latest i2c tether firmware from here before it worked, thanks folks :D

Re: i2c_tether error on RaspberryPi

Posted: Sun Apr 09, 2017 10:41 am
by linuxgnuru
I realize this is a 2 year old thread; but I just got a codebug and would love to get it running on a raspberry pi. So; first my setup:
  • raspberry pi 3
  • kernel - 4.4.50-v7+
  • os - Raspbian Jessie (with Pixel)
I have two I2C devices running fine; a RTC and a PCF8574 I/O extender.
I've loaded the

Code: Select all

codebug_i2c_tether_v0.3.0.cbg
, unmounted and disconnected the codebug, shutdown the pi (and disconnected my other i2c devices), connected codebug to the pi, and booted the pi back up. I ran

Code: Select all

i2cdetect -y  1
but nothing showed up. I noticed the last update to the github for i2c_tether is also about a year old. Anyone know what might be wrong?

Re: i2c_tether error on RaspberryPi

Posted: Fri May 26, 2017 6:10 pm
by LulaNord
Hi...i am a new user here. We only have the word of the CodeBug team that they have two years of research, but the MicroBit has more functions, so why would they produce an inferior copy.There have been claims that the MicroBit will be open source, why not just get the source document and openly admit you are making a copy, it would probably gather more backing.As there have been no announcements of the MicroBit being made commercially available and there have been claims that it will be open source I can back CodeBug without any qualms.

Re: i2c_tether error on RaspberryPi

Posted: Sat May 27, 2017 9:24 am
by mikerr
Wrong thread, and about 2 years late .. have a read here for some codebug history :
http://codebugforum.co.uk/viewtopic.php?f=10&t=33

Short answer: codebug was released first, and is an offshoot of part of the original microbit team