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?
From Win7 to XP do you just pull the USB connector out of the Win 7 machine and into the XP machine? Or do you have two separate setups, one connected to a Win 7 machine and the other one to a XP machine?
Suggest you post your code, and also write a test sketch that just prints out hard-coded values similar to the ones you're seeing here. At the moment it's not clear whether the problem is the sketch printing rubbish, or the valid output being scrambled (somehow very selectively) before it reaches the PC. Neither seems likely, so you need to simplify the test system and eliminate some assumptions.
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.
No problem. Nothing compared to some howlers that I have posted.
Luckily I had a spare int here so was able to run the code and I can confirm that it works as expected for me.
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= 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?
I guess the print of a float is not the problem but the sensor is not working correctly on the XP machine. My guess is your XP machine is not delivering enough power to the USB for your circuit. Have you tried powering your Arduino with an external power supply?
I had the same problem some time back and seem to remember that this was a code problem to do with not using bitshifting. Has the code been posted? I would be surprised if it was a hardware problem .
Best
Vanja
I got this sort of rubbish from my BMP085, which was working six month ago.
After a lot of mucking around, I eventually came to the conclusion that I had
someone ruined the chip, maybe connected 5V to it or something.
The communication was working but the measurements were rubbish.