Skip to content

Commit

Permalink
Refactor conf.json: Update version number to 2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
AIIrondev committed Jul 28, 2024
1 parent a27e984 commit 4f571a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/conf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.1.2",
"version": "2.2.3",
"calibrate" : "\nasync def calibrate(speed=1000, acceleration=1000):\n if (distance_sensor.distance(port.C) < 110):\n print('Calibration not possible! | Distance to small!')\n elif (distance_sensor.distance(port.C) > 110):\n try:\n await drive(-1, 14, speed, acceleration)\n distance0 = distance_sensor.distance(port.C)\n await drive(10, 14, speed, acceleration)\n distance1 = distance_sensor.distance(port.C)\n calibration = distance0 - distance1\n #print('Calibration done!')\n print(calibration)\n wait(0.5)\n except:\n print('Calibration not possible! | Error!')",
"module": "\nasync def module(degrees=0, speed=1110, acceleration=10000):\n if (degrees > 0):\n await motor.run_for_degrees(motor_module, degrees, speed, acceleration=acceleration)\n elif (degrees < 0):\n await motor.run_for_degrees(motor_module, degrees, speed, acceleration=acceleration)\n elif (degrees == 0):\n print('Error')",
"motor": "\nasync def drive(distance=0, multiplier=14, speed=1000, acceleration=1000):\n if (distance > 0):\n degrees = (distance * calibration)\n await motor_pair.move_for_degrees(pair, degrees, 0, velocity=speed, acceleration=acceleration)\n elif (distance < 0):\n degrees = distance * calibration\n await motor_pair.move_for_degrees(pair, degrees, 0, velocity=speed, acceleration=acceleration)\n elif (distance == 0):\n print('Null Value Error')\n\n\nasync def tank(degrees=0, left_speed=1000, right_speed=1000, acceleration=1000):\n #180 degrees = 90 Grad\n if (degrees > 0):\n await motor_pair.move_tank_for_degrees(pair, -degrees, left_speed, -right_speed, acceleration=acceleration)\n elif (degrees < 0):\n await motor_pair.move_tank_for_degrees(pair, degrees, -left_speed, right_speed, acceleration=acceleration)\n elif (degrees == 0):\n print('Null Value Error')\n \n\nasync def obstacle(distance=0, speed=1000, acceleration=1000):\n if (distance > 0):\n while distance_sensor.distance(port.C) > distance:\n await drive(2, 14, speed, acceleration)\n print('Obstacle detected!')\n elif (distance <= 0):\n print('Null Value Error')",
Expand Down

0 comments on commit 4f571a5

Please sign in to comment.