JohnDoneth / hd44780-driver

Implementation of the embedded-hal traits for the HD44780.
MIT License
37 stars 40 forks source link

i2c: Cannot write from a real String #56

Closed su-sd closed 4 days ago

su-sd commented 4 days ago

I want to write custom created strings to the lcd, like a countdown. While

lcd.write_str("HD44780!", delay)?;

works as expected (Text is shown, Cursor is blinking),

let addr = "Test".to_string();
lcd.write_str(&addr, delay)?;

results in a hang, where the LCD only shows _. I use a rp2040, not sure how to solve this.

su-sd commented 4 days ago

Hm, it seams like the problem is the string allocation. Sorry for the noise, I'll reopen if I fixed the allocation and the problem still exists.