Hello, i’m trying to build a system with a LCD display 20x4… the backlight is on and can blink, but nothing seem to be on.
I’m using an arduino mega 2650 R3 and every wire are on the good parts: 5V, GND, SDA and SCL… But nothing is happenning.
Whan it will be done, i want to display some RFID informations on it (that is why the RFID), and play some sound.
I’m using the liquid crystal ISC librairy… Do you have any idea about it?
here is my code:
#include <MFRC522.h>
#include <Wire.h>#include <LCD.h>
#include <LiquidCrystal_I2C.h>#include <SD.h> // Inclure la librairie SD
#define SDPIN 10 // Chip Select du lecteur SD
#include <TMRpcm.h>#define ALL 1
#define RFID 2
#define RFID2 3
#define LOOP 5
#define DEBUG RFID#define RST_PIN 5 // Configurable, see typical pin layout above
#define SS_1_PIN 30 // Configurable, take a unused pin, only HIGH/LOW required, must be diffrent to SS 2
#define SS_2_PIN 31 // Configurable, take a unused pin, only HIGH/LOW required, must be diffrent to SS 1#define NR_OF_READERS 2
#define NR_OF_UIDS 1
#define EXIT_READER_INDEX 0#define WIDTH 20
#define HEIGHT 4File myFile;
TMRpcm tmrpcm;LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
//String uid_list[NR_OF_UIDS] = {“F6 39 4E 39”,“F6 39 4E 39”};
String uid_list[NR_OF_UIDS] = {“F6 39 4E 39”};byte ssPins = {SS_1_PIN, SS_2_PIN};
MFRC522 mfrc522[NR_OF_READERS]; // Create MFRC522 instance.
void setup() {
Serial.begin(9600); // Initialize serial communications with the PC
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)SPI.begin(); // Init SPI bus
for (uint8_t reader = 0; reader < NR_OF_READERS; reader++) {
mfrc522[reader].PCD_Init(ssPins[reader], RST_PIN); // Init each MFRC522 card
Serial.print(F("Reader “));
Serial.print(reader);
Serial.print(F(”: "));
mfrc522[reader].PCD_DumpVersionToSerial();
}
speakerSetup();lcd.begin(20, 4);
lcd.setCursor(0, 0);lcd.backlight();
delay(250);
lcd.noBacklight();
delay(250);
lcd.backlight();
lcd.home ();
lcd.setCursor(3, 0);
lcd.print(“System Starting…”);
delay(1000);
}void loop() {
rfid_loop();
//lcd.write(Serial.read());
lcd.print(“System online”);}