Float number output


in c syntax formating float number print 3 digits after decimal
code: [select]
printf("%.3f", variable);

the arduino doesn't seem understand syntax.  

please help

the arduino prints through serial object, uses serial/uart of microchip.

you can see output in serial monitor.
code: [select]

void setup(){
 serial.begin(9600);
 float x = 3.1415;
 serial.println(x);
}

void loop(){/*no loop*/}



Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Float number output


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums