MxWinters Posted July 6, 2022 Posted July 6, 2022 (edited) For all the C+ nerds out there, here is a quick demo for using the PoweredUp remote directly with the Control+ Technic Hub using PyBricks. This is the code I'm running on my motorised 42110 Land Rover but can be used with any model using 2 drive motors and 1 steering motor like the 42099 4X4 X-treme Off-Roader set. The code has two control modes: Bang Bang mode simply acts as an on/off controller similer to how the PowerFunctions remote worked in that it turns the drive motors on while the button is pressed and then turns them off when button is released, The steering motor also goes to full lock while the button is pressed and returns to centre when released. Precision Mode acts as a speed controller for the drive motors and provides 10 speed steps in either direction and increments to steering motor by 10° on each button press to give 8 angle steps.The red stop buttons act as emergency stop buttons and the green centre button is the control mode select. I have published the code to my Github account should you wish to download it and try it for yourself. Please make sure you configure the "User Definable Setting" and the " Initialize Motors" sections to suit your needs before running the code. This code is released under the MIT licence, so feel free to download, use, edit and share this code under the terms of the MIT licence, full licence details included in the repo. You can download the code here: https://github.com/MxWinters/PyBricks-Remote-Technic-Hub Edited July 7, 2022 by MxWinters Spelling Quote
GerritvdG Posted July 6, 2022 Posted July 6, 2022 (edited) Thanks for sharing, really interesting. Also your code is valuable, clear and well documented! Edited July 6, 2022 by GerritvdG Quote
MxWinters Posted July 12, 2022 Author Posted July 12, 2022 On 7/6/2022 at 8:56 PM, GerritvdG said: Thanks for sharing, really interesting. Also your code is valuable, clear and well documented! On 7/6/2022 at 9:18 PM, Lok24 said: Nice, thanks for sharing Thanks alot, glad you like it. I hope it proves useful to someone. Any issue with it, let me know and Ill take a look. Feel free to fork and submit a pull request if you come up with something that you think should be added/changed. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.