I’m struggling to send text to my 1602 16x2 LCD screen from the photon dev board. I’ve been all over this forum checking the old posts and giving each suggestion a try.
I’ve got: (Left is LCD, right is photon)
RS = D0
Enable = D1
Pin D4 = D2
Pin D5 = D3
Pin D6 = D4
Pin D7 = D5
#include "application.h"
#include "LiquidCrystal/LiquidCrystal.h"
// Make sure to update these to match how you've wired your pins.
// pinout on LCD [RS, EN, D4, D5, D6, D7];
// pin nums LCD [ 4, 6, 11, 12, 13, 14];
// Shield Shield [RS, EN, D4, D5, D6, D7];
// Spark Core [D3, D5, D2, D4, D7, D8];
LiquidCrystal lcd(D0, D1, D2, D3, D4, D5);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16,2);
// Print a message to the LCD.
lcd.print("Hello, Sparky!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
/* Comment begin lcd.setCursor(0, 1);
lcd.print("Step 1");
lcd.setCursor(0, 1);
lcd.print("Initialize");
delayMicroseconds(3000);
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("Step 2");
lcd.setCursor(0, 1);
lcd.print("Print text");
delayMicroseconds(3000);
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("Step 3");
lcd.setCursor(0, 1);
lcd.print("Setup Complete");*/ Commented out for the moment
}