battery meter
Posted: Thu Jun 16, 2011 7:36 pm
hi all i have been trying to design a battery meter going from 1 -6v during simulation with flowcode it works as expected but when i try to compile to a hex code i get the following message
C:\Documents and Settings\bob\My Documents\battery meter.c(449): error: can't convert 'float' to 'unsigned char'
C:\Documents and Settings\bob\My Documents\battery meter.c(449:9): error: failed to generate expression
battery meter.c success
failure
..
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
i have the ADC to read as voltage but from the errors above it seems i need to do some thing to the "float" in the variables can anyone shed any light on where i have gone wrong please cheers
C:\Documents and Settings\bob\My Documents\battery meter.c(449): error: can't convert 'float' to 'unsigned char'
C:\Documents and Settings\bob\My Documents\battery meter.c(449:9): error: failed to generate expression
battery meter.c success
failure
..
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
i have the ADC to read as voltage but from the errors above it seems i need to do some thing to the "float" in the variables can anyone shed any light on where i have gone wrong please cheers