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