# data[].attributes.attachment_link.readable_text
Pitch Feedback

- doel van de sumo robot m.b.t. doel van de robot waarom wordt het gebruikt
sensoren aan te sturen met python  de casus ( doelstelling )

 - doelstelling verwerken in Presentatie n.a.v. feedback.
 Beschrijf  doel van de robot
hoe komt het dat de robot specifieken bewegingen uitvoert 
welke sensoren zorgen hiervoor 
welke programmeer taal etc.

# data[].attributes.headline
Procedurebeschrijving (af alleen nog structuur)

# data[].attributes.subject
Procedurebeschrijving (af alleen nog structuur)

# data[].attributes.body
Inhoud is ingevuld

# data[].attributes.body
Laxmaan bezig !

# data[].attributes.headline
Probleemanalyse(niet af) Deze hoeft niet

# data[].attributes.subject
Probleemanalyse(niet af) Deze hoeft niet

# data[].attributes.body
robotics – Robotics — ev3-micropython 2.0.0 documentation (pybricks.com)

# data[].attributes.attachment_link.readable_text
A robotic vehicle with two powered wheels and an optional support wheel or caster.

By specifying the dimensions of your robot, this class makes it easy to drive a given distance in millimeters or turn by a given number of degrees.

Positive distances and drive speeds mean driving forward. Negative means backward.

Positive angles and turn rates mean turning right. Negative means left. So when viewed from the top, positive means clockwise and negative means counterclockwise.

Parameters:

left_motor () - The motor that drives the left wheel.

right_motor () - The motor that drives the right wheel.

wheel_diameter (dimension: mm ) - Diameter of the wheels.

axle_track (dimension: mm ) - Distance between the points where both wheels touch the ground.

Driving for a given distance or by an angle

Use the following commands to drive a given distance, or turn by a given angle.

This is measured using the internal rotation sensors. Because wheels may slip while moving, the traveled distance and angle are only estimates.

If you give no arguments, this returns the current values as a tuple.

You can only change the settings while the robot is stopped. This is either before you begin driving or after you call .

Drive forever

Use to begin driving at a desired speed and steering.

It keeps going until you use or change course by using again. For example, you can drive until a sensor is triggered and then stop or turn around.

Starts driving at the specified speed and turn rate. Both values are measured at the center point between the wheels of the robot.

Measuring

Measuring and validating the robot dimensions

As a first estimate, you can measure the wheel_diameter and the with a ruler. Because it is hard to see where the wheels effectively touch the ground, you can estimate the as the distance between the midpoint of the wheels.

In practice, most wheels compress slightly under the weight of your robot. To verify, make your robot drive 1000 mm using my_robot.straight(1000) and measure how far it really traveled. Compensate as follows:

Motor shafts and axles bend slightly under the load of the robot, causing the ground contact point of the wheels to be closer to the midpoint of your robot. To verify, make your robot turn 360 degrees using my_robot.turn(360) and check that it is back in the same place:

When making these adjustments, always adjust the wheel_diameter first, as done above. Be sure to test both turning and driving straight after you are done.

Using the DriveBase motors individually

Suppose you make a object using two objects called and right_motor . You cannot use these motors individually while the DriveBase is active.

The DriveBase is active if it is driving, but also when it is actively holding the wheels in place after a or command. To deactivate the , call .

Advanced Settings

The method is used to adjust commonly used settings like the default speed and acceleration for straight maneuvers and turns. Use the following attributes to adjust more advanced control setttings.

You can only change the settings while the robot is stopped. This is either before you begin driving or after you call .

distance_control

The traveled distance and drive speed are controlled by a PID controller. You can use this attribute to change its settings. See The Control Class for an overview of available methods.

heading_control

The robot turn angle and turn rate are controlled by a PID controller. You can use this attribute to change its settings. See The Control Class for an overview of available methods.

# data[].attributes.attachment_link.title
robotics - Robotics - ev3-micropython 2.0.0 documentation

# data[].attributes.attachment_link.description
A robotic vehicle with two powered wheels and an optional support wheel or caster. By specifying the dimensions of your robot, this class makes it easy to drive a given distance in millimeters or turn by a given number of degrees. Positive distances and drive speeds mean driving forward.

# data[].attributes.body
https://sites.google.com/site/ev3python/learn_ev3_python/basics-1

# data[].attributes.attachment_link.readable_text
Once again, let me stress that this site is not intended to teach you basic Python programming. There are hundreds of free courses to help you learn about standard Python and some are listed on the Learn Python page. This site exists to help people who already have a basic knowledge of standard Python to make the extra step of learning how to use the robotic functions that EV3 Python makes available.

