Subversion Repositories svnkaklik

Rev

Rev 324 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 324 Rev 325
Line 37... Line 37...
37
	Dim motors As Byte
37
	Dim motors As Byte
38
	Dim sensors As Byte
38
	Dim sensors As Byte
39
	Dim buttons As Byte
39
	Dim buttons As Byte
40
	Dim leds As Byte
40
	Dim leds As Byte
41
	Dim count As Long
41
	Dim count As Long
-
 
42
	Dim cas As Long
42
	Dim i As Long
43
	Dim i As Long
43
 
44
 
44
	'NASTAVENI IO
45
	'NASTAVENI IO
45
	lata=0xFF
46
	lata=0xFF
46
	latb=0
47
	latb=0
Line 84... Line 85...
84
	loop
85
	loop
85
	lata = 0xFF
86
	lata = 0xFF
86
 
87
 
87
		
88
		
88
Do while 1
89
Do while 1
89
 
90
  cas = 0
90
  sensors =0xFF 
91
  sensors =0xFF 
91
  sensors = Call receive()	'prijmi stav cidel senzoru
92
  sensors = Call receive()	'prijmi stav cidel senzoru
92
		
93
		
93
  If (!((sensors.0) and (sensors.1))) Then
94
  If (!((sensors.0) and (sensors.1))) Then
94
    motors = 0x77
95
    motors = 0x77
95
  End If
96
  End If
96
			
97
			
97
  If (!(sensors.2)) Then
98
  If (!(sensors.2)) Then
-
 
99
    If cas< 400000 Then
-
 
100
      cas = cas + 1
-
 
101
    End If
-
 
102
    cas = 0
98
    motors = 0xF7
103
    motors = 0xF7
99
  End If
104
  End If
100
		
105
		
101
  If (!(sensors.3)) Then
106
  If (!(sensors.3)) Then
-
 
107
    If cas< 400000 Then
-
 
108
      cas = cas + 1
-
 
109
    End If
-
 
110
    cas = 0
102
    motors = 0x7F
111
    motors = 0x7F
103
  End If 
112
  End If 
104
				
113
	
-
 
114
  cas = cas+1			
105
  lata = sensors
115
  lata = sensors
106
  call send(motors)
116
  call send(motors)
107
		
117
		
108
Loop
118
Loop
109
  	
119