I got an LCD hooked up to my particle photon (via the digital pins - not using I2C)
Had really good success with writing normal characters to the screen. Got the idea of saving writing space by using special characters. but it doesn’t work…
Tried this:
https://www.arduino.cc/en/Reference/LiquidCrystalCreateChar
#include <LiquidCrystal.h>
LiquidCrystal lcd(5, 4, 3, 2, 1, 0);
byte smiley[8] = {
B00000,
B10001,
B00000,
B00000,
B10001,
B01110,
B00000,
};
void setup() {
lcd.createChar(0, smiley);
lcd.begin(16, 2);
lcd.write(byte(0));
}
void loop() {}
but it gave me an error with the byte(0) call and with the B#####
Then I tried this:
This worked without errors, but gave a strange character…
https://omerk.github.io/lcdchargen/
#include <LiquidCrystal.h>
// initialize the library
LiquidCrystal lcd(5, 4, 3, 2, 1, 0);
byte customChar[8] = {
0b01110,
0b10101,
0b11111,
0b01010,
0b01110,
0b00100,
0b11111,
0b11111
};
void setup()
{
// create a new custom character
lcd.createChar(0, customChar);
// set up number of columns and rows
lcd.begin(16, 2);
// print the custom char to the lcd
// why typecast? see: http://arduino.cc/forum/index.php?topic=74666.0
lcd.write((uint8_t)0);
}
void loop()
{
}
Wanted this character
but got this