# XRP Robot - Upgraded to MicroPython 1.21.0 and drivetrain() function does not work

**URL:** <https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113>\
**Category:** General\
**Created:** [October 26, 2023, 11:09pm UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113 "2023-10-26T23:09:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfong21](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@sfong21](https://xrp.discourse.group/u/sfong21)\
**Post date:** [October 26, 2023, 11:09pm UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/1 "2023-10-26T23:09:31Z")

</div>

Recently, I have upgraded micropython on the XRP robot from v1.20 to v1.21. This update provides support for the bluetooth library. After upgrading, the drivetrain() functions in the XRPexamples are not running properly. The motors on the XRP does not move. I tested the installation\_verification.py and drive\_examples.py. May I ask, is anyone else experiencing this issue?

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [October 29, 2023, 4:13am UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/2 "2023-10-29T04:13:50Z")

</div>

We are in the process of doing a full testing with v1.21. We will post here when done and let you know if any updates are needed.

---

<div class="post-metadata">

**Author:** ![sfong21](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@sfong21](https://xrp.discourse.group/u/sfong21)\
**Post date:** [October 30, 2023, 1:06pm UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/3 "2023-10-30T13:06:54Z")

</div>

Happy Monday. Frank, thank you for this update.

During our training sessions, we will continue to use micropython 1.20.

Steven

---

<div class="post-metadata">

**Author:** ![gspivey](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@gspivey](https://xrp.discourse.group/u/gspivey)\
**Post date:** [November 15, 2023, 3:29am UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/4 "2023-11-15T03:29:11Z")

</div>

Thank the Lord - I am going out of my mind here. Cannot seem to get the motors to do anything - can set the pins to go up and down myself … but I had been working on another driver for a bit (among other things) and had no idea when the drivetrain quite working. So glad to see somebody else has the same problem. I can make my motors work by setting direct pin values on the enable pins - but the whole drivetrain/motor stuff is useless right now.

Has there been any update on this?

---

<div class="post-metadata">

**Author:** ![gspivey](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@gspivey](https://xrp.discourse.group/u/gspivey)\
**Post date:** [November 15, 2023, 4:06am UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/5 "2023-11-15T04:06:28Z")

</div>

And just to update - I rolled back to Micropython 1.20 and everything worked - moved forward to the 11/13 preview build of 1.22, and that did NOT work (behaved just like 1.21)  
So - I too will be using micropython 1.20 until notified of the fix.

---

<div class="post-metadata">

**Author:** ![k.siegall](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@k.siegall](https://xrp.discourse.group/u/k.siegall)\
**Post date:** [November 15, 2023, 8:36pm UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/6 "2023-11-15T20:36:09Z")

</div>

The fix for this was to set the PWM frequency manually, since between 1.20 and 1.21 they seems to have removed/changed what the default value was (used to be 50Hz). That change has already been merged into main on the git repo, and we’re just waiting for finalized changes on the IDE before we push that patch formally

---

<div class="post-metadata">

**Author:** ![jrw4561](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/jrw4561/32/66_2.png) [@jrw4561](https://xrp.discourse.group/u/jrw4561)\
**Post date:** [December 8, 2023, 6:24pm UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/7 "2023-12-08T18:24:54Z")

</div>

Edit: This work around is no longer relevent.

I needed 1.21 for my project so I looked at the changes in the XRP git repo and found a work around. I mention it in my [pestolink instructions](https://github.com/AlfredoSystems/PestoLink-MicroPython).

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [December 8, 2023, 8:15pm UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/8 "2023-12-08T20:15:21Z")

</div>

Release 1.0.1 of XRPCode and XRPLib was released today. Next time you attach to XRPCode it will update your XRP to the latest.

---

<div class="post-metadata">

**Author:** ![jrw4561](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/jrw4561/32/66_2.png) [@jrw4561](https://xrp.discourse.group/u/jrw4561)\
**Post date:** [December 9, 2023, 1:52am UTC](https://xrp.discourse.group/t/xrp-robot-upgraded-to-micropython-1-21-0-and-drivetrain-function-does-not-work/113/9 "2023-12-09T01:52:49Z")

</div>

This is great news! I see there are a number of improvements in 1.0.1. Thank you Frank.
