Asked
— Edited
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...Code:
#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.
Code:
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...
Code:
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.
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.
Code:
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.
Code:
I sure do. The website has technical data for these displays as well.
LCD05 displays
Technical documentation
Code:
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.