How to - External Tasks and Import #1971
Unanswered
FLLApollo7
asked this question in
Q&A
Replies: 1 comment 2 replies
-
If this is the main goal, I recommend this approach: https://pybricks.com/project/spike-hub-menu/ You can make multiple totally separate bock programs (one for each mission), and put them together as shown above. The main menu is in Python, but you can copy the ready-made example. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can't find any documentation on the "External Task" option in Pybricks. I think this is what I need to use to call a separate program that is saved under a separate file name. The values to type into the open text boxes is not clear. I'm also confused about how to call the new program and what the open circles represent there. I tried to set up the overall program to call a separate program that included a task (attached below). I get the error "invalid argument".
I can find lots of examples with Python code to "import", but I need to do this with the blocks (not written out in code) as I'm trying to guide a team that is very new to this. (I am very new too, and an initial attempt to "just type" in the right-hand code window said I was in read-only mode and couldn't edit. I code occasionally at work but only in very narrow programs, so there is much that I don't know.) Another issue I'm confused by is one post calling "my_module" and another calling "our_robot", etc - what are these referring to and how are these "directories" (my mental categorization since I don't know a better term) set up?
The overall goal is the ability to string together multiple programs in order for competition day. I have figured out how to configure the button presses to do this and show feedback via the numbers on the hub - but only if we combine ALL the programs into the same file. We historically have kept each "run" in a separate file, so I'm trying to figure out how to replicate that with this new programming method. I need to understand this well enough to guide the kids through the logic so they can build it.
Beta Was this translation helpful? Give feedback.
All reactions