Also, this site is written only to help people using VS Code with the EV3 extension and who are using the old (version 1) EV3 Python library. If you are using VS Code with the EV3 extension but are using the much superior new version (version 2) of the EV3 Python library then click to visit the new site that is focused on version 2 of the Python library. (The new site is not accessible just yet - patience!)

Launch Python programs from VS Code

To see how to write and run Python scripts in VS Code please visit the page 'The VS Code workflow'.

Launch Python programs from the EV3's Brickman menu

Before you can launch a Python program from the Brickman interface on the brick you must make sure that your program includes a special instruction called a ' shebang' as the first line of your program (it MUST be the first line in order to work) . That shebang is

I have included that shebang as the first line in every program on this site. Since the line begins with a hash character you could assume that this is simply a comment that will be ignored by the compiler when the program is run. This would be a false assumption because in fact lines beginning with #! are actually special instructions called 'shebangs' that DO affect how the program runs since they tell the compiler which program to use to open the file. You may also come across programs beginning with #!/usr/bin/python which is an instruction to use Python 2 to open the program but you should favour Python 3 since Python 2 is now obsolescent. All the Python programs on this site are written in Python 3 and use the Python 3 shebang.

A shebang is comparable to a file association in Windows. In Windows you can use 'Open with...' to specify that all files with a certain file extension are to be opened within a certain program. For example, you could specify that programs with the .txt extension are to be opened in MS Word. Shebangs have a similar effect as a file association but the shebang must be included in every file that is to be opened by a certain program.

Stopping a program that was launched from VS Code

Most programs will of course stop by themselves. If you launched a program that does not stop by itself, perhaps because you deliberately included an infinite loop, for example, or because something went wrong, force the program to stop by clicking the stop button (a red square) which appears in VS Code when you launch a program on the EV3 using the EV3 extension.

Stopping a program that was launched from Brickman

Most programs will of course stop by themselves. If you launched a program that does not stop by itself, perhaps because you deliberately included an infinite loop, for example, or because something went wrong, force the program to stop by long-pressing the Back button .

Start the Python 3 interpreter from the command line

Since you are using VS Code with the EV3 extension you can easily start the Python interpreter and then you will be able to run Python commands one by one without having to create and save a Python script. You can either run the Python interpreter on the PC, in which case you will not be using the EV3 Python on the EV3 so robot-specific functions will not be available, or you can run the Python interpreter on the EV3 itself in which case you can use the robot-specific functions.

To run the python interpreter locally on the PC

In the bottom-right panel of the VS Code window click TERMINAL and then, at the prompt, type Python (not Python3). You should then see this prompt: >>> which means you can start typing Python commands that will be run as soon as you press the Enter key. For example you can type print('Hello, world') and press the Enter key and the text will immediately be printed to the terminal of the PC. To close the Python interpreter type exit() and press the Enter key.

To run the python interpreter on the EV3 from VS Code

Right-click the green dot that shows the EV3 is connected to your PC and choose 'Open SSH Terminal'. When the terminal has opened, type Python3 (not Python) at the prompt. You should then see this prompt: >>> which means you can start typing Python commands that will be run as soon as you press the Enter key. For example you can type these three lines in order to make the left LED pair of the EV3 glow amber:

To close the Python interpreter type exit() and press the Enter key.

If, while are using the SSH terminal, you are ever asked for the password for the user called 'robot' (you) it is 'maker' (without the quotes).

# data[].attributes.attachment_link.description
Once again, let me stress that this site is not intended to teach you basic Python programming. There are hundreds of free courses to help you learn about standard Python and some are listed on the Learn Python page .

# data[].attributes.attachment_link.readable_text
Note that EV3 Basic is compatible with the large and medium EV3 motors and also with NXT motors. EV3 Basic makes no distinction between these different types of motor.

EV3 Basic has nine commands that can be used to make motors move, but only four are really needed at beginner level: Motor.Move, Motor.MoveSync, Motor.Start and Motor.StartSync. You will also need Motor.Stop, of course. You can read about the other Motor commands and motor-related functions in the EV3 Basic manual.

page on this site has been updated to describe these new functions and an example program (from the set of examples downloadable as Examples.zip Update: Versions 1.2 and later of the EV3 extension contain three additional motor commands, Motor. MoveSteer, Motor. SyncSteer and Motor. StartSteer, which are intended to mimic the functionality of the Move Steer block of the standard icon-based Lego EV3 software. The EV3 Basic manual HERE) is included at the bottom of this page. Many of the scripts on this site could be improved by making use of the new functions but I am not modifying the scripts until I feel that most users will have upgraded to version 1.2 or later.

Motor commands use the following parameters:

port(s) = Motor port name(s). E.g. "BC". Always put the letters in alphabetical order.

