Asked
— Edited
Display Ez-B V4 Info On Lcd Display
Any ideas in how can I display my v4's CPU temp and battery voltage on an LCD05 16x2 display? I looked for possible variables to do something like the following but couldn't find any...
#NOTE: Non working code's for example
#purposes only
i2cwrite(0,0xc6,0,1,4,12,19,30,230,31,255,"CPU temp is " + $CPUtemp)
#or
i2cwrite(0,0xc6,0,1,4,12,19,30,230,31,255,"Battery voltage is " + $BatteryVoltage)
Any ideas guys as I'm not sure what to do next to create a variable to be read and displayed on the LCD?
Thanks.
There are script commands for this (from the script manual):
Alan
Thanks for the reply Alan.
Lol, yep, completely overlooked that. Thanks for that Alan. Very much appreciated.
For anyone else who may be looking do do this, make a script with the following...
This script could be in a script manager and the CPU temp at that point will be displayed when it is run. (See next post for advice on automatically updating the temp).
Steve.
If you only put that in the init, you will only ever have the value on startup. You'l either need a loop or a waitforchange to keep it updated.
Alan
@Alan.
Good point. Although I kinda meant put the "Init" in a connection script, and run the display temp script when desired, but I see what you mean now. I've edited the post above to make that a bit clearer. Thanks again buddy. The way I'm using it is to scroll through different information (time, date, voltage, CPU ect) every few seconds.
One quick question, on the message script, what do I need to add to get it to display "Celsius" or "Volts" after the variable so it displays, for example, "v4 battery is at 7.2 volts"? At the moment, it's just displaying the 7.2.
Not to worry. I figured it out.
@Steve, do you have a link on where to buy/more information on the "LCD005" display?
@69developer.
I sure do. The website has technical data for these displays as well.
LCD05 displays
Technical documentation
I use;
Loop that with a 1000ms sleep or flip flop between voltage and temp. Melvin cycled through voltage, temperatures, time and date changing every 5000ms which looked fine, worked well and kept the demand down.