Happy April Fools! I didn't see any pranks this year :(
I'm going back to trying to make the whole instrument wireless. I already have the FSRs. I just need my two I2C sensors to be wireless now (Sparkfun LIS3DH and the TCS34725). The IR sensor is connected to the LIS3DH first analog pin.
I found a paper where they used the same HUZZAH Feather and an Adafruit LIS3DH, worn by a dancer and sent to Max through UDP:
I played around with the Arduino code that's in their appendix and cut out the bits of code that I don't necessarily need, like controlling the blue and red LEDs on the board. Even though I have the Sparkfun breakout of this particular accelerometer, it still technically works. However, I like how the Sparkfun version prints out its data better than the Adafruit version. I think it has something to do with their libraries. The Sparkfun version prints each axis of data between (1, 0, -1). Whereas the Adafruit prints numbers in the thousands.
I am currently having troubles trying to get the way the Sparkfun version to work through UDP. They way it is called to print in serial is not friendly with "message.add" the same way the Adafruit version is. If I have to, I'll use the Adafruit library, but for now I'll keep tinkering away at this.
Edit: I figured out how to get the LIS3DH working wirelessly with the Sparkfun library! And it's printing the way it should! It works when I adapted the other LIS3DH code, but I get strange errors that shouldn't be happening when I try to use it with an adapted multiplexer code. Like it said that 'Udp' does not have an end type, for a piece of standard Udp code that's the same no matter what example you use. I know I must have overlooked something. Regardless, now I need to see if I can get the working LIS3DH code put together with the FSR multiplexer.
Edit2: I DID IT!!!!!! I figured out how to make both the multiplexer and the LIS3DH wireless in the same code! In the end I think it's more similar to the wireless mux code than the other wireless Adafruit LIS3DH dancer code. Whatever went wrong with the LIS3DH before, isn't happening now. However, the dancer code did provide an example of how to handle multiple messages being spent. I learnt from it that this code needs to be put in place after each sensor (or in the case of the mux, after the whole mux):
I also learnt from the dance code that the "msg.(whatever) can actually be named anything for each sensor. So for the mux I have it as "msgmux" and for the LIS3DH I have it as "msglis".
If you are looking for a summary for my Masters thesis, it is here.