Help with 3pi+ 2040 on macOS

Moderator’s note: The original title of this thread incorrectly referred to the 3pi+ 32U4 OLED Robot, Turtle edition.

Hey yalls. So I don’t know what type of product this is, sorry, but my screen for this pololu isn’t turning on. What I did so far was change the battery on the robot but nothing else happened, just the blue lights turn on. Open to suggestions.



Hello.

The display is controlled by the program you have loaded onto the robot; could you post the code you are running?

If you haven’t done so already, could you try testing it using one of the examples from the 3pi+ 32U4 Arduino library that uses the display, such as BumpSensorTest.

Brandon

Hello,

There was actually no program that was running. I pressed on and nothing happened. Before the mistake, I changed the batteries to alkaline. After I changed it, it stopped working. I can give any other pictures if needed.

Wait sorry it might be, I’m using another pololu and nothing is working. No battery was changed

Ashur.py (15.2 KB)

Also the screen isn’t turning on at all. When I press on the screen is just black.

If needed, I can send all the files that are loaded in the robot but that ashur file was the last file that I was playing with before it broke. The lights are still on and I can still access the files that are in the robot.

If you are using Python files, then you must be using the 3pi+ 2040 Robot (which is very different than the 3pi+ 32U4 OLED Robot, and the library I linked to in my previous post will not work with it). Also, I see now that one of your pictures also shows the 3pi+ 2040, which I unfortunately missed before.

Please note that in order for a program to run automatically on boot, you need to name it main.py. Otherwise, you would need to do something else to run your program (like calling it from a different program). Your program also has a lot going on with it, so if you keep having problems after changing the name, I also recommend simplifying it as much as possible until we figure out what the problem is.

If that does not help, please post the all of the files that are loaded onto the robot as you suggested.

Brandon

Hello, I deleted the file and put it into a different tab and the robot still won’t move. I also used main.py and still didn’t get anything for it to be working. Sorry for giving the wrong robot.
blink.py (212 Bytes)
DEEZ_NUTZ.py (1.2 KB)
display_test.py (201 Bytes)
edition.conf (6 Bytes)
encoder_test.py (592 Bytes)

error.py (214 Bytes)
face_uphill.py (3.0 KB)
gyro_turn.py (3.6 KB)
imu_test.py (948 Bytes)
ir_sensor_demo.py (3.1 KB)

There are three files left but I couldn’t send it

At this point, I recommend following the “Upgrade instructions” in the “Updating the MicroPython firmware” section of the 3pi+ 2040 user’s guide, which will delete all programs and data stored on your robot and revert it back to just our standard demo programs, which should work without any additional modifications.

Brandon

Hi, I tried doing that but I’m getting an error called
UnicodeError:

Line 32,213,161

The good news is that it turns on now

After loading the firmware onto the robot, you should have been able to disconnect it from USB and run the demo directly from the robot (i.e. not connected to the computer). Could you clarify where you are seeing that error and what program you are running? Also, could you post a screenshot of the error?

Brandon

Yes I can, but (after some testing) the error just turned into where the menu freezes. Also, the micropython name doesn’t show up anymore.


Demonstration of error

Hello.

I am sorry you are having trouble with the 3pi+ 2040. It looks like somehow the drive on the robot has been corrupted, because the drive title (“MicroPython”) is missing, and many files are missing too.

I recommend fully erasing the flash memory on the robot by uploading flash_nuke.uf2 to the robot. You can find that file here:

https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#resetting-flash-memory

Please upload flash_nuke.uf2 to the robot the same way you uploaded the regular firmware earlier: hold down the B button while pressing Reset, then drag flash_nuke.uf2 into the drive named RPI-RP2 that appears on your computer.

At this point, the RPI-RP2 drive should disappear while the flash_nuke program runs, erasing the robot’s entire flash. After a few seconds, it will finish, and you will see the robot’s yellow LED flash 3 times. The robot should go back to BOOTSEL (bootloader) mode at this point, and the RPI-RP2 drive should reappear.

After doing that, drag the regular firmware into the RPI-RP2 drive. (Specifically, use the file named micropython-pololu-3pi-2040-robot-v1.22.1-240117.uf2 that you previously downloaded from the upgrade instructions that BrandonM linked you to.) The firmware should automatically start running; you should hear a sound from the buzzer and see the menu appear on the OLED.

If you continue to have trouble, please tell us what version of macOS you are using, and please let us know about any error messages you see while following the instructions.

–David

Works perfectly, thank you so much!

1 Like

I am glad you were able to get the robot working! If you or anyone else continues to have this type of trouble with our RP2040-based robots, please let us know. We would like to understand why the filesystem on the robot is getting corrupted in the first place and see if we can make our official firmware file more robust to avoid the need for flash_nuke.uf2.

–David