Home Creators Posts Import Register Favorites Logout

Content

You can follow the upcoming Pybricks Learn guide with any platform, so I'll include instructions for several versions of the StarterBot.

While I was designing and testing the StarterBot variant for the BOOST set, I thought it would be nice to share this line following demo. This is known as a "proportional controller". The more the reflection value differs from the average (50%), the more it steers.

Naturally, you can make this with SPIKE too. You'll learn more about how this works when we complete chapter 7 about the color sensor.

 

Files

Comments

Alexander Bell

I have been thinking about... finding the RPM with color/light sensor and the Technic, Disk 3 x 3 with 2 Black Opposing Sections Pattern. I certainly can Id the colors but unclear on how often they the sensor sends results and how to leverage that into time and rotation. Has this been done somewhere? (I know the "smart" motors have rotational control but thinking of using as a 'check' or with PF motors. Thanks for your help.

Alexander Bell

I'm not sure if this is the best place, but wanted to give a little feedback. I always appreciate your prompt and helpful replies. A+ I ended up with something that actually uses the time between the two white segments rather than between the white and black segments. Could be because I did not define black but using it gave unpredictable results.  Once I converted to white, pause until black then look for white again - and the results were excellent as expected. I added an averaging section expecting the results to be more varying (esp because of the initial results) which is probably not necessary. I have a short video and a link to the code on a Rebrickable workbench post. Improvements always welcome, also feel free to use if it helps others. Thanks again. https://rebrickable.com/users/andybell/workbench/11882/