-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
Obligatory “I’m new, please be gentle”
Problem
When I upload code from PlatformIO, the characters displayed on the lcd are wrong/corrupted garbage. The output is always the same.
Identical code works fine when uploaded from the Arduino IDE
Below is relevant system info, followed by ideas I’ve had
Hardware Information
Windows 10, 64 bit, version 21H2
VS Code version 1.63.2
Using Teensy 2.0++
Teensy Loader v1.55
Code
Identical code works properly when uploaded with Arduino IDE
The issue can also be remodied by using the standard Arduino LCD library (arduino-libraries/LiquidCrystal@^1.0.7)
main.cpp
#include <Arduino.h>
#include <Wire.h> // Necessary to avoid library dependencies issue in VS Code -that’s a different issue
#include <LiquidCrystal.h>
const int RS = 18, EN = 19, D4 = 23, D5 = 24, D6 = 25, D7 = 26;
LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);
void setup() {
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“anything”);
}
void loop() {
}
platformio.ini
[env:teensy2pp]
platform = teensy
board = teensy2pp
framework = arduino
lib_deps =
fmalpartida/LiquidCrystal@^1.5.0
Ideas
- I’ve attempted creating a new, clean project and removing any unnnecessary code.
- My project has 2 LCDs connected to the same pins on the Teensy. It's interesting to note that both displays show different things, but consistentlyl the same different things.
Things that stop the misbehaviour
- uploading identical code using the Arduino IDE
- The standard Arduino LCD Library works as expected (arduino-libraries/LiquidCrystal@^1.0.7)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels