You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cool library! But I can't get this module to work correctly (work only first digit). It completely coincides with the schematic description for the library.
I am using the following code from the example:
`/*
ShiftDisplay example
by MiguelPynto
Print strings from Serial Monitor (250000 baud) on display https://miguelpynto.github.io/ShiftDisplay/
*/
#include <ShiftDisplay.h>
const int LATCH_PIN = 6;
const int CLOCK_PIN = 7;
const int DATA_PIN = 5;
const DisplayType DISPLAY_TYPE = COMMON_ANODE; // COMMON_CATHODE or COMMON_ANODE
const int DISPLAY_SIZE = 2; // number of digits on display
Cool library! But I can't get this module to work correctly (work only first digit). It completely coincides with the schematic description for the library.
I am using the following code from the example:
`/*
ShiftDisplay example
by MiguelPynto
Print strings from Serial Monitor (250000 baud) on display
https://miguelpynto.github.io/ShiftDisplay/
*/
#include <ShiftDisplay.h>
const int LATCH_PIN = 6;
const int CLOCK_PIN = 7;
const int DATA_PIN = 5;
const DisplayType DISPLAY_TYPE = COMMON_ANODE; // COMMON_CATHODE or COMMON_ANODE
const int DISPLAY_SIZE = 2; // number of digits on display
ShiftDisplay display(LATCH_PIN, CLOCK_PIN, DATA_PIN, DISPLAY_TYPE, DISPLAY_SIZE);
void readSerial() {
char input[Serial.available() + 1]; // str len + NULL
int i = 0;
do {
char c = Serial.read();
if (c == '\n' || c == '\0')
break; // exit while
input[i++] = c;
} while (Serial.available() > 0);
input[i] = '\0'; // NULL terminate string
display.set(input); // save
}
void setup() {
Serial.begin(250000);
}
void loop() {
if (Serial.available() > 0)
readSerial();
display.update();
}`
What I'm doing wrong?
The text was updated successfully, but these errors were encountered: