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):
2121
2222scanner = Scanner ()
2323uart_client = UARTClient ()
24- uart_addresses = []
2524
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 )
3328
3429while True :
30+ uart_addresses = []
31+ # Keep trying to find a UART peripheral
32+ while not uart_addresses :
33+ uart_addresses = uart_client .scan (scanner )
3534 uart_client .connect (uart_addresses [0 ], 5 )
35+
3636 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 )
4040
4141 color = (r , g , b )
4242 print (color )
You can’t perform that action at this time.
0 commit comments