# MicroPython error during installation verification

**URL:** <https://xrp.discourse.group/t/micropython-error-during-installation-verification/652>\
**Category:** Support\
**Created:** [March 23, 2025, 7:15pm UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652 "2025-03-23T19:15:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hipsterbrown](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hipsterbrown](https://xrp.discourse.group/u/hipsterbrown)\
**Post date:** [March 23, 2025, 7:15pm UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/1 "2025-03-23T19:15:16Z")

</div>

I have put together the v1 XRP kit and connected it to XRPCode. After successfully updating the firmware to XRPLib v2.0.1, I am unable to run the `installation_verification.py` in the XRPExamples directory. I see the following error in the MicroPython console:

```auto
Traceback (most recent call last):
  File "<stdin>", line 37, in <module>
  File "XRPExamples/installation_verification.py", line 1, in <module>
  File "/lib/XRPLib/defaults.py", line 18, in <module>
  File "/lib/XRPLib/encoded_motor.py", line 36, in get_default_encoded_motor
  File "/lib/XRPLib/motor.py", line 61, in __init__
ValueError: unknown named pin "MOTOR_L_IN_1"
Traceback (most recent call last):
  File "<stdin>", line 50, in <module>
  File "/lib/XRPLib/resetbot.py", line 43, in <module>
  File "/lib/XRPLib/resetbot.py", line 11, in reset_motors
  File "/lib/XRPLib/encoded_motor.py", line 36, in get_default_encoded_motor
  File "/lib/XRPLib/motor.py", line 61, in __init__
ValueError: unknown named pin "MOTOR_L_IN_1"

```

This is the firmware / lib version displayed in the REPL:

`MicroPython v1.25.0-preview.208.g1e83cd914 on 2025-01-14; SparkFun XRP Control Board V2 with RP2350`

I’m not sure where those pin aliases are stored. Can I get around this by replacing the unknown pin name with the GPIO number instead, i.e. IO30 or IO31?

---

<div class="post-metadata">

**Author:** ![hipsterbrown](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hipsterbrown](https://xrp.discourse.group/u/hipsterbrown)\
**Post date:** [March 23, 2025, 7:43pm UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/2 "2025-03-23T19:43:00Z")

</div>

Ok I think I’ve figured out the issue. After looking at all the available values on the `Pin.board` interface in the REPL:

```auto
from machine import Pin
>>> Pin.board.
CURRENT_M3 CURRENT_M4 CURRENT_ML CURRENT_MR
DIST_ECHO DIST_TRIG ENCODER_3A ENCODER_3B
ENCODER_4A ENCODER_4B ENCODER_LA ENCODER_LB
ENCODER_RA ENCODER_RB GP0 GP1
GP10 GP11 GP12 GP13
GP14 GP15 GP16 GP17
GP18 GP19 GP2 GP20
GP21 GP22 GP23 GP24
GP25 GP26 GP27 GP28
GP29 GP3 GP30 GP31
GP32 GP33 GP34 GP35
GP36 GP37 GP38 GP39
GP4 GP40 GP41 GP42
GP43 GP44 GP45 GP46
GP47 GP5 GP6 GP7
GP8 GP9 LED LED_RGB
LINE_L LINE_R MOTOR_3_IN1 MOTOR_3_IN2
MOTOR_4_IN1 MOTOR_4_IN2 MOTOR_L_IN1 MOTOR_L_IN2
MOTOR_R_IN1 MOTOR_R_IN2 NEOPIXEL PSRAM_CS
RADIO_CLK RADIO_CS RADIO_DIO RADIO_ON
RGB_LED SCL0 SCL1 SDA0
SDA1 SERVO_1 SERVO_2 SERVO_3
SERVO_4 USER_BUTTON VIN_MEAS WL_GPIO0
WL_GPIO1 WL_GPIO2

```

It looks like the expected pin names are different in MicroPython than the XRPLib. After updating all the defaults to the matching names on the Pin.board, the installation\_verification.py runs successfully.

I can submit a PR to the open source codebase later to see if this is the correct fix for everyone using the v1 XRP.

---

<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:** [March 25, 2025, 12:08am UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/3 "2025-03-25T00:08:52Z")

</div>

There is a problem that we are investigating that the XRP needs to be reset once after the update as there is an old version of part of the XRPLib that is not getting cleared from memory. After the reset things should run fine.

---

<div class="post-metadata">

**Author:** ![csunwc](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@csunwc](https://xrp.discourse.group/u/csunwc)\
**Post date:** [March 25, 2025, 10:01am UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/4 "2025-03-25T10:01:18Z")

</div>

I am new to XRP and micropython. I just assembled the SparkFun XRP kit. I got the same error when running “from XRPLib.defaults import \*”…  
ValueError: unknown named pin “MOTOR\_L\_IN\_1”  
How do I update Pin.board? Looks like something is corrupted in the lib.  
Please advise. Thanks.

---

<div class="post-metadata">

**Author:** ![csunwc](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@csunwc](https://xrp.discourse.group/u/csunwc)\
**Post date:** [March 25, 2025, 10:05am UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/5 "2025-03-25T10:05:12Z")

</div>

How do I reset XRP board V2 with RP2350? I tried power off and USB cable off. But I am still getting the same error with unknown named pin “MOTOR\_L\_IN\_1”. Please advise.

---

<div class="post-metadata">

**Author:** ![hipsterbrown](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hipsterbrown](https://xrp.discourse.group/u/hipsterbrown)\
**Post date:** [March 25, 2025, 1:57pm UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/6 "2025-03-25T13:57:08Z")

</div>

Here is my PR for the workaround at the moment: [fix(XRPLib): update pin names to match latest MicroPython machine config by HipsterBrown · Pull Request #82 · Open-STEM/XRP\_MicroPython · GitHub](https://github.com/Open-STEM/XRP_MicroPython/pull/82)

I’ll try out the reset using the button on the board after the update. I’ve run into that issue after updating those XRPLib files not taking effect after saving until resetting the board.

---

<div class="post-metadata">

**Author:** ![csunwc](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@csunwc](https://xrp.discourse.group/u/csunwc)\
**Post date:** [March 25, 2025, 2:29pm UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/7 "2025-03-25T14:29:59Z")

</div>

After hours of research, I found the solution: reflash with the latest firmware as of today.

1. reset flash memory w/ flash\_nuke.uf2  
[https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#resetting-flash-memory](https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#resetting-flash-memory)

2. flash w/ Sparkfun…UF2 aka micropython for XRP  
[MicroPython - Python for microcontrollers](https://micropython.org/download/SPARKFUN_XRP_CONTROLLER/)

3. run xrpcode.wpi.edu . it automatically updates XRP lib to 2.0.1 by copying files into 2 new directories…

end result:

> > > MicroPython v1.25.0-preview.402.g274c8c419 on 2025-03-25; SparkFun XRP Controller with RP2350

test file works !!!

---

<div class="post-metadata">

**Author:** ![SparkFro](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/sparkfro/32/12_2.png) [@SparkFro](https://xrp.discourse.group/u/SparkFro)\
**Post date:** [March 26, 2025, 9:26pm UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/8 "2025-03-26T21:26:39Z")

</div>

Hi there,

Sorry to hear y’all were having this problem! It seems like some boards may have been shipped out with the wrong version firmware. Not sure how that happened, we’re going to investigate this to ensure it doesn’t happen again in future production runs.

> This is the firmware / lib version displayed in the REPL:
> 
> `MicroPython v1.25.0-preview.208.g1e83cd914 on 2025-01-14; SparkFun XRP Control Board V2 with RP2350`

Thank you so much for posting this, very helpful! The boards from the first production run _should_ report `MicroPython v1.25.0-preview.beta06 on 2025-02-17; SparkFun XRP Controller with RP2350`. @Fgrossman Maybe we can add a special check to XRPCode to force a firmware update if `v1.25.0-preview.208.g1e83cd914 on 2025-01-14` is detected?

The reason for these error messages is because your boards have an outdated firmware version before we had finalized the pin names. The names used by XRPLib are correct, you just need to update your firmware to fix the pin names. See my other post here for how to do that:

> [@XRPCode IDE will not connect to XRP robot](https://xrp.discourse.group/t/xrpcode-ide-will-not-connect-to-xrp-robot/645/5):
>
> For now, you can download the XRP Controller firmware from here: [Releases · sparkfun/micropython · GitHub](https://github.com/sparkfun/micropython/releases) Go to the latest release, find the file for your XRP Controller (either beta or not), download it, and flash it to your board. Eventually, you’ll be able to download the latest firmware from here: [MicroPython - Python for microcontrollers](https://micropython.org/download/?vendor=SparkFun) Right now there are preview builds that are missing some upcoming features of MicroPython v1.25, but once that releases, I’d suggest downloading the firm…

Hope this helps!

---

<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:** [March 31, 2025, 7:36pm UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/9 "2025-03-31T19:36:06Z")

</div>

We want to thank you for bringing this problem to us. We put out an updated fix to XRPCode last night and it will now update to the correct version of MicroPython that matches with the XPRLib libraries under these conditions.

---

<div class="post-metadata">

**Author:** ![hipsterbrown](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hipsterbrown](https://xrp.discourse.group/u/hipsterbrown)\
**Post date:** [April 1, 2025, 1:27am UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/10 "2025-04-01T01:27:21Z")

</div>

Thank you for making the fix! I’ve confirmed loading up XRPCode updates MicroPython to the expected version `MicroPython v1.25.0-preview.beta06 on 2025-02-17; SparkFun XRP Controller with RP2350`

---

<div class="post-metadata">

**Author:** ![kayce](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/kayce/32/284_2.png) [@kayce](https://xrp.discourse.group/u/kayce)\
**Post date:** [April 3, 2025, 4:09pm UTC](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/11 "2025-04-03T16:09:36Z")

</div>

My SparkFun kit had the same issue. Thanks @csunwc for figuring out a proper factory reset workflow. [MicroPython error during installation verification - #7 by csunwc](https://xrp.discourse.group/t/micropython-error-during-installation-verification/652/7)
