Created
November 25, 2016 18:32
-
-
Save jboecker/298e471192bc3f9425acb817eb359057 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DCSBIOS_IRQ_SERIAL | |
#include "DcsBios.h" | |
#include "LedControl.h" | |
LedControl lc=LedControl(2,3,4,1); | |
void onUv26DisplayChange(char* newValue) { | |
/* set digit 4 to first character (newValue[0]) */ | |
lc.setChar(0, 4, newValue[0], false); | |
/* set digit 3 to second character */ | |
lc.setChar(0, 3, newValue[1], false); | |
/* set digit 2 to third character */ | |
lc.setChar(0, 2, newValue[2], false); | |
} | |
DcsBios::StringBuffer<3> uv26DisplayBuffer(0x1812, onUv26DisplayChange); | |
void setup() { | |
lc.shutdown(0,false); | |
/* Set the brightness to a medium values */ | |
lc.setIntensity(0,8); | |
/* and clear the display */ | |
lc.clearDisplay(0); | |
DcsBios::setup(); | |
} | |
void loop() { | |
DcsBios::loop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment