Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Issues when using PlatformIO & Teensy2.0++ #11

Open
Majumafoo opened this issue Jan 27, 2022 · 0 comments
Open

Library Issues when using PlatformIO & Teensy2.0++ #11

Majumafoo opened this issue Jan 27, 2022 · 0 comments

Comments

@Majumafoo
Copy link

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)
@Majumafoo Majumafoo changed the title Library Issues when using PlatformIO Library Issues when using PlatformIO & Teensy2.0++ Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant