1
0

spring cleaning 1

This commit is contained in:
dtb
2023-12-31 10:46:23 -07:00
parent ea31d1221c
commit f501a77764
116 changed files with 4712 additions and 8 deletions

3
Wip/ht16k33/Makefile Normal file
View File

@@ -0,0 +1,3 @@
CFLAGS += -I/usr/local/include -L/usr/local/lib
ht16k33: ht16k33.c
$(CC) $(CFLAGS) -lwiringPi -o ht16k33 ht16k33.c

2
Wip/ht16k33/README.txt Normal file
View File

@@ -0,0 +1,2 @@
This program depends on WiringPi. Build instructions can be found in the
Makefile in the root of this project.

14
Wip/ht16k33/ht16k33.c Normal file
View File

@@ -0,0 +1,14 @@
#include <unistd.h>
#include <wiringPiI2C.h>
#include "ht16k33.h"
/* https://cdn-shop.adafruit.com/datasheets/ht16K33v110.pdf */
#define ADDRESS 0x70
int main(int argc, char *argv[]){
int fd;
fd = wiringPiI2CSetup(ADDRESS);
close(fd);
}

11
Wip/ht16k33/ht16k33.h Normal file
View File

@@ -0,0 +1,11 @@
/* Definitions were determined by reading Adafruit code and the datasheet. */
#define HT16K33_SYSTEM_CMD 0x20 /* 0b0010???x */
#define HT16K33_SYSTEM_ON 0x01 /* 0b00000001 */
#define HT16K33_SYSTEM_OFF 0x00 /* 0b00000000 */
/* `0xE0 | n`, where 0 <= n <= 15 and the display dims to (n+1)/16 duty */
#define HT16K33_CMD_BRIGHTNESS 0xE0 /* 0b1110xxxx */
#define HT16K33_BLINK_CMD 0x80 /* 0b1000?xxx */
#define HT16K33_BLINK_DISPLAYON 0x01 /* 0b1000???x */