Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Character LCD backpack not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Character LCD backpack not working

by kelvinhall05 on Thu Aug 27, 2020 11:30 am

Hi guys. Several months back I converted a Sharp PA1000H into a working keyboard and I wanted to keep the functionality of the LCD (albeit with a modern backlit one) so I used an LCD character backpack so I can control the LCD over i2c. Hardware install went smoothly and clearly it's at least sort of working as I can see the top row of the character LCD filled with solid black boxes, but the demo program I used is the "hello world" program included as an example with the Arduino library for this LCD backpack. The problem is, I can't get any more beyond that. Maybe this is because I'm using a Pro Micro, but I've wired everything up properly and the backpack is getting 4.7v at the power input so I think there is a software problem somewhere.

I should also mention that I was having trouble directly flashing the Pro Micro from Arduino IDE so I exported a compiled binary (.hex) and flashed that with avrdude (no problems).

Does anyone have any suggestions for further troubleshooting and/or testing? My end goal is to have the display pull temperature and/or hardware utilization data from my PC running Arch and display it on the LCD, but for now I just want to make sure everything is working. Hopefully this post makes sense :) Thanks!

kelvinhall05
 
Posts: 2
Joined: Thu Aug 27, 2020 11:24 am

Re: Character LCD backpack not working

by franklin97355 on Thu Aug 27, 2020 10:50 pm

It could be that the binary does not address the LCD second row. Do you have the program you were trying to load for us to look at? Also the upload problem should be figured out before the code is blamed.

franklin97355
 
Posts: 21607
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Character LCD backpack not working

by kelvinhall05 on Thu Aug 27, 2020 11:15 pm

franklin97355 wrote:It could be that the binary does not address the LCD second row. Do you have the program you were trying to load for us to look at? Also the upload problem should be figured out before the code is blamed.

Thanks for your reply. This is the error I get when flashing. This would suggest some sort of permission error, but it doesn't work when running Arduino IDE as root; the permission error goes away and it says "done uploading", but still nothing happens beyond the black rectangles.
Code: Select all | TOGGLE FULL SIZE
   at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
   at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
   at processing.app.SketchController.upload(SketchController.java:732)
   at processing.app.SketchController.exportApplet(SketchController.java:703)
   at processing.app.Editor$UploadHandler.run(Editor.java:2055)
   at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: processing.app.SerialException: Error touching serial port '/dev/ttyACM0'.
   at processing.app.Serial.touchForCDCReset(Serial.java:107)
   at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
   ... 5 more
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Permission denied.
   at jssc.SerialPort.openPort(SerialPort.java:170)
   at processing.app.Serial.touchForCDCReset(Serial.java:101)
   ... 6 more

And here is the code I'm using (just an example included with the library):
Code: Select all | TOGGLE FULL SIZE
//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
{
  lcd.init();                      // initialize the lcd
  // Print a message to the LCD.
  lcd.backlight();
  lcd.setCursor(3,0);
  lcd.print("Hello, world!");
  lcd.setCursor(2,1);
  lcd.print("Ywrobot Arduino!");
   lcd.setCursor(0,2);
  lcd.print("Arduino LCM IIC 2004");
   lcd.setCursor(2,3);
  lcd.print("Power By Ec-yuan!");
}


void loop()
{
}

I've attached the library I'm using.
LiquidCrystal_I2C-master.zip
(8.91 KiB) Downloaded 1 time

kelvinhall05
 
Posts: 2
Joined: Thu Aug 27, 2020 11:24 am

Please be positive and constructive with your questions and comments.