Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ff3138ce1 |
@@ -1,7 +1,3 @@
|
|||||||
Version 2.1.1
|
|
||||||
|
|
||||||
- ISSUE #21: Problems on clearDisplay and setupDisplay;
|
|
||||||
|
|
||||||
Version 2.1.0
|
Version 2.1.0
|
||||||
|
|
||||||
- ISSUE #20: Support for negative decimal numbers;
|
- ISSUE #20: Support for negative decimal numbers;
|
||||||
|
|||||||
10
TM1640.cpp
10
TM1640.cpp
@@ -36,13 +36,3 @@ void TM1640::sendChar(byte pos, byte data, boolean dot)
|
|||||||
{
|
{
|
||||||
sendData(pos, data | (dot ? 0b10000000 : 0));
|
sendData(pos, data | (dot ? 0b10000000 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TM1640::clearDisplay()
|
|
||||||
{
|
|
||||||
digitalWrite(strobePin, LOW);
|
|
||||||
send(0xC0);
|
|
||||||
for (int i = 0; i < 16; i++) {
|
|
||||||
send(0x00);
|
|
||||||
}
|
|
||||||
digitalWrite(strobePin, HIGH);
|
|
||||||
}
|
|
||||||
|
|||||||
2
TM1640.h
2
TM1640.h
@@ -33,8 +33,6 @@ class TM1640 : public TM16XX
|
|||||||
public:
|
public:
|
||||||
/** Instantiate a tm1640 module specifying the display state, the starting intensity (0-7) data and clock pins. */
|
/** Instantiate a tm1640 module specifying the display state, the starting intensity (0-7) data and clock pins. */
|
||||||
TM1640(byte dataPin, byte clockPin, boolean activateDisplay = true, byte intensity = 7);
|
TM1640(byte dataPin, byte clockPin, boolean activateDisplay = true, byte intensity = 7);
|
||||||
/** Clear the display */
|
|
||||||
virtual void clearDisplay();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void sendChar(byte pos, byte data, boolean dot);
|
virtual void sendChar(byte pos, byte data, boolean dot);
|
||||||
|
|||||||
@@ -54,12 +54,6 @@ TM16XX::TM16XX(byte dataPin, byte clockPin, byte strobePin, byte displays, boole
|
|||||||
void TM16XX::setupDisplay(boolean active, byte intensity)
|
void TM16XX::setupDisplay(boolean active, byte intensity)
|
||||||
{
|
{
|
||||||
sendCommand(0x80 | (active ? 8 : 0) | min(7, intensity));
|
sendCommand(0x80 | (active ? 8 : 0) | min(7, intensity));
|
||||||
|
|
||||||
// necessary for the TM1640
|
|
||||||
digitalWrite(strobePin, LOW);
|
|
||||||
digitalWrite(clockPin, LOW);
|
|
||||||
digitalWrite(clockPin, HIGH);
|
|
||||||
digitalWrite(strobePin, HIGH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TM16XX::setDisplayDigit(byte digit, byte pos, boolean dot, const byte numberFont[])
|
void TM16XX::setDisplayDigit(byte digit, byte pos, boolean dot, const byte numberFont[])
|
||||||
|
|||||||
Reference in New Issue
Block a user