Devices & Components
Arduino Uno Rev3
16x2 LCD display with I²C interface
SparkFun 7-Segment Serial Display - Red
Jumper wires (generic)
Software & Tools
Arduino IDE
Project description
Code
Untitled file
c_cpp
Cange the pins to suit your board
1#include <TM1637.h> 2#include <Wire.h> 3#include <LiquidCrystal_I2C.h> 4 5LiquidCrystal_I2C lcd(0x27, 20, 4); // set the LCD address to 0x27 for a 16 chars and 2 line display 6 7 8 9// Instantiation and pins configurations 10// Pin 3 - > DIO 11// Pin 2 - > CLK 12TM1637 tm(2, 3); 13 14void setup() 15{ 16 tm.begin(); 17 tm.setBrightness(2); 18 lcd.init(); 19 // Print a message to the LCD. 20 lcd.backlight(); 21 lcd.setCursor(1, 0); 22 lcd.print("The year is..."); 23 lcd.setCursor(2, 1); 24 lcd.print(""); 25} 26 27void loop() 28{ 29 // Display Integers: 30 tm.display("2021"); 31}
Downloadable files
untitled
Change the pins to suit you
untitled
untitled
Change the pins to suit you
untitled
Comments
Only logged in users can leave comments