MPU6050

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
chipfryer27
Valued Contributor
Posts: 1149
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 286 times
Been thanked: 412 times

Flowcode v9 MPU6050

Post by chipfryer27 »

Hi

Although flagged as v9 and example is written for v9 if opened in v10 it affects it too.

Basic chart simulating the MPU6050 component. It initialises then enters a loop. Inside the loop it samples the sensor then Gets all readings as both floating point and integer values.

Simulation speed = fast (with updates)

Temperature:
Component shows range of -40 to +80 and component display varies between -40 and +40
Floating point = 36.415xxx to 36.762xxx
Integer = constant 36

Gyro:
Component shows range of -250 to +250 and component display varies between -250 and +250
Floating point = -249.992xx to +249.992xx
Integer = -32766 to 32766
Above is for x/y/z with each axis returned to zero before next

Accelerometer:
Component shows range of -2 to +2 and component display varies between -2 and +2
Floating point = constant 0.0
Integer = -32766 to 32766
Above is for x/y/z with each axis returned to zero before next

As you can see there are issues in reading both temperature and Accelerometer "Real" values

MPU6050_test_v9.fcfx
(14.49 KiB) Downloaded 79 times

Regards

medelec35
Matrix Staff
Posts: 1452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: MPU6050

Post by medelec35 »

Thank you for testing and letting us know.
I will see if I can spot what's going on and fix the component
Martin

medelec35
Matrix Staff
Posts: 1452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: MPU6050

Post by medelec35 »

Hi.
If you are happy with the fix, the component modification will be pushed onto the update system ASAP.
If would you like to test before then, browse to this location using File Explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV10\Components
Replace the existing file with the attached file.
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten.
Can you let me know if it works for you, please?
Attachments
MPU6050.fcpx
(5.83 KiB) Downloaded 78 times
Martin

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 286 times
Been thanked: 412 times

Re: MPU6050

Post by chipfryer27 »

Hi

Just tried in v10 and it seems to be fine :). Hope to try on hardware later in the week.

Thanks
Regards

medelec35
Matrix Staff
Posts: 1452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: MPU6050

Post by medelec35 »

Thanks for that.
Simulation working is a step in the right direction.
Fingers crossed for the hardware.
Martin

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 286 times
Been thanked: 412 times

Re: MPU6050

Post by chipfryer27 »

Hi

Just a quick note to say I get readings on hardware too.

Regards

Post Reply