ASK AN ENGINEER is LIVE now! Click here to watch our weekly show with LADYADA!
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/

C library for Adafruit RGB Negative 16x2 LCD+Keypad Kit for Raspberry Pi

by JanBlomqvist on Mon Dec 31, 2012 4:12 am

Hi, I wonder if there are any C libraries or any C code for the Adafruit RGB Negative 16x2 LCD+Keypad Kit for Raspberry Pi. The software on the Git hub is just Python.

/Jan
JanBlomqvist
 
Posts: 2
Joined: Mon Dec 31, 2012 3:56 am

Re: C library for Adafruit RGB Negative 16x2 LCD+Keypad Kit for Raspberry Pi

by adafruit on Wed Jan 02, 2013 8:08 pm

At this time we have only Python - there's a lot of dependencies that would be required to make it work in C, its not an easy task to port!
User avatar
adafruit
 
Posts: 11663
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: C library for Adafruit RGB Negative 16x2 LCD+Keypad Kit for Raspberry Pi

by FunkyELF on Thu Jan 03, 2013 10:35 am

JanBlomqvist wrote:Hi, I wonder if there are any C libraries or any C code for the Adafruit RGB Negative 16x2 LCD+Keypad Kit for Raspberry Pi. The software on the Git hub is just Python.

/Jan


If you want to use it from C... calling Python code from C is pretty easy.
You'd just initialize a Python interpreter, instantiate a Adafruit_CharLCDPlate object. Keep it global for simplicity.
Then you can write C function wrappers that call the clear, message, and backlight functions on the the Adafruit_CharLCDPlate object.

Not a native C library, but if you want to be able to control it via C code, that'll work.
FunkyELF
 
Posts: 4
Joined: Thu Jan 03, 2013 10:15 am

Re: C library for Adafruit RGB Negative 16x2 LCD+Keypad Kit for Raspberry Pi

by JanBlomqvist on Fri Jan 04, 2013 6:01 am

FunkyELF wrote:If you want to use it from C... calling Python code from C is pretty easy.
You'd just initialize a Python interpreter, instantiate a Adafruit_CharLCDPlate object. Keep it global for simplicity.
Then you can write C function wrappers that call the clear, message, and backlight functions on the the Adafruit_CharLCDPlate object.

Not a native C library, but if you want to be able to control it via C code, that'll work.

Thanks for the idea, but I had honestly hoped for complete C libs, anyway, I'll take this in account when I plan my coding, I need to think things over before I jump all over it.

/Jan
JanBlomqvist
 
Posts: 2
Joined: Mon Dec 31, 2012 3:56 am