1.2" 7-segment Backpack and Webiopi

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
cgaspoz
 
Posts: 1
Joined: Wed Mar 19, 2014 10:32 am

1.2" 7-segment Backpack and Webiopi

Post by cgaspoz »

Hi,
I have the big 7-segment led backpack and it's working fine on my Raspberry Pi with the supplied code. I use it to display the current temperature of a hot tub and the state of the filtration (on/off). Currently, I have my sensors values read by webiopi and stocked in memcached and a script (started in a screen session) that drive the 7-segment display, getting the values from memcached.

I would like to be able to also drive the 7-segment display from webiopi, as it already has all information that I need to display and it also takes care of the monitoring of the threads, which is more robust than my current screen session.

The problem that I encounter now, is that webiopi is running with python 3 and that the adafruit code is designed for python 2. I was able to correct the syntax of print and except statements, but now I am stuck with an issue related to smbus that has no python 3 version, but is required by Adafruit_I2C.py (imported by Adafruit_LEDBackpack.py).

Googling around, I read that webiopi has an implementation of the i2c controller that doesn't require smbus. So my question, is how to adapt Adafruit_I2C.py to work with webiopi in order to be able to drive my display? I would be very happy if somebody could point me in the right direction (either Adafruit_I2C.py + webiopi or Adafruit_I2C.py with python 3).

Thanks in advance!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: 1.2" 7-segment Backpack and Webiopi

Post by adafruit_support_mike »

I don't know of any existing code that combines those two sources.

Your best bet will be to find out how I2C works in webiopi and build up from there. Once you have that, you should be able to adapt the Adafruit_LEDBackpack.py module without too much trouble.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”