mirror of
https://github.com/dekuNukem/exixe.git
synced 2025-10-31 11:17:03 -07:00
updated pictures, added arduino example
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# exixe: Low-cost miniature Nixie tube driver modules
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
exixe is a miniature driver module for IN-12 and IN-14 Nixie tubes.
|
||||
|
||||
|
||||
34
exixe_arduino_example/exixe_arduino_example.ino
Normal file
34
exixe_arduino_example/exixe_arduino_example.ino
Normal file
@@ -0,0 +1,34 @@
|
||||
#include <SPI.h>
|
||||
#define SPI_BUF_SIZE 16
|
||||
|
||||
uint8_t spi_buf[SPI_BUF_SIZE];
|
||||
const int slaveSelectPin = 10;
|
||||
|
||||
void setup()
|
||||
{
|
||||
pinMode(slaveSelectPin, OUTPUT);
|
||||
digitalWrite(slaveSelectPin, HIGH);
|
||||
|
||||
SPI.begin();
|
||||
// 8MHz SCLK, MSB first, SPI mode 0
|
||||
SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
|
||||
|
||||
spi_buf[0] = 0xaa; // first byte, header
|
||||
spi_buf[4] = 0x80 | 127; // digit 4 full brightness
|
||||
spi_buf[13] = 0x80 | 127; // red LED full brightness
|
||||
spi_buf[14] = 0x80 | 28; // green LED brightness 28
|
||||
spi_buf[15] = 0x80 | 0; // blue LED fully off
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
// cs low
|
||||
digitalWrite(slaveSelectPin, LOW);
|
||||
// send 16 byte command
|
||||
for (int i = 0; i < SPI_BUF_SIZE; ++i)
|
||||
SPI.transfer(spi_buf[i]);
|
||||
// cs high
|
||||
digitalWrite(slaveSelectPin, HIGH);
|
||||
|
||||
delay(200);
|
||||
}
|
||||
BIN
resources/breadboard.jpg
Normal file
BIN
resources/breadboard.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 470 KiB |
|
Before Width: | Height: | Size: 625 KiB After Width: | Height: | Size: 625 KiB |
Reference in New Issue
Block a user