Skip to content

Instantly share code, notes, and snippets.

@Schnabulator
Forked from vschlegel/LED
Created August 30, 2020 08:55
Show Gist options
  • Save Schnabulator/9d4f82d2a0492b45659e361a01aca846 to your computer and use it in GitHub Desktop.
Save Schnabulator/9d4f82d2a0492b45659e361a01aca846 to your computer and use it in GitHub Desktop.
For controling the TW-1264 LED Display, available on HAM RADIO 2016, using an Arduino Nano. Vllt zum ne Uhr bauen
//CC BY NC SA 2016 github.com/ioeides
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int numbers[10] = {0, 48, 91, 121, 116, 109, 111, 56, 127, 125};
/*
* ###8###
* # #
* 4 16
* # #
* ###64##
* # #
* 2 32
* # #
* ###1###
*/
void setup() {
pinMode(latchPin, OUTPUT); //alias RCK
pinMode(clockPin, OUTPUT); //alias SRCK
pinMode(dataPin, OUTPUT); //alias SerIn
}
void loop() {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, numbers[1]); //Prints a one
digitalWrite(latchPin, HIGH);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment