Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

C spec for 7 segment clock with backpack needed
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

C spec for 7 segment clock with backpack needed

by maryannhorton on Sun Mar 29, 2020 7:25 pm

I have a 1.2" Adafruit 7 segment display connected to a Raspberry Pi Zero with i2c, and I'm trying to control it from the C language. I've found excellent examples of Python code (they work fine) and C code for the Arduino, but I was only able to find a user example for C on the Pi, using the wiringPi library.

The C code works fine, but only if I first initialize the display by running a Python program. If I boot up and run the C program without first running Python, I get a blank display. (The Python seems to initialize and set the brightness, so I'm guessing the boot-up brightness is set to zero.)

Where can I find a spec for the backpack 7 segment i2c operations from C, including how to initialize it and set the brightness? Is there a different recommended library or is wiringPi the way to go?

maryannhorton
 
Posts: 2
Joined: Sun Mar 29, 2020 7:11 pm

Re: C spec for 7 segment clock with backpack needed

by adafruit_support_carter on Mon Mar 30, 2020 5:54 pm

We don't have any reference C code. The code in the Arduino library would the closest. The display is driven by the HT16K33 and the datasheet is here:
http://www.adafruit.com/datasheets/ht16K33v110.pdf

Maybe you can piece it together using the information there along with what is in the Arduino / Python libraries.

adafruit_support_carter
 
Posts: 16944
Joined: Tue Nov 29, 2016 2:45 pm

Re: C spec for 7 segment clock with backpack needed

by maryannhorton on Mon Apr 06, 2020 2:27 pm

I found a user who has created a helpful library.
https://dino.ciuffetti.info/2014/04/ada ... y-pi-in-c/

maryannhorton
 
Posts: 2
Joined: Sun Mar 29, 2020 7:11 pm

Please be positive and constructive with your questions and comments.