Skip to content

Instantly share code, notes, and snippets.

@jboecker
Created November 25, 2016 18:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jboecker/298e471192bc3f9425acb817eb359057 to your computer and use it in GitHub Desktop.
Save jboecker/298e471192bc3f9425acb817eb359057 to your computer and use it in GitHub Desktop.
#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