i
Microcontroller | ATmega328P |
---|---|
Operating Voltage | 5V |
Input Voltage | 7-12V (recommended) |
Digital I/O Pins | 14 (6 provide PWM output) |
Analog Input Pins | 6 |
Flash Memory | 32 KB (0.5 KB used by bootloader) |
SRAM | 2 KB |
EEPROM | 1 KB |
Clock Speed | 16 MHz |
Dimensions | 68.6mm × 53.4mm |
Interface | Pins | Protocol |
---|---|---|
Serial | 0 (RX), 1 (TX) | UART |
I2C | A4 (SDA), A5 (SCL) | TWI |
SPI | 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK) | Serial Peripheral Interface |
This guide explains how to display "Welcome to Fab Academy" on a 16x2 LCD using an Arduino and the Adafruit_LiquidCrystal library.
This image shows a 16x2 LCD Display connected to an Arduino, demonstrating basic display functionalities.
LCD Pin | Arduino Pin |
---|---|
VCC | 5V |
GND | GND |
SDA | A4 (Uno) / 20 (Mega) |
SCL | A5 (Uno) / 21 (Mega) |
#include <Adafruit_LiquidCrystal.h> int seconds = 0; Adafruit_LiquidCrystal lcd_1(0); void setup() { lcd_1.begin(16, 2); lcd_1.print("Welcome to Fab"); lcd_1.setCursor(0, 1); lcd_1.print("Academy"); delay(2000); lcd_1.clear(); } void loop() { lcd_1.setCursor(0, 0); lcd_1.print("Time (sec): "); lcd_1.setCursor(11, 0); lcd_1.print(seconds); lcd_1.setBacklight(1); delay(500); lcd_1.setBacklight(0); delay(500); seconds++; }