thingy53 rgb_led sample

I'm trying to test the RGB led on the thingy53.

Using the sample:
C:\ncs\v2.6.0\zephyr\samples\basic\rgb_led
which gives errors about the devices error: '__device_dts_ord_DT_N_ALIAS_red_pwm_led_P_pwms_IDX_0_PH_ORD' undeclared
I would have thought those would be defined just as they are on the thingy52.

I found the following which provided some devicetree overlays, which I have tried without success.
https://devzone.nordicsemi.com/f/nordic-q-a/73245/controlling-rgb-led-on-nordic-thingy-52-using-nrf52-sdk

Am I supposed to create an overlay for thingy53 to use the RGB led?  Can you help me get one that works?  I have tried attached.

thingy53_nrf5340_cpuapp.overlay

  • I guess you'll have to start off finding the leds you want to use in the Thingys on the DK, and find what SoC you want to program for controlling it. By flashing thingy91x_nrf5340_cpuapp you are targeting the nRF5340 SoC on the board, but you could also program the nRF9160 if you wanted to. 

    tldr said:
    looking at the dts for the 91 I don't see any i2c defined either.  Based on your details about the two chips and the lack of BLE on one vs the other; sounds like the thingy91 is quite a bit of work to get the same code working on both. 

    I might be misunderstanding you here. Though you can have a look at thingy91_nrf9160_common.dts for the i2c. For how to get it working on the Thing91, I see there's been a previous case about this here that you can have a look at.

    tldr said:
    I understand it is not a sample from nordic; would be nice to use names that match upstream so that simple examples just work (at least for the rgb; its like hello world).

    With Blinky I agree, that should be easy to get supported on all boards right out of the box. But not all boards have rgb leds for instance

    Have a good week-end! 

    Regards,

    Elfving

  • I still haven't spent the time to figure out how to make the needed changes to make this work (thingy91 is low on my priority list and this is basic sample);

    I think the alias to make this work should be added to the default overlay for the thingy devices; both devices have a buzzer and an alias for that would be nice too.  the buzzer less so important; but if we're fixing overlay files... 

    the upstream "hello world" of rgb leds should work for beginners out of the box;  if I go to the effort of fixing this for the 91, I'd like to submit a PR.  What repo would that be?

    If you have the fix, then someone looking for the rgb_led-sample forum post and find this.

  • tldr said:
    the upstream "hello world" of rgb leds should work for beginners out of the box;  if I go to the effort of fixing this for the 91, I'd like to submit a PR.  What repo would that be?

    The Thingy53 is part of the Upstream Zephyr, so this the PR for this, would go to the same repo, given that the RGB sample is in Zephyr.
    However, the Thingy91 is part of the Nordic repo, so it would not be clean to make a board overlay in Zephyr for a board that is not available in zephyr by default. We got our own fork of zephyr over at sdk-zephyr, but we try to keep this as similar to upstream zephyr as possible.

    Because of this, I would not suggest adding Thingy91 support to any Zephyr samples, but rather suggest that Thingy91 users get started with samples from sdk-nrf instad.

    Regards,

    Elfving

  • I still dont have a thingy91 solution available for this sample. I will comment here if I attempt it again.

Related