SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Miscellaneous category should be posted in this forum. For Kits, please post in the Kits forum.
I downloaded the example Mux code for the accelerometers and tried to replace the accel info with the distance sensors. But
it calls out for a Shield. When I was ordering the electronics, I was told that I hook up the two sensorswity two 500mm Qwick cables to the Mux and then the Mux to the Red board. Correct?
The second question is in the code The error says Mydistance was not declared?
Generally, anytime you see "was not declared in scope" you're missing a library for the part you're trying to compile code for.

I'd recommend starting with on sensor and following our hookup guide to get that running first. ... okup-guide

Once you have one sensor running, it shouldn't be too hard to get two working.
Have tried the examples and switched the code for the RFD77402 sensors (2x).
THe Mux is the 8 channel (TCA9548A) 14685.
I cannot get the two sensor to workthru the MUX cos ?
Sadly I do not have example code for using those specific sensors with the Qwiic Mux Breakout and that's something you're going to need to write on your own. I can tell you that the tab named Mux_Control that loads with the example sketch is where the code that switches ports on the MUX lives. When you call enableMuxPort(x) or disableMuxPort(x) from your main sketch, that will jump into the Mux_Control tab and either enable or disable whatever port you specify.

For example, if you want to read a sensor on port 1, you would enable port one, run the code that reads the sensor and then you would disable port 1. If you were jumping to port 2 next, you'd enable port 2, run the code that reads the sensor on port 2, then when you're done, disable port 2.
I have seen on Arduino a reference to some code called 12c_scanner. Do you knwo where I can get this?
A google search turns up this link:
Arduino playground I2C Scanner