TigerJython4Kids | robotics |
Deutsch English |
Real-aund Simultion mode
Function | Action |
forward() | sets the robot in forward motion |
backward() | sets the robot in backward motion |
left() | sets the robot in a left turn (one motor in forward, the other in backward rotation) |
right() | sets the robot in a right turn (one motor in forward, the other in backward rotation) |
leftArc(radius) | sets the Maqueen to a left curve with given radius (in m) |
rightArc(radius) | sets the Maqueen to a right curve with given radius (in m) |
stop() | stops the movement |
setSpeed(speed) | sets the speed for all movements (0..100) |
calibrate(offset, differential, arcScaling) (only real mode) |
calibrates motors, if the robot does not drive straight |
setPID(1) [only mbrobot_plus, real mode] | reduces the speed, the robot moves slower (at walking pace) |
setPID(0) [nur mbrobot_plus, real mode] | PID is switched off, robot moves at given speed |
getDistance() | returns the distance (in mm) measured with the ultrasonic sensor |
irLeft.read_digital(), irRight.readDigital() | infrared sensors return 0, if floor is dark; 1, if floor is bright Maqueen PlusV2 has 5 IR-Sensors (irL1, irR1, irL2, irR2, irM) Maqueen Plus has 6 IR-Sensors ((irL1, irR1, irL2, irR2, irL3, irR3) irX.read_digital() return 0 or 1 |
setLED(1) | turns LEDs on mbRobot_plus has 7 colors(1:rot, 2:grün, 3:gelb, 4:blau, 5:pink, 6:cyan, 7:weiss) |
setLED(0) | turns LEDs off |
setLEDLeft(n) | turns left LED on (n = 1) or off (n = 0) |
setLEDRight(n) | turns the right LED on (n = 1) or off (n = 0) |
setAlarm(1) | sets alarm on |
setAlarm(0) | sets alarm off |
setServo(port, angle) | urns the servomotor connected to port S1 or S2 (or P1 or P2) to the specified angular position. (0 <= angle <= 180) |
playTone(freq, duration) | plays a tone of a given frequency and duration |
RobotContext. enableTrace(True) [only S] |
robot leaves traces |
RobotContext. enableRotCenter(True) [only S] |
draws the center of rotation for movements on a circular arc |
RobotContext. useBackground("sprite") [only S] |
adds a background image for the simulation with light or color sensors |
RobotContext. setStartPosition(x, y) [only S] |
places the simulated robot at the position (x, y) in the graphics window |
RobotContext. setStartDirection(w) [only S] |
determines the start direction (0: east, 90: north, 180: west, 270: south) |
RobotContext. useObstacle("sprite", x, y) [only S] |
adds an image with transparent background at position x,y |
setBeamAreaColor() [only S] | sets the color of the beam area boundaries |
setProximityCircleColor() [only S] | sets the color of the proximity circle |
setMeshTriangleColor() [only S] | sets the color of the mesh triangles |
eraseBeamArea() [only S] | erases the beam area boundaries |
motL, motR | motor left, motor right |
motX.rotate(speed) | sets the left or right motor in motion with the rotation speed speed. For speed > 0 forwards, for speed < 0 backwards, speed = 0 stops the rotation |