Replies: 4 comments 18 replies
-
So we were a first year team (exploding toaster supernova) and used Pybricks. Had 400 points programmed but only got 375 in our best run. Still won the robot game at our state event but didn't understand the rest of the competition (being our first year) so did not place/move on. Anyways yeah you will have to program some sort of UI. One of the creators of Pybricks does have a nice demo code here in the GitHub discussions, that is a good place to start. I can also share some of our code if the kids agree (they are a bit possessive of it). You should probably program it so it automatically loads the next run at the end of the 1st so that only a single button has to be pressed between runs to start the next one (saves several seconds). In terms of the gyro we did not use it this year. Our robot was well balanced and didn't need it. Also the gyro only does straight and tank type turns (to my best understanding) and not curves which often can be very useful. Still we will probably use the gyro now that it is available but we were able to do pretty precise driving without it. I highly suggest you write some remote code. Being able to use the Lego Bluetooth remotes to control your robot while you design attachments for the various gameboard missions is immensely helpful. Attached is a brief video demo of what I mean. Finally also consider buying some of the 4 port technic hubs and extra large angular motors from Bricklink. For example we made copies of our modular attachment robot using the very cheap technic hubs for the kids to experiment with/build attachments sets for. Since they only have 4 ports and not 6 these did not have light sensors but this was not a problem as they werw used mostly in remote control mode. Here is also a photo showing 'Toasry" our bot and his slightly less capable technic hub cousin Crostini. We are also working on creating an Edublocks (edublocks.com) type interface for Pybricks. Still very much a work in progr as but if we get it done you will be able to do block style coding with the full power of Pybricks (it really is that much better than the Lego software). I think it will be extremely popular once it is cobbled together. |
Beta Was this translation helpful? Give feedback.
-
Thanks for considering Pybricks for this season!
Indeed. We are currently looking at ways to make this simpler for teams. See #1064 for what we are thinking about. On that list, idea 1 already works if you need something right now.
If your robot doesn't have drag or unbalance, you might even be fine with the regular But indeed, you can use the You can also take things into your own hands by reading the heading with
By default, running a program with Pybricks Code will download that program to the hub, including anything that it imports. This lets you organize your code into as many submodules as you like. This is technically "just one" program, but this is pretty flexible since it includes whatever it imports. This is what makes the menu code I mentioned above work: the main "menu" program imports each of the missions. |
Beta Was this translation helpful? Give feedback.
-
Thank you @thehomelessguy and @laurensvalk for the suggestions. @HomelessGuy > The starter code would be super helpful for the team to analyze and build upon. That should help the team to start with modifying the current block code they already have into pybricks while we wait for Aug1 release! harikun |
Beta Was this translation helpful? Give feedback.
-
See here for our code/a good modular starting point |
Beta Was this translation helpful? Give feedback.
-
We have a team of 6th graders for the next FLL season (2023-2024). The team has been on the rec league for the past 2 years and thinking of transitioning to challenge/qualifiers this year. Has been exposed to Spike Block programming with knowledge of developing custom blocks for Gyro (Turns and Moving Straight). Came across Pybricks and thought this would be a good time to transition as I believe PyBricks has been more responsive and accurate for some of the pre-defined blocks that are available as modules. (Compared to what is available from LEGO)
Wanted guidance on examples / codes from any veteran teams on how to organize the modules / code.
For eg:
(1) The team had split the Code that was loaded into different memory slots last year based on the "Runs". The team had 4 runs with Attachment/Positioning changes. I understand that there are multiple ways of doing this on Pybricks as a single program by detecting specific button presses or using a menu to assign letters or numbers for the Runs
(2) I see that the latest Beta has GyroDriveBase which seems to include accurate Gyro measurements on making sure the Robot moves straight or turns (including accel/decel code). If the team maintains the Robot center of gravity and makes sure the attachments dont create unnecessary drags, would just using the Gyro Drive base suffice?
(3) How is the code organized? A main program and individual "Runs" as separate programs that is called? And any custom "My Blocks" that is also called separately or either in the main program?
Wanted to see if this can be a good challenge for the kids during summer while we wait for the challenge kits to be shipped in August. If possible, I was thinking of having the kids write their code using Pybricks of the previous years Run to get familiarized and assess accuracy.
Any advice and guidance appreciated. If there are code examples from previous year that teams are willing to share, it would help a ton on guiding the team on the right path.
-Harikun
Beta Was this translation helpful? Give feedback.
All reactions