degrees = Number of degrees to turn the motor. Motor commands will always use the absolute value of the degree parameter. In other words, any negative sign for the angle will be ignored. So if you want the motor to turn backwards then give it a negative speed rather than a negative angle.Convert rotations to degrees by multiplying by 360, if necessary.

brake = "True", if the motor(s) should switch on the brake after the movement, as is almost always the case.

speed = speed from -100 (full reverse) to 100 (full forward). Note that for speed values not exceeding +-80 the rotational speed in degrees per second is equal to 10 times the speed setting. For example, if the speed is set to 70 then the motor should turn at 700 degrees per second. But the EV3 motors have difficulty reaching speeds much above 800 degrees per second so the proportionality breaks down - you may find that the motor turns no faster when set to speed 100 than it does when set to speed 90! For the most reliable results you should therefore refrain from using speed values greater than 80 or less than -80.

To make a Example: turn motor A at speed 40 through 80°: single motor turn through a specific angle, you should use Motor.Move(ports, speed, degrees, brake). Motor.Move("A", 40, 80, "True")

To make two (or more) motors turn with the same speed through a specific angle, as when moving in a straight line, you should also use Motor.Move(ports, speed, degrees, brake). Example: turn motors B and C at speed -30 for two wheel rotations or 720°:

To make the robot follow a curved path or turn on the spot for a given angle of wheel rotation (two motors moving with different speeds), use Motor.MoveSync(ports, speed1, speed2, degrees, brake). Speed1 and Speed2 will be the speeds of the motor with the lower port letter and the higher port letter, respectively. Degrees will be the angle turned by the faster motor. This command is similar to the 'Move Tank' block in the standard Lego EV3 software.
Example: turn motor B at speed 30 and motor C at speed 40 for a gentle left turn, with the faster motor turning 720°:Motor.MoveSync("BC", 30, 40, 720, "True"). You can also use Motor.MoveSteer which is similar to the Move Steering block in the standard Lego software but this command is only available in versions 1.2 and later of the EV3 extension. See the example at the bottom of this page.

In general, to make motors turn for a given length of time, turn them on, then use Program.Delay to make the program wait the desired time, then stop the motors with Motor.Stop.

To make one or more motors turn with the Example: Turn on motors B and C at speed 80 for 3 seconds:same speed for a specific time you should use Motor.Start(ports, speed).
Motor.Start("BC",80)
Program.Delay(3000)

To make the robot follow a curved path or turn on the spot for a specific time (two motors moving with different speeds), use Motor.StartSync(ports, speed1, speed2). Example: Make the robot turn on the spot for 5 seconds with motor B turning at speed 50 and motor C turning at speed -50:
Motor.StartSync("BC", 50, -50)
Program.Delay(5000)
Motor.Stop("BC","True")
You can also use Motor.StartSteer which is similar to the Move Steering block in the standard Lego software but this command is only available in versions 1.2 and later of the EV3 extension . See the example at the bottom of this page.

Some other motor commands have a 'power' parameter, which in EV3 Basic is not the same as 'speed'. The 'power' parameter can be considered to be for experts only. To learn the difference between 'speed' and 'power', check the EV3 Basic Manual.

When you have to change the speed of an already-running motor, just re-issue a start command with the appropriate speed value. The motor will then seamlessly switch over to the new speed.

Here are some sample programs that shows different ways of controlling the motors with EV3 Basic. It is assumed that you are using a robot similar to the standard Lego 'driving base' or 'educator robot' with motors attached to ports B and C. Since your robot will be running around, it will be helpful to establish a wireless (Bluetooth or WiFi) connection to the EV3, rather than using a USB cable connection. Clear or HERE for help setting up the Bluetooth connection (you may need to attach a Bluetooth dongle to your PC) HERE to set up a WiFi connection (you need to purchase a compatible WiFi dongle for the brick). You can copy and paste each program directly into Small Basic and it should work, but it will only work in 'PC mode' (running the program in Small Basic). It cannot be compiled and downloaded to the brick to be run from the brick's menus (in 'brick mode') because it makes use of Small Basic's text window. Some programs are in many parts, in which you can also just copy and paste suitable fragments of the program. Everything after a single quote is a comment that is only there to help you - Small Basic simply ignores comments when the program is run. Small Basic colours comments green and uses other colour coding to help you.

'Simple motor control. Attach motors to ports B and C.

'You may have to reverse the connections to ports B and C

'or make some values negative if the robot turns or

'Make the robot turn right by running motor B

'at 50% speed through 360°, then apply the brake

Program.Delay(2000) ' Pause for 2 seconds (2000 milliseconds)

'Make the robot move forward at 30% speed for two wheel rotations

Motor.Move ("BC", 30, 720, "True")

Program.Delay(2000)

'To make the motion start and finish more softly you can use the 'Schedule' or

'SchedulePower command. These commands have an acceleration step, a

