kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Renamed LED_DAT to LED_DATA
rodzic
852cfca7c5
commit
e4bb26b081
|
@ -25,7 +25,7 @@ namespace servo2040 {
|
|||
const uint SERVO_17 = 16;
|
||||
const uint SERVO_18 = 17;
|
||||
|
||||
const uint LED_DAT = 18;
|
||||
const uint LED_DATA = 18;
|
||||
|
||||
const uint ADC_ADDR_0 = 22;
|
||||
const uint ADC_ADDR_1 = 24;
|
||||
|
|
|
@ -42,7 +42,7 @@ mux = AnalogMux(servo2040.ADC_ADDR_0, servo2040.ADC_ADDR_1, servo2040.ADC_ADDR_2
|
|||
muxed_pin=Pin(servo2040.SHARED_ADC))
|
||||
|
||||
# Create the LED bar, using PIO 1 and State Machine 0
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DAT)
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DATA)
|
||||
|
||||
# Start updating the LED bar
|
||||
led_bar.start()
|
||||
|
|
|
@ -18,7 +18,7 @@ BRIGHTNESS = 0.4 # The brightness of the LEDs
|
|||
UPDATES = 50 # How many times the LEDs will be updated per second
|
||||
|
||||
# Create the LED bar, using PIO 1 and State Machine 0
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DAT)
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DATA)
|
||||
|
||||
# Create the user button
|
||||
user_sw = Button(servo2040.USER_SW)
|
||||
|
|
|
@ -34,7 +34,7 @@ for addr in sensor_addrs:
|
|||
mux.configure_pull(addr, Pin.PULL_DOWN)
|
||||
|
||||
# Create the LED bar, using PIO 1 and State Machine 0
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DAT)
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DATA)
|
||||
|
||||
# Start updating the LED bar
|
||||
led_bar.start()
|
||||
|
|
|
@ -29,7 +29,7 @@ END_PIN = servo2040.SERVO_8
|
|||
servos = ServoCluster(pio=0, sm=0, pins=list(range(START_PIN, END_PIN + 1)))
|
||||
|
||||
# Create the LED bar, using PIO 1 and State Machine 0
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DAT)
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DATA)
|
||||
|
||||
# Create the user button
|
||||
user_sw = Button(servo2040.USER_SW)
|
||||
|
|
|
@ -12,7 +12,7 @@ If you encounter issues, try resetting your board.
|
|||
"""
|
||||
|
||||
# Create the LED bar, using PIO 1 and State Machine 0
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DAT)
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DATA)
|
||||
|
||||
# Start updating the LED bar
|
||||
led_bar.start()
|
||||
|
|
|
@ -187,7 +187,7 @@ from servo import servo2040
|
|||
|
||||
Then construct a new `WS2812` instance, specifying the number of LEDs, PIO, PIO state-machine and GPIO pin.
|
||||
```python
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DAT)
|
||||
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DATA)
|
||||
```
|
||||
|
||||
Finally, start the LED bar by calling `start`:
|
||||
|
@ -227,7 +227,7 @@ The `servo` module contains a `servo2040` sub module with constants for the serv
|
|||
|
||||
#### LED Pin
|
||||
|
||||
* `LED_DAT` = `18`
|
||||
* `LED_DATA` = `18`
|
||||
|
||||
|
||||
#### I2C Pins
|
||||
|
|
|
@ -204,7 +204,7 @@ STATIC const mp_map_elem_t servo2040_globals_table[] = {
|
|||
{ MP_ROM_QSTR(MP_QSTR_SERVO_17), MP_ROM_INT(16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SERVO_18), MP_ROM_INT(17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NUM_SERVOS), MP_ROM_INT(18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED_DAT), MP_ROM_INT(18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LED_DATA), MP_ROM_INT(18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NUM_LEDS), MP_ROM_INT(6) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_INT), MP_ROM_INT(19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_INT(20) },
|
||||
|
|
Ładowanie…
Reference in New Issue