Page 1 of 1

SHT21

Posted: Sat Aug 09, 2014 6:38 pm
by hypamat
hi guys, ive been writing a program to show the readings from a SHT21 sensor, but im hitting problems, again :(

for some reason, im getting compiler errors, ive attached the fcfx file for you to see, it works in the simulation, but wont compile :( heres the errors:

Flowcode1.c(1135:28): error: arguments of 'FCD_04071_LCD__PrintString' don't match the parameters of call
Flowcode1.c(1135:2): error: failed to generate expression
Flowcode1.c(1143:28): error: arguments of 'FCD_04071_LCD__PrintString' don't match the parameters of call
Flowcode1.c(1143:2): error: failed to generate expression
Flowcode1.c success

failure
.
Completed BoostC compilation, return = 1

C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_16F.exe reported error code 1


FINISHED

thanks in advance,
matt

Re: SHT21

Posted: Sat Aug 09, 2014 7:32 pm
by dazz
Hi
look at the code box below in your program yo had

Code: Select all

humidity = hum 
as your variables were set as following

Code: Select all

string1  = string
hum =floating point
humidity = int
it would error as you were calling print string hum, so flowcode is telling you that you are trying to print a float as a string, to get it to compile and display etc use the code below

Code: Select all

string1 = FloatToString$ (hum)
this coverts your float(hum) to a string(string1), you will also have to change your printstring icon from hum to string1 try it :).
Not sure if you are aware but if you get compiling errors in flowcode at the bottom is an error screen, simply click on the error and flowcode will jump to the icon which is causing the issues
let us know how you get on

Regards
Dazz

Re: SHT21

Posted: Sat Aug 09, 2014 8:02 pm
by hypamat
oh brilliant!

thanks, that worked great :)
simple when you know how, aye?

thanks again,
matt