C spec for 7 segment clock with backpack needed

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
maryannhorton
 
Posts: 2
Joined: Sun Mar 29, 2020 7:11 pm

C spec for 7 segment clock with backpack needed

Post by maryannhorton »

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?

User avatar
adafruit_support_carter
 
Posts: 29164
Joined: Tue Nov 29, 2016 2:45 pm

Re: C spec for 7 segment clock with backpack needed

Post by adafruit_support_carter »

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.

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

Re: C spec for 7 segment clock with backpack needed

Post by maryannhorton »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”