Exemplo n.º 1
0
 def __init__(self):
     Wheel.__init__(self, 62.4, 20)
Exemplo n.º 2
0
 def __init__(self):
     Wheel.__init__(self, 100.3, 17)
Exemplo n.º 3
0
 def __init__(self):
     Wheel.__init__(self, Sprocket_Wheel_Diameter * 10,
                    Sprocket_Wheel_Thickness * 10)
Exemplo n.º 4
0
from ev3dev2.motor import OUTPUT_A, OUTPUT_B
from ev3dev2.motor import MoveTank, SpeedPercent, LargeMotor
from ev3dev2.sound import Sound
from ev3dev2.led import Leds
from ev3dev2.button import Button
import time
import math
from spockbots.colorsensor import SpockbotsColorSensors
from ev3dev2.wheel import Wheel

colersensors = SpockbotsColorSensors()

# Wheel https://www.bricklink.com/v2/catalog/catalogitem.page?P=86652c01#T=C
diameter = 62.4  # mm
width = 20  # mm
tire = Wheel(diameter, 20)  # width is 20mm

sound = Sound()
leds = Leds()

tank = MoveTank(OUTPUT_B, OUTPUT_A)
tank.left_motor.polarity = 'inversed'
tank.right_motor.polarity = 'inversed'

ev3button = Button()


def button(which):
    # which = up, down, left, right, enter, backspace
    return ev3button.check_buttons(buttons=[which])