//Starting Includes for text
#include <Streaming.h>
#include
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
//Ending Includes for text
//Starting Defines For text
#define OLED_RESET -1
#define OLED_SCREEN_I2C_ADDRESS 0x3C
Adafruit_SSD1306 display(OLED_RESET);
//Ending Defines For text
//Starting Includes for 7 segment
#include <InvertedTM1638.h>
#include <TM1638.h>
#include <TM1638QYF.h>
#include <TM1640.h>
#include <TM16XX.h>
#include <TM16XXFonts.h>
byte buttons;
//Ending includes for 7 segment
//Starting Defines for 7 segment
#define TM1638_STB D5
#define TM1638_CLK D6
#define TM1638_DIO D7
TM1638 module(TM1638_DIO, TM1638_CLK, TM1638_STB);
void setup()
{
// set up the screen
Serial.begin(115200);
display.begin(SSD1306_SWITCHCAPVCC, OLED_SCREEN_I2C_ADDRESS);
display.display();
delay(2000);
display.clearDisplay();
display.setCursor(0, 0);
display.setTextSize(1); // - a line is 21 chars in this size
display.setTextColor(WHITE);
// set up the 7-segment display This will also do the buttons!
module.clearDisplay();
module.setupDisplay(true, 2);
}
void loop()
{
//Code for the screen
display.clearDisplay();
display.setCursor(0, 0);
display << "Now is the winter" << endl;
display << "of our discontent" << endl;
display << "made glorious summer" << endl;
display << "by this son of York." << endl;
display.display();
delay(5000);
display.clearDisplay();
display.display();
delay(5000);
//code for 7 segment display
for (int i = 0; i < 255; i++)
{
module.setDisplayToDecNumber(i, 0, false);
delay(100);
}
//code for 7 segment buttons
buttons = module.getButtons(); // read which buttons are pressed
module.setDisplayToDecNumber(buttons, 0, false); // output the decimal number represented by the buttons
}
my screen displays the test message, and the 7 segment clock also counts up from 0 to 255 but when i press the buttons on the 7 segment board nothing happens why?!