diff --git a/42109-1 - App-Controlled Top Gear Rally Car/main.py b/42109-1 - App-Controlled Top Gear Rally Car/main.py index 283b82f..1189f86 100644 --- a/42109-1 - App-Controlled Top Gear Rally Car/main.py +++ b/42109-1 - App-Controlled Top Gear Rally Car/main.py @@ -21,24 +21,8 @@ # Off-road racing car (42109) by ConstructionsByDonat # # https://rebrickable.com/mocs/MOC-90323/ # ################################################################################ -# # -# Changelog # -# # -################################################################################ -# v0.3.0 05-07-2022 # -# Based on v0.1.0 05-07-2022 of 42124-1 - Off-Road Buggy # -# v0.2.0 02-07-2022 # -# 2 speed "gearbox" changed to 3 speed, recodingwith debounce and now left # -# button also used. # -# v0.1.0 15-06-2022 # -# 2 speed "gearbox" added. # -# v0.0.1 15-06-2022 # -# Changed variable namings. # -# Changelog added. # -# Comment header added. # -# Changed the way speed is handled within the while loop. # -# v0.0.0 14-06-2022 # -# First version. # +# LEGO® is a trademark of the LEGO Group of companies which does not sponsor, # +# authorize or endorse this project. # ################################################################################ from pybricks.pupdevices import Motor, Remote @@ -56,12 +40,6 @@ remote = Remote() # Initialize the hub. hub = TechnicHub() -# Read the current settings -old_kp, old_ki, old_kd, _, _ = steering.control.pid() - -# Set new values -steering.control.pid(kp=old_kp*4, kd=old_kd*0.4) - # Find the steering endpoint on the left and right. # The middle is in between. left_end = steering.run_until_stalled(-200, then=Stop.HOLD) diff --git a/42124-1 - Off-Road Buggy/main.py b/42124-1 - Off-Road Buggy/main.py index 3711f0b..01e5738 100644 --- a/42124-1 - Off-Road Buggy/main.py +++ b/42124-1 - Off-Road Buggy/main.py @@ -12,22 +12,8 @@ # Port D: Not used # # # ################################################################################ -# # -# Changelog # -# # -################################################################################ -# v0.1.0 05-07-2022 # -# restructured to the version at pybricks-projects on Github # -# https://github.com/pybricks/pybricks-projects/blob/master/sets/technic/ # -# 42124-off-road-buggy/powered-up-remote/main.py # -# Changed gearbox part. # -# Button left can only shift down # -# Button right can only shift up # -# New variables to easily change the number of gears # -# Added battery indicator with hub LED. # -# v0.0.0 04-07-2022 # -# First version. # -# Based on v0.2.0 02-07-2022 of 42109-1 - App-Controlled Top Gear Rally Car # +# LEGO® is a trademark of the LEGO Group of companies which does not sponsor, # +# authorize or endorse this project. # ################################################################################ from pybricks.pupdevices import Motor, Remote @@ -45,12 +31,6 @@ remote = Remote() # Initialize the hub. hub = TechnicHub() -# Read the current settings -old_kp, old_ki, old_kd, _, _ = steering.control.pid() - -# Set new values -steering.control.pid(kp=old_kp*4, kd=old_kd*0.4) - # Find the steering endpoint on the left and right. # The middle is in between. left_end = steering.run_until_stalled(-200, then=Stop.HOLD) diff --git a/DAKAR TRIAL Truck 42114 B alternate model Zetros killer by RM8 LEGO Garage - BrickGarage (MOC-113177)/main.py b/DAKAR TRIAL Truck 42114 B alternate model Zetros killer by RM8 LEGO Garage - BrickGarage (MOC-113177)/main.py index 3da3ed7..f278a05 100644 --- a/DAKAR TRIAL Truck 42114 B alternate model Zetros killer by RM8 LEGO Garage - BrickGarage (MOC-113177)/main.py +++ b/DAKAR TRIAL Truck 42114 B alternate model Zetros killer by RM8 LEGO Garage - BrickGarage (MOC-113177)/main.py @@ -15,19 +15,8 @@ ################################################################################ # Rebrickable: https://rebrickable.com/mocs/MOC-113177/ # ################################################################################ -# # -# Changelog # -# # -################################################################################ -# v0.2.0 05-07-2022 # -# Based on v0.1.0 05-07-2022 of 42124-1 - Off-Road Buggy # -# Added steering correction # -# v0.1.0 26-06-2022 # -# Added half speed for drive. # -# Added half angle for steering. # -# v0.0.0 26-06-2022 # -# First version. # -# Based on v0.0.0 22-06-2022 of 42129 B model 'Hot Trot' by Didumos # +# LEGO® is a trademark of the LEGO Group of companies which does not sponsor, # +# authorize or endorse this project. # ################################################################################ from pybricks.pupdevices import Motor, Remote @@ -46,12 +35,6 @@ remote = Remote() # Initialize the hub. hub = TechnicHub() -# Read the current settings -old_kp, old_ki, old_kd, _, _ = steering.control.pid() - -# Set new values -steering.control.pid(kp=old_kp*4, kd=old_kd*0.4) - # Find the steering endpoint on the left and right. # The middle is in between. left_end = steering.run_until_stalled(-200, then=Stop.HOLD) @@ -71,12 +54,13 @@ steering_angle_left = -steering_angle-steering_correction steering_angle_right = steering_angle+steering_correction # Set variable for gear -gear_total = 2 # Total number of gears. -gear_old = None # Empty variable to set later on (keep empty!). -gear = 2 # Gear at start (must be higher than 0 and lower or - # eaqual to gear_total). -gear_color = ["BLUE", "RED"] # Number of colors should at least be equal to - # gear_total. +gear_total = 2 # Total number of gears. +gear_old = None # Empty variable to set later on (keep + # empty!). +gear = 1 # Gear at start (must be higher than 0 and + # lower or eaqual to gear_total). +gear_color = ["BLUE", "RED"] # Number of colors should at least be + # equal to gear_total. # Battery variables voltage_current = hub.battery.voltage()