Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: serial.print shows wrong float numbers on: February 05, 2013, 07:08:34 am
Thank you for your hints.
I took the above code into my sketch ( I put it into the "loop") compiled it on WIN XP:
I get these results:
3
3.1
3.14
3.142
3.1416
3.14159
3.141593
3.1415927
3.14159274

     TEMP= 142768.03     ALTITUDE= -14634452.00m     1-Normdruck=  318159.0    bei 135.00m




then I took the Arduino to WIN7:
first I got the same strange results....
3
3.1
3.14
3.142
3.1416
3.14159
3.141593
3.1415927
3.14159274

     TEMP= 142770.59     ALTITUDE= -14627349.00m     1-Normdruck=  316493.2    bei 135.00m
3
3.1
3.14
3.142
3.1416
3.14159
3.141593
3.1415927
3.14159274

     TEMP= 142770.70     ALTITUDE= -14626947.00m     1-Normdruck=  316399.8    bei 135.00m
3
3.1
3.14
3.142
3.1416
3.14159
3.141593
3.1415927
3.14159274

     TEMP= 20.11     ALTITUDE= 167.00m     1-Normdruck=  1009.5    bei 135.00m
3
3.1
3.14
3.142
3.1416
3.14159
3.141593
3.1415927
3.14159274

     TEMP= 20.22     ALTITUDE= 166.80m     1-Normdruck=  1009.5    bei 135.00m



but suddenly the serial out gave correct floating numbers
this is absolutly strange!
I did not compile the code again on WIN7
Could thes line be the problem
Serial.print(getAltitude(Pressure, Temperature));
maybe the output is the pointer to the function?

2  Using Arduino / Programming Questions / Re: serial.print shows wrong float numbers on: February 04, 2013, 03:00:39 am
I have attached my code.
I use a Arduino pro mini board, which is conneted to the PC by an CP210X USB2UART connector
I have installed the latest driver on both machines (WIN7 and WIN XP)
I use the Serial Monitor on both machines and I tried also with HTerm.exe (hyperterminal) which shows always the same,
on WIN7 everything is OK, on Win XP floating numbers are wrong.
3  Using Arduino / Programming Questions / serial.print shows wrong float numbers on: February 01, 2013, 08:44:09 am
Hello,
I am new to Arduino.
I have a set up a project reading a MS5611 baro board.
Everthing works fine on my Win7 installation, but when i connect the board to XP I get bad output on my serial monitor
Win XP output:
Temp:142767.2 Altitude:-14628628.0m Normdruck: 316851.90 bei 135.00m
Win 7 output:
Temp:24.5 Altitude:103.4m Normdruck: 1006.6 bei 135.00m

floating point numbers are wrong, string is OK.
the connection Arduino to PC is done by cp210x usb-serial adapter.
Everthing is setup equal on XP and Win7.
Any idea what wrong here?
Pages: [1]