File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -21,22 +21,22 @@ def scale(value):
21
21
22
22
scanner = Scanner ()
23
23
uart_client = UARTClient ()
24
- uart_addresses = []
25
24
26
- # Keep trying to find a UART peripheral
27
- while not uart_addresses :
28
- uart_addresses = uart_client .scan (scanner )
29
-
30
- a0 = AnalogIn (board .A0 )
31
- a1 = AnalogIn (board .A1 )
32
- a2 = AnalogIn (board .A2 )
25
+ a3 = AnalogIn (board .A3 )
26
+ a4 = AnalogIn (board .A4 )
27
+ a5 = AnalogIn (board .A5 )
33
28
34
29
while True :
30
+ uart_addresses = []
31
+ # Keep trying to find a UART peripheral
32
+ while not uart_addresses :
33
+ uart_addresses = uart_client .scan (scanner )
35
34
uart_client .connect (uart_addresses [0 ], 5 )
35
+
36
36
while uart_client .connected :
37
- r = scale (a0 .value )
38
- g = scale (a1 .value )
39
- b = scale (a2 .value )
37
+ r = scale (a3 .value )
38
+ g = scale (a4 .value )
39
+ b = scale (a5 .value )
40
40
41
41
color = (r , g , b )
42
42
print (color )
You can’t perform that action at this time.
0 commit comments