Float Arrays get corrupted on Teensy 3.6

Status
Not open for further replies.

Beervangeer

Active member
Hi there,

I started to have some troubles with one of my projects.

Suddenly my floats in a array start to do funky.

The first number in the float array is fine.
But all the other floats are being misplaced two decimals.

See the screen capture of the monitor + script.
Please help!

Capture.JPGCapture2.JPG
 
Hi there,

I started to have some troubles with one of my projects.

Suddenly my floats in a array start to do funky.

The first number in the float array is fine.
But all the other floats are being misplaced two decimals.

give your computer some help by slowing down the teensy!
Seriously, see if inserting a small delay (delay(1) or delay(10)) in the loop() function helps;
 
The print()'s are not being separated. Trying adding:
Serial.print(",");

Also, FYI: 'x = 50' is an integer assignment, = 50.0 is a double [floating point], and 50.0f is a float assignment.
 
Status
Not open for further replies.
Back
Top