From b779a65eb9c73ae2e8a1475ef9fe950ac6661d06 Mon Sep 17 00:00:00 2001 From: "rjbatista@gmail.com" Date: Mon, 11 Jun 2012 21:16:15 +0000 Subject: [PATCH] ISSUE #22: corrected setDisplayDigit repeatedly with the dot set to true --- CHANGES.txt | 3 ++- TM1640.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 67fb4c8..b6fc728 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ -- ISSUE #24: Correction on setDisplayToDecNumber bug (thanks to hbx3485); +- ISSUE #22: corrected setDisplayDigit repeatedly with the dot set to true; +- ISSUE #24: Correction on setDisplayToDecNumber bug (thanks to hbx3485). Version 2.1.1 diff --git a/TM1640.cpp b/TM1640.cpp index 9fa4831..fc5f061 100644 --- a/TM1640.cpp +++ b/TM1640.cpp @@ -35,6 +35,12 @@ TM1640::TM1640(byte dataPin, byte clockPin, boolean activateDisplay, byte intens void TM1640::sendChar(byte pos, byte data, boolean dot) { sendData(pos, data | (dot ? 0b10000000 : 0)); + + // necessary for the TM1640 + digitalWrite(strobePin, LOW); + digitalWrite(clockPin, LOW); + digitalWrite(clockPin, HIGH); + digitalWrite(strobePin, HIGH); } void TM1640::clearDisplay()