Comments (9)
Any chance of code to fix this?
I wanna input a variable at the end of the text, so it appears like this:
system temp:
20*C
But! the cursor pos doesn't shift. and I cant figure out a way to get the variable into the original string, i.e:
"System Temp:\n <VARIABLE HERE"
from adafruit_circuitpython_charlcd.
you can subscibe to this issue to be notified when it'll be added, but its jsut a placeholder for now, we don't have an ETA when we'll get to it. if you figure out how, submit a pull request and we'll check it out :)
from adafruit_circuitpython_charlcd.
@n0xy1 Would Python string formatting help? https://pyformat.info/
from adafruit_circuitpython_charlcd.
I definitely support having a 2nd message function that doesn't touch the current cursor position. Alternatively an additional boolean parameter in the original function could be used to turn the current behaviour off. That parameter could be defaulted to the current behaviour so no existing code would break.
in the mean time and in response to n0xy1, here is my work-around. Just define our own message function like that (yeah, i know one isn't supposed to call "_names" but in a crunch what can you do)?
def Kludge(col,row,txt):
lcd.cursor_position(col,row)
for c in txt:
lcd._write8(ord(c),True)
use like this to write the string "hello" starting from the 4th char position on row 2 without touching anything else already displayed:
Kludge(3,1,'hello')
from adafruit_circuitpython_charlcd.
Any movement on this? Last year for a class I run in the spring I was able to have students use the library to display text on two lines of a 16x2 lcd at any position by using .set_cursor()
. Now that it is .cursor_position()
it does not work. It seems that the message
command ignores that position set by .cursor_position()
.
from adafruit_circuitpython_charlcd.
I just created a request to make a change that seems to fix this issue. I tested it with my assignment from last year and it worked.
from adafruit_circuitpython_charlcd.
My request was just approved. It is referred to as column_align, but it also makes cursor_position work for the next message before resetting to 0,0.
from adafruit_circuitpython_charlcd.
I just updated the release notes to include that @profbrady.
from adafruit_circuitpython_charlcd.
Fixed by #37
from adafruit_circuitpython_charlcd.
Related Issues (20)
- Unresolved import HOT 4
- Backlight not turn on HOT 4
- MemoryError on Metro M0 Express HOT 12
- Need to allow alternate I2C addresses HOT 1
- No module named 'adafruit_mcp230xx' HOT 1
- RemoteDisconnect Issue HOT 8
- When using digitalio for RGB control on RPi, list values must be more than 1 to actually turn on corresponding LED HOT 4
- Error in docs HOT 2
- Message draw slow compared to legacy library (Adafruit_CharLCDPlate) HOT 11
- LCD with i2c backpack blinks but no text HOT 4
- Sending Digit 2 Turns Backlight Off HOT 1
- Rasberry pico HOT 1
- Row Offsets for 16x4 display.
- Could not display degree sign properly HOT 1
- Missing Type Annotations HOT 1
- While using the i2c/SPI LCD Backpack Maximum recursion depth exceeded HOT 3
- Can I used it with Nvidia Jetson Xavier NX HOT 1
- Library uses short argument names
- Name Mismatch in Circup
- ValueError: incompatible .mpy file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_circuitpython_charlcd.