Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 1 of 1

Thread: Using the MPU9250 with a complex sketch running 8 motors via UART. Compatibility

  1. #1
    Senior Member
    Join Date
    Dec 2016
    Location
    Buena Park ca
    Posts
    124

    Using the MPU9250 with a complex sketch running 8 motors via UART. Compatibility

    I developed this huge sketch for running a walking robot. 8 motors interfaced by 4 Serial ports.
    Everything refreshes at 10 mS. Reading encoders, sending commands.

    The time came to ad an IMU, every robot must balance dynamically, not just repeat mechanical motions.

    The IMU works fine if I run it every 200mS , (see Read_Mitch_IMU() but thats super slow. I'd want to run it at 10mS so I have time to react to imbalance ....

    If I read encoders the IMU simply won't start, unless I power the motors after I start the teensy 4.1.

    Even then, When I send commands to the motors, they are all berserk and erroneous if the IMU refresh is active...

    What to do, Can we all get along?
    Thanks

    Sorry for the big sketch, but that is what is it takes.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screen Shot 2020-09-28 at 8.02.14 PM.jpg 
Views:	7 
Size:	111.1 KB 
ID:	21896  
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •