Skip to content

Make particle Xenon analog RGB LED available to user#2803

Closed
iayanpahwa wants to merge 1 commit into
adafruit:masterfrom
iayanpahwa:xenon_led_fix
Closed

Make particle Xenon analog RGB LED available to user#2803
iayanpahwa wants to merge 1 commit into
adafruit:masterfrom
iayanpahwa:xenon_led_fix

Conversation

@iayanpahwa
Copy link
Copy Markdown

@iayanpahwa iayanpahwa commented Apr 22, 2020

Particle Xenon has an on-board analog RGB LED but .with it's current configuration in CircuitPython it is not available to user.

`

import board
import digitalio
led = digitalio.DigitalInOut(board.RGB_LED_BLUE)
Traceback (most recent call last):
File "", line 1, in
ValueError: RGB_LED_BLUE in use
`

It is understandable that this RGB LED could have been used to show bootloader status but it doesn't follow the standard set by CircuitPython project, making it unusable and not to mention it stays on all the time with some weird colour (power usage) ,

So IMHO it is a good idea to rather make this LED available to user within CircuitPython.

Fix tested on top of release 5.2.0

`

import board
import digitalio
led = digitalio.DigitalInOut(board.RGB_LED_BLUE)
led.direction = digitalio.Direction.OUTPUT
led.value = 1
led.value = 0
`

@iayanpahwa iayanpahwa changed the title Make RGB LED available for user Make particle Xenon analog RGB LED available for user Apr 22, 2020
@iayanpahwa iayanpahwa changed the title Make particle Xenon analog RGB LED available for user Make particle Xenon analog RGB LED available to user Apr 22, 2020
@tannewt
Copy link
Copy Markdown
Member

tannewt commented Apr 22, 2020

I don't want to lose the status functionality. To provide user access we should add custom exceptions to "busy pin" detection like we do for neopixel. https://github.com/adafruit/circuitpython/blob/master/ports/nrf/common-hal/microcontroller/Pin.c#L97

@tannewt tannewt closed this Apr 22, 2020
@iayanpahwa
Copy link
Copy Markdown
Author

Thanks @tannewt I will look at that approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants