I wanted to confirm/perhaps receive an example for using Neopixels with the Navigator board. I am generally unfamiliar with Neopixels and have not used them, but am including /want to include them in an AUV mast design.
If I purchased this Neopixel array, am currently assuming that in terms of using the Neopixel Library, that since this array contains seven elements, that when I use the Navigator Library in C++, I will need to populate my RGB array with 24 values for an RGB value of each indexable RGB in the array - including the Neopixel which is on board (three elements for defining the Neopixels RGB values), and then 21 more, for the sevel subsequent Neopixelâs RGB triplet?
The board itself has a RGB LED, not sure if this will interfere with the RGBW strip, it should be connected in parallel so it may work.
We are updating the libraries to support it, we donât have the strip to test, so please report if it works. Iâll update there once we do the releases for C++ / Python, Rust should be released in the next hour.
The RGBW function works fine for the onboard LED, however Iâm looking to use an RGB/RGBW strip. Inside the Rust Library I see that you have a fixed strip size, which prevents the set_neopixel_rgb/set_neopixel_rgbw function from iterating over a complete strip.
When I have a Neopixel array connected to the pins, the first in the array has the same value as the Neopixel that is on the board, however I cannot assign values to the rest of the pixels in the array, and the program crashes since the function tries to assign a value to an element outside the length of the array.
Is there a way for us to change this on our end, or do we need to wait for a patch which lets us set the strip size?
Also, I have been using 0.0.3 so it hasnât been an issue, but the bindings.h file that gets generated upon updating, needs to include a preprocessor directive such as â#pragma onceâ or â#ifnotdef NAVâŠ, #def NAVâŠâ. I have applications which use features on the board which are not mutually exclusive and can be ran in separate moos apps/ros nodes, where there is a clash during compilation. For example, I have an application for managing the IMU/Mags, and another app which manages PWM outputs and ADC readings. I have common libraries, references, and utilities, where bindings.h is included and referenced between the two apps.
Would you be able to post an update so I can test a complete strip?
We can do a release of the strip size access via python and C++ next week (Itâs already available in Rust).
The second navigator may be tricker, but Iâll try to add it in the same release as well.
That would be greatly appreciated! Thanks. We have some presentations coming up soon and I wanted to include a vehicle demonstration (not the critical part, but the LEDs are a nice touch).
For the magnetometer, I was looking through BRâs repos and crates and I couldnât see any supporting libraries. Have you been able to successfully interface with the second magnetometer?
The one that is onboard is pretty good - the following photos are from the calibration routine I have in C++/Python. When tested outside, it only needed offset constants, and the scaling matrix was almost identity.
First image is simply the raw data, where the blue sphere is the target, and the point cloud is where we sampled in time series.
The coefficients were only
b = [-6.802798693134499,-12.810034812439271,3.8460008279144398]â
A = [1.0573555731245843,0.0017889995888048583,0.002088227906481734; 0.0017889995888048583,1.0516530952316332,-0.0017990317696794096; 0.0020882127768074685,-0.0017990317696794096,1.0372066316037334]
While the main one we have access to is good, the orientation filters I was using was somewhat unstable when I included the magnetometer (i.e. a change in roll over 5 degrees induced a change in yaw, in controlled conditions). This was using Madgwickâs library from his thesis/some of his papers - I am aiming to include the second Magnetometer soon and include the measurements in a more cohesive sensor fusion stack.
Iâm glad that the neo rgbw support an generic led array strips are working for you.
About the second magnetometer, itâll take longer than expected. But we expect to add it this quarter.