I've made a change to the 1602 OLED library and also added a new function.
I've modified the sendString() function to now include the cursor position data and added a new function called sendFloat(), this allows you to send float data values, such as temperature, to the LCD ant it gets converted to a string before being sent to the display.
The sendFloat function takes the following parameters: float value, minimum length inc. decimal point, number of positions after the decimal point, the start column position, the start row position.
I've updated the library in my GitHub repository here
Please note that older sketches using the sendString() function will not work with the new library and will need to be altered.
Demo sketch to display Strings and float values on the OLED
1602 display from Wide.HK. This uses a Lbrary that I've
put together containing some basic functions.
The I2C Address is set to 0x3C in OLedI2C.cpp
Phil Grant 2013 www.gadjet.co.uk
digit = 21.6;//This would normally be the float value returned from a temp sensor or other sensor
LCD.sendString("Temp",0,0);// now includes the cursor position data (col, row)
LCD.sendFloat(digit,5,2,7,0);//Send the string to the display
Following on from the first blog about the hot water heating control here's what I put together for the mounting. Whilst looking for a...
When I made the smaller screw on sensor that connected to the PC and fed the timing into a PC application, it got me thinking about differen...
A few people have expressed interest in making a DIY chronograph so I said I'd put together a shopping list. There are quite a few opt...
As anyone who's read this blog before will know, there's a common theme throughout, the DIY Chronograph I made for measuring the spe...