-
Notifications
You must be signed in to change notification settings - Fork 105
/
test.ts
34 lines (33 loc) · 1.15 KB
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Add your code here
maqueen.motorRun(maqueen.Motors.M1, maqueen.Dir.CW, 100)
basic.pause(1000)
maqueen.motorRun(maqueen.Motors.M2, maqueen.Dir.CW, 100)
basic.pause(1000)
maqueen.motorRun(maqueen.Motors.All, maqueen.Dir.CW, 100)
basic.pause(1000)
maqueen.servoRun(maqueen.Servos.S1, 90)
basic.pause(1000)
maqueen.servoRun(maqueen.Servos.S2, 90)
basic.pause(1000)
maqueen.motorStop(maqueen.Motors.M1)
basic.pause(1000)
maqueen.motorStop(maqueen.Motors.M2)
basic.pause(1000)
maqueen.motorStop(maqueen.Motors.All)
basic.pause(1000)
maqueen.writeLED(maqueen.LED.LEDLeft,maqueen.LEDswitch.turnOn)
basic.pause(1000)
maqueen.writeLED(maqueen.LED.LEDLeft,maqueen.LEDswitch.turnOff)
basic.pause(1000)
maqueen.writeLED(maqueen.LED.LEDRight,maqueen.LEDswitch.turnOn )
basic.pause(1000)
maqueen.writeLED(maqueen.LED.LEDRight,maqueen.LEDswitch.turnOff)
serial.writeLine("L:" + maqueen.readPatrol(maqueen.Patrol.PatrolLeft))
basic.pause(1000)
serial.writeLine("R:" + maqueen.readPatrol(maqueen.Patrol.PatrolRight))
basic.pause(1000)
basic.pause(1000)
serial.writeLine("V:" + maqueen.IR_read_version())
basic.pause(1000)
serial.writeLine("CM:" + maqueen.Ultrasonic())
basic.pause(1000)