Here's some sample code (note: will not compile) just to give you an idea:
- /*
- * Arduino LCD
- */
- #include <LiquidCrystal.h>
- /* Menu */
- #define MOVECURSOR 9 // Basically the same thing as const [whatever]
- const int contrast = 20; // min. PWM value
- const int menuTimeout = 10000; // time to timeout in a menu when user doesn't do anything.
- LiquidCrystal lcd(1, 2, 4, 5, 6, 7); // Arduino pins ~ creates LC object.
- // Parameters: (rs, enable, d4, d5, d6, d7) // LCD pins
- void setup() { // Setups things like bit rate or to change pins to output
- lcd.begin(totCols,totRows); // (width, height)
- }
- void loop() { // Iterates forever once loaded on Arduino
- lcd.setCursor(0,0);
- lcd.print("Effective Altruism movement");
- }
- lcd.noCursor();
- lcd.clear();
playground.arduino.cc/Main/TimerPWMCheatsheet
Extra - forum.arduino.cc/index.php?topic=207772.0
Toggle backlight link.
Bonus - Tinkercad keyboard + LCD
------------------------------PINOUT------------------------------
Delta_G recommends using his menu:
If using, this post helps:
- https://forum.arduino.cc/index.php?topic=358066.msg3841709#msg3841709
Here is the discussion on it:
- https://forum.arduino.cc/index.php?topic=561064.30