'constant speed step, and a deceleration step. For example:

'Motor.Schedule (ports, speed, step1, step2, step3, brake)

'Step1 and step3 are the angles through which to accelerate and decelerate

'To make the robot accelerate forward for one wheel rotation,

'then continue forward at 60% speed for two wheel rotations (720°),

'then decelerate for three wheel rotations (1080°) while still moving forward:

Motor.Schedule("BC", 60, 360, 720, 1080, "True")

'Note that the Motor.Schedule() command does NOT pause the program until

'the motion has completed so if you want the program to pause you

'should use a Motor.Wait() command as above.

'If you use the Motor.Move() command to control multiple motors the

'motors will always move with the SAME SPEED. So how can you make

'motors move simultaneously with DIFFERENT SPEEDS?

'The standard Lego graphical interface has a 'move tank' block that lets you

'set two motors to move with different speeds for a given number of

'In EV3 Basic the equivalent to the 'move tank' block, which you should

'use when you want to make TWO motors move with

'two different speeds (such as when you want the robot to turn

'on the spot or follow a curved path) is

'Here is how to make your robot draw a square (you might

'have to adjust the value of 430° motor rotation which is

'supposed to make the robot turn 90°, especially if you are

'not using the standard Lego driving base model). We are

'using a value of 430° instead of the 215° used previously

'because only one wheel is turning here

Motor.Move ("BC", 40, 720, "True")

'Both the above examples will give squares with rounded

'corners because the robot will not turn on the spot.

'To make the robot do sharp turns on the spot

'(around the mid-point between the wheels) we must

'make the wheels turn in opposite directions as the robot turns:

Motor.MoveSync("BC", 40, -40, 215, "True")

This next example makes the robot trace out a regular polygon. The user must enter the desired number of sides into the text window:

Textwindow.Write ("Trace a polygon with how many sides (3-9)?")

sides=textwindow.ReadNumber()

degrees=2.39*360/sides 'Each wheel must turn this angle.

'Since each wheel turned 215° to make the robot turn 90°, we need to turn

'each wheel 215/90=2.39° to make the robot turn 1°.

Motor.Move("BC", 50, 720, "True")

Motor.MoveSync("BC", 20, -20, degrees, "True")

LCD.Text(1, 0,30, 1, "Control motors with")

LCD.Text(1, 0,45, 1, "directional buttons")

LCD.Text(1, 0,70, 1, "Left/Right: Motor B")

LCD.Text(1, 0,85, 1, "Up/Down: Motor C")

If Text.IsSubText(K, "L") then

'checks whether the text string in K contains "L" (because left button was pressed)

elseif Text.IsSubText(K, "R") then

If Text.IsSubText(K, "U") then

elseif Text.IsSubText(K, "D") then

Example using the Steer commands (Motor.MoveSteer, Motor.SyncSteer and Motor.StartSteer) and the Invert command. These commands are only available in version 1.2 and later of the EV3 extension. Note that the MoveSteer command makes the program pause until the corresponding movement has terminated, whereas the ScheduleSteer command does NOT wait..

# data[].attributes.attachment_link.description
Note that EV3 Basic is compatible with the large and medium EV3 motors and also with NXT motors. EV3 Basic makes no distinction between these different types of motor. EV3 Basic has nine commands that can be used to make motors move, but only four are really needed at beginner level: Motor.Move, Motor.MoveSync, Motor.Start and Motor.StartSync.

# data[].attributes.attachment_link.readable_text
rechterwiel port C
Linkerwiel port B
kleur sensor port D
Rechtsvoor touch sensor port A
sensor kijk port 4
linker touch port 2
rechter touch port 1

# data[].attributes.attachment_link.readable_text
In dit document eventuele ideeen noteren Voor het project:



-Ik denk trouwens met die robot dat we hem eerst op die standaard moeten laten staan, dan aanzetten, 
en wanneer hij gaat balanceren dat we dan die kleuren van die standaard voor z'n kleurensensor moeten houden.
///BartM

# data[].attributes.headline
Toelichting van de onderdelen van de robot

# data[].attributes.subject
Toelichting van de onderdelen van de robot

# data[].attributes.attachment_link.readable_text
- Wat vindt u van het idee dat wij de robots gaan gebruiken voor .........
- heeft u zelf enige opmerkingen hiervoor
- heeft u een voorkeur wat wij kunnen doen met de robot
- Wat is iets dat wij niet moeten vergeten bij de robot en zeer belangrijk is voor het eindproduct
- wat is de gewenste eindstituatie
- wanneer kunnen we spreken over een geslaagd project
- welke randvoorwaarden zijn van belang in dit project
- Hoe belangrijk is de manier waarop hhet resultaat/resultaten wordeng gerealiseerd
