Changed pins to match schematics on project site
This commit is contained in:
@@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include <TM1638.h>
|
#include <TM1638.h>
|
||||||
|
|
||||||
// define a module on data pin 3, clock pin 2 and strobe pin 4
|
// define a module on data pin 3, clock pin 9 and strobe pin 7
|
||||||
TM1638 module(3, 2, 4);
|
TM1638 module(8, 9, 7);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// display a hexadecimal number and set the left 4 dots
|
// display a hexadecimal number and set the left 4 dots
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// define a modules
|
// define a modules
|
||||||
TM1638 modules[] = {
|
TM1638 modules[] = {
|
||||||
TM1638(3, 2, 4),
|
TM1638(8, 9, 7),
|
||||||
TM1638(3, 2, 5),
|
TM1638(8, 9, 6),
|
||||||
TM1638(3, 2, 6),
|
TM1638(8, 9, 5),
|
||||||
TM1638(3, 2, 7)
|
TM1638(8, 9, 4)
|
||||||
};
|
};
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ const byte hello[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// define the first module
|
// define the first module
|
||||||
TM1638 module1(3, 2, 4);
|
TM1638 module1(8, 9, 7);
|
||||||
// to chain modules, use the same clk and data - just specify a different strobe pin
|
// to chain modules, use the same clk and data - just specify a different strobe pin
|
||||||
TM1638 module2(3, 2, 5);
|
TM1638 module2(8, 9, 6);
|
||||||
|
|
||||||
unsigned long value = 0L;
|
unsigned long value = 0L;
|
||||||
boolean state = true;
|
boolean state = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user