2022 7 8
stop(), Stop() Լ ߰
sensor Ŭ sensor.CNT ߰, 0.08 īƮ ( 0.13 īƮ)
̽ ϽŴٸ, ̺귯 ٿ Ͻñ ٶϴ.
Ƽ ̽ 2021.03.31
|
|
|
|
1
|
Open()
|
Open('com3'), BT('com3'), Bt('com3'), bt('com3'), Open(), BT(), Bt(), bt()
|
|
2
|
Close()
|
Close(), close()
|
|
3
|
Go(300,300)
|
Go(300,300), go(300,300), GO(300,300)
|
|
4
|
Steering(1), Steering2(-127,0),
Steering3(-127)
|
Steering(-127), steering(-127), STEERING(-127) -127 ~ 127 θ
|
|
5
|
Display('A')
|
Display('A'), display('A'), DISPLAY('A')
|
|
6
|
DisplayLine(0xff,0xff,0xff,x0ff,0xff,0xff,0xff,0xff)
|
DisplayLine(0xff,0xff,0xff,x0ff,0xff,0xff,0xff,0xff)
displayline(0xff,0xff,0xff,x0ff,0xff,0xff,0xff,0xff)
displayLine(0xff,0xff,0xff,x0ff,0xff,0xff,0xff,0xff)
DISPLAYLINE(0xff,0xff,0xff,x0ff,0xff,0xff,0xff,0xff)
|
|
7
|
Sound(37)
|
Sound(37), sound(37), SOUND(37)
|
|
8
|
Light(0xc0ff), Led(0xc0ff)
|
Light(0xc0ff), light(0xc0ff), LIGHT(0xc0ff)
Led(0xc0ff), led(0xc0ff), LED(0xc0ff)
|
|
9
|
Displayon(8,8)
|
Displayon(8,8), DisplayOn(8,8), DisplayON(8,8)
displayon(8,8), DISPLAYON(8,8)
|
|
10
|
Displayoff(8,8)
|
Displayoff(8,8), DisplayOff(8,8), DisplayOFF(8,8)
displayoff(8,8), DISPLAYOFF(8,8)
|
|
11
|
delay(1000)
|
delay(1000), Delay(1000)
|
|
12
|
class SensorData :
CDSSensor = 0
IRSensor = [0,0,0,0,0,0,0]
Battery = 0
GSensor = [0,0,0,0]
MSensor = [0,0,0,0]
GySensor = [0,0,0,0]
TorqueSensor = [0,0,0]
TemperatureSensor = 0
SteeringVar = 0
SteeringTorque = 0
Remote = 0
MTemperature = 0
|
class SensorData :
CDS = 0
IR = [0,0,0,0,0,0,0,0]
Bat = 0
Acc = [0,0,0,0]
Mag = [0,0,0,0]
Gyro = [0,0,0,0]
MCur = [0,0,0]
Temp = 0
StVar = 0
StCur = 0
Remote = 0
MTemp = 0
|
ª
|
13
|
data=Sensor(10)
|
0.08 Ÿ̸
sensor.CDS, sensor.IR[1] ϸ ˴ϴ.
|
|
14
|
ܼ 1 IR[0]
ܼ 2 IR[1]
ܼ 3 IR[2]
ܼ 4 IR[3]
ܼ 5 IR[4]
ܼ 6 IR[5]
|
ܼ 1 IR[1]
ܼ 2 IR[2]
ܼ 3 IR[3]
ܼ 4 IR[4]
ܼ 5 IR[5]
ܼ 6 IR[6]
|
Ʈ 1 ~ 6
|
15
|
|
auto(ir1,ir2,ir3,dir=0,th=15,sp=350,bsp=-400) # Լ
|
|
|