Serial LCD 1.1 slcd.print API problem

I can’t get this form of the slcd.print function to work - slcd.print(float_data,2);//show float data,Decimal digits(1-3)
When I try slcd.print(float_data,1); it hangs an Arduino 1.0.

I can’t confirm this. I use this code:

#include <SoftwareSerial.h>
#include "SerialLCD.h"

SerialLCD slcd(11,12);

void setup() {
  slcd.begin();
}

void loop() {
  slcd.setCursor(0, 1);
  float x = 754.321;
  slcd.print(x, 2);
  slcd.print(x, 1);
}

What version of SerialLCD library did you use? The one for arduino 1.0?
seeedstudio.com/wiki/images/ … ialLCD.zip

Any error message from arduino ide?

I tried using the library that you referenced and it does fix this problem. However, a new one now occurs with another form of slcd.print. This time, slcd.print(digits, DEC);, where “digits” is declared integer, will not compile. The error is:

call of overloaded ‘print(int&, int)’ is ambiguous.

This function worked with my other library but doesn’t now. I’m using Arduino v 1.0.1. Any ideas?

Yeah, i also get this error.
Take a look in SerialLCD.h:

void print(uint8_t b);
void print(const char[]);
void print(unsigned long n, uint8_t base);
void print(float data,uint8_t num);

no procedure for integer, but just convert it to unsigned long.

Hi,
Anyone know how to resolt scld print float in Serial LCD V1.1? I try whit diferents librarys but dosen’t work.
I can show float in the serial port but the same instruccion, change serial.print for slcd.print it’s not working.

slcd.print(float_data,2);//show float data,Decimal digits(1-3)

Thanks for your time.