i2c_tether error on RaspberryPi

Help and questions on programming the codebug
Post Reply
jarjargeek
Posts: 2
Joined: Wed Aug 26, 2015 8:48 pm

i2c_tether error on RaspberryPi

Post by jarjargeek » Thu Sep 03, 2015 4:26 pm

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)
@jarjargeek

DeeJay
Posts: 3
Joined: Thu Aug 27, 2015 8:46 am

Re: i2c_tether error on RaspberryPi

Post by DeeJay » Fri Sep 04, 2015 6:48 am

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.

BMS Doug
Posts: 61
Joined: Wed Aug 26, 2015 8:54 am
Contact:

Re: i2c_tether error on RaspberryPi

Post by BMS Doug » Fri Sep 04, 2015 7:01 am

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.

jarjargeek
Posts: 2
Joined: Wed Aug 26, 2015 8:48 pm

Re: i2c_tether error on RaspberryPi

Post by jarjargeek » Fri Sep 04, 2015 9:36 am

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
@jarjargeek

linuxgnuru
Posts: 1
Joined: Sun Apr 09, 2017 10:27 am

Re: i2c_tether error on RaspberryPi

Post by linuxgnuru » Sun Apr 09, 2017 10:41 am

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?

LulaNord
Posts: 2
Joined: Fri May 26, 2017 5:56 pm

Re: i2c_tether error on RaspberryPi

Post by LulaNord » Fri May 26, 2017 6:10 pm

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.
Last edited by LulaNord on Fri Jun 23, 2017 8:15 pm, edited 1 time in total.

mikerr
Posts: 81
Joined: Fri Jul 31, 2015 10:37 am
Contact:

Re: i2c_tether error on RaspberryPi

Post by mikerr » Sat May 27, 2017 9:24 am

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
Twitter @mikered codebug profile mikerr

Post Reply