Crazyflie and NeoPixel ring continued

Continuing our post last week here’s a video showing the Adafruit NeoPixel ring and some of the effects that we did. The client code still needs some cleaning up, but the firmware is pushed here.

The firmware implementation includes two parameters, ring.neffect and ring.effect. The first parameter is used to know how many effects are implemented and the second one is used to set the index of the effect that should be used. For our current implementation we just loop though all the effects with either a joystick button or using the thumb together with the Leap Motion. It’s also possible to use these parameters directly from the UI as seen in this blog post.

Params for NeoPixel

 

Some of the effects we implemented are just blinking patterns, but we also wanted the ability to show feedback from the firmware using the ring. This has been enabled by adding an API in the firmware to access variables exposed though the logging framework. Using this API the firmware can access the same variables in the logging as the client. This enables all kinds of fun possibilities. In the video you can see (blurred) our implementation showing which direction the Crazyflie is tilting, but we have also been working on showing thrust (think rocket :-) ) as well as other things. We have done our best to implement a couple of effects, but there is so much more cool effects that could be done. So the firmware allows for custom effects and also for mixing multiple effects together (see this code).

3 comments on “Crazyflie and NeoPixel ring continued

  • Hi
    Could you publish the Python client code to operate the nano ring with the joystick.

    Thanks in advance.

    Andres

    • I actually did this mod and hacked in some python code to handle manipulating the effects via the controller. I did some cheap workaround for getting the value of ring.neffect (hardcoded – I’m not discovering it from firmware but should be) and some of the other parts of the implementation aren’t as clean as I’d like. You can find my tweaks on my GitHub fork of the cfclient python code

    • Ok. Python client code for this is all cleaned up and properly pulling and pushing necessary values to/from the CF firmware. Also works in the cfheadless client. It’s in the neopixel_dev branch of my GtiHub fork. You need to add a line to you input config mapping a button to control the effects. Here’s an example for PS3 top-right shoulder button:


      {"name":"NeoPixel Effect", "type":"Input.BUTTON", "id":11, "scale":1.0, "key":"ring_effect"}

      Have fun!

Leave a Reply to Andres Cancel reply

Your email address will not be published. Required fields are marked *