tirandagan
Member
Hi experts! I am building a submarine simulator for my son and am capturing the build process. I am hooking up 5 or more Seed 7-seg LCD displays and am trying to minimize on wiring. I noticed that when Seed sells their grove Arduino base shield they are reusing pins, see here:
http://wiki.seeed.cc/Base_Shield_V2/
so line D2 uses pins D2 and D3
line D3 connector uses pins D3 and D4
line D4 connector uses pins D4 and D5
The way these get hooked up to the grove displays is that one pin is used for CLK and the other for DIO using the TM1637 driver.
Am I reading this correctly? Is this allowed? Here's an example code I am having trouble with:
So I am directly connecting the pins on the Teensy 3.6 in the same fashion that Seedstudio is handling this pin sharing. I am running into problems: it doesn't completely fail, but when I "daisy chain" pins this way more than once then the display doesn't work properly.
For example:
The display titled "fourdigits1" and "fourdigits3" work fine but "fourdigits2" gets corrupted:
Question:
1. Can this daisy chaining work? Is it a matter of adding delays? Or other modification to the code?
2. Is Seed doing some hardware manipulation here?
http://wiki.seeed.cc/Base_Shield_V2/
so line D2 uses pins D2 and D3
line D3 connector uses pins D3 and D4
line D4 connector uses pins D4 and D5
The way these get hooked up to the grove displays is that one pin is used for CLK and the other for DIO using the TM1637 driver.
Am I reading this correctly? Is this allowed? Here's an example code I am having trouble with:
Code:
#include <TM1637Display.h>
#include <Grove_LED_Bar.h>
#define fourdigits1_CLK_pin 33
#define fourdigits1_DIO_pin 34
#define fourdigits2_CLK_pin 34
#define fourdigits2_DIO_pin 35
#define fourdigits3_CLK_pin 35
#define fourdigits3_DIO_pin 36
#define displayBrightness 2 //BRIGHT_TYPICAL = 2,BRIGHT_DARKEST = 0,BRIGHTEST = 7;
int8_t fourdigits_Disp[] = {0x00,0x00,0x00,0x00};
TM1637Display fourdigits1(fourdigits1_CLK_pin, fourdigits1_DIO_pin);
TM1637Display fourdigits2(fourdigits2_CLK_pin, fourdigits2_DIO_pin);
TM1637Display fourdigits3(fourdigits3_CLK_pin, fourdigits3_DIO_pin);
So I am directly connecting the pins on the Teensy 3.6 in the same fashion that Seedstudio is handling this pin sharing. I am running into problems: it doesn't completely fail, but when I "daisy chain" pins this way more than once then the display doesn't work properly.
For example:
The display titled "fourdigits1" and "fourdigits3" work fine but "fourdigits2" gets corrupted:
Question:
1. Can this daisy chaining work? Is it a matter of adding delays? Or other modification to the code?
2. Is Seed doing some hardware manipulation here?