exixe Arduino library
This is a simple Arduino library for exixe modules.
Installation
Click me to download the library file.
In Arduino IDE, select Sketch -> Include Library -> Add .ZIP Library
Select the exixe.zip you just downloaded, and it should install automatically.
Usage
A number of examples are provided here. Take a look at the getting started guide to see how to use them.
spi_init()
- Initializes SPI peripheral, only call this once(even if you use multiple tubes) at the beginning of the sketch.
show_digit(uint8_t digit, uint8_t brightness, uint8_t overdrive)
- 
This sets digitin the tube tobrightness.
- 
digitmust be between 0 to 9.
- 
brightnessmust be between 0 and 127. 0 being off 127 being brightest.
- 
overdrivemust be 0 or 1. When set to 1 the cathode current is doubled, helping to illuminate poisoned cathodes in second-hand tubes. Before and after. Only use on poisoned tubes, otherwise it might shorten tube life.
- 
Overdrive is only available on exixe-14. 
set_led(uint8_t red, uint8_t green, uint8_t blue)
- 
Set the LED backlight to provided RGB value. 
- 
Color arguments must between 0 and 127, 0 being off 127 being brightest. 
set_dots(uint8_t left_brightness, uint8_t right_brightness)
- 
Sets the decimal points in the tube to the brightness arguments. 
- 
Brightness must be between 0 and 127, 0 being off 127 being brightest. 
- 
IN-14 has 2 DPs, IN-12B has 1 DP, and IN-12A has no DP at all. 
- 
You can use this to turn on DP alongside digits. 
clear()
- Turns off all digits, DPs, and LED backlight.
crossfade_init(uint8_t digit, uint16_t duration_frames, uint8_t brightness, uint8_t overdrive)
- 
This sets up a crossfade animation. 
- 
digitis the digit you want to fade into. Must be between 0 and 9.
- 
duration_framesis how long the crossfade animation should last, in number of frames. 1 second is 30 frames.
- 
brightnessmust be between 0 and 127, 0 being off 127 being brightest.
- 
overdrivemust be 0 or 1. Seeshow_digit()above for details.
crossfade_run()
- 
Executes the crossfade animation after crossfade_init().
- 
Call this at least every 33ms for a smooth animation. 
- 
This function is non-blocking and will return immediately, this allows you to do some other tasks while animation is underway. Just make sure to call it frequently enough as mentioned above. 
- 
Check its return value to see if animation is finished. Once done it should return EXIXE_ANIMATION_FINISHED, otherwiseEXIXE_ANIMATION_IN_PROGRESSis returned.
