I I stacked the sensor board on top of the pixel blaze 3 as described on the website. Doesn’t seem to be working. does the sensor expansion board need separate power going to the 3 volt pin or is it powered off the pixel Blaze 3? Also several the patterns have an impossible figure of -1 at the beginning of the code well this figure change when I’m looking at the code or is it just not used when a sensor board is detected.
Thank you
it’s powered off the PB.
What patterns are you talking about? Different people have coded many things. They don’t all work the same.
I found it easy to put the board on incorrectly and it doesn’t work. I also damaged mine to the point where it wouldn’t work even after mounting it correctly. I don’t know if I soldered/desoldered to many times or what happened. In any case I had to buy a new sensor board and it fixed the problem. I double checked my installation before I powered it up.
Hi @Twilight ,
The status area (top right of the page) will update when a sensor board is detected.
Without:
With:
If that is showing up, you can inspect the data it’s sending (any exported variables) in the Vars Watch within the editor e.g. with a pattern like this:
export var frequencyData
export var energyAverage
export var maxFrequencyMagnitude
export var maxFrequency
export var accelerometer
export var light
export var analogInputs
export function render(index) {
}
Enabling Vars Watch you should see these values updating based on what it senses:
If it’s not detecting your sensor board, can you post photos of the mounting and soldering? We might be able to help troubleshoot remotely.
I think I wrote the code you’re talking about in the default patterns. Ben taught me this trick for detecting whether a sensor board is connected. I commonly use it to consume sensor board data if it’s present, or to generate synthetic sensor data if one is not connected.
// Values that come from the Sensor Board
export var light = -1 // If this remains at the impossible value of -1, a sensor board is not connected.
function SB() { return light != -1 }
export var frequencyData = array(32)
export var energyAverage, maxFrequency, maxFrequencyMagnitude
This is from a recent pattern I wrote. If a sensor board is connected, Pixelblaze will be setting values for light
(light is a special variable name, where if you put export var
in front of it AND a sensor board is connected, the light readings start magically being populated into the variable). Even if the sensor board is in pitch darkness, light
will be set to 0 instead of -1, so you know a sensor board is present. For a list of all special variables names that work this way, just see the docs on the Pixelblaze code editor page.
This technique is also shown a different way (using an impossible value in the frequencyData
array) on the sensor board page.
Thank you everyone it’s obviously my solder job then! Going back and checking my connections
That’s correct, most values are tiny numbers.
awesome thanks for the clarification yesterday I was bouncing back and forth between it is connected and wait maybe it’s not connected. Lol