0

I'm trying to build the Keyestudio mecanum 4WD car for pico for a summer camp I run for high schoolers. I have no programming knowledge or background, and neither do the kids. I've been following the tutorials they provided on their wiki page: https://www.dropbox.com/sh/tit7yi7vhcev1yw/AACmUnWLQR2zTM841MCt50PLa?dl=0

I've gotten all the MicroPython codes into the Thonny IDE, and can run while it's connected, but I can't get it to run when it's simply turned on, unless I leave it running in the IDE and just unplug it. I've tried saving it as main.py, and that doesn't seem to work. What's more, I can't get it to run multiple codes (programs?) at once. For example, I'd like the line tracking to run, while also being able to use the IR remote. not sure if that's possible, but I'd like it to at least run the remote on start-up.

Many thanks! I've been reading everything I can, and would love to learn this on my own, but I'm on a time crunch as the camp starts in 2 weeks, and I'm way out of depth!

2
  • (1) But your links are for BBC Microbit, not Rpi Pico! KS4031(4032)Keyestudio 4WD Mecanum Robot Car for Micro:bit wiki.keyestudio.com/… Please give us more links to clarify.
    – tlfong01
    Jun 14, 2023 at 6:27
  • I apologize, I must have copied the wrong link. Here's a google doc folder with the tutorials I'm following: drive.google.com/drive/folders/… Jun 15, 2023 at 12:01

1 Answer 1

0

Saving as main.py on the Pico should cause the program to run on startup. Test by just flashing the on board LED.

You would need to combine your multiple codes into either one program or one program that calls functions in other imports.

4
  • Thanks! What's the difference between using main.py and boot.py? I've read articles on both. I've been working on combining and seem to have gotten at least a few of them to run on boot.py, but I haven't tried main.py, yet. I literally know nothing about coding and have learned all this in a week, so I'm not sure if I'm putting the functions and loops in the correct order/syntax. If I define all the functions first, and then create a series of loops, will that work? Jun 15, 2023 at 12:08
  • I've only used main.py. If you want more of a discussion on your project/programming try forums.raspberrypi.com/index.php
    – CoderMike
    Jun 15, 2023 at 16:51
  • 1
    Ok, cool. Main.py worked great. Thanks for the info!! Jun 16, 2023 at 18:02
  • Please mark this answer as correct if you feel it answers your question.
    – CoderMike
    Jun 16, 2023 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.