The skipped data issue with the Arduino has been solved. All I had to do was bump up the baud rate. But I'm keeping my workaround in the Max patch as a safeguard.
Now the ESP8266 is giving me grief... I woke up with a brilliant idea. What if I solder in headers to the circuitboard for both the NRF24l01 modules and the ESP8266 module. Before I was able to get the NRF24l01 working to send one analog sensor data to another NRF24l01, then the receiving arduino it printing out the data into the computer through the cable. If I could get it to work for all my sensors, then I can move forward with my instrument prototype, solder the circuitboard and take my time troubleshooting the ESP8266. When I am ready for the ESP8266, I can just easily unplug the NRF24l01 and plug in the ESP8266. One problem. The NRF24l01 uses SPI. Previously I couldn't figure out how to use I2C busses to have the LIS3DH work with the TCS34752. That's why I plugged the LIS3DH in using SPI. I tried to figure out how to have two SPI devices, but when I uploaded my code, I did not see any data being sent to the receiving NRF23l01. It is difficult to troubleshoot whether this is a wireless problem or a two devices using SPI problem. I looked it up and I'm not the only one who struggles trying to get the NRF24l01 to work with other SPI devices. Then I thought of another workaround. Before I was comparing the LIS3DH against the ADXL337. I ultimately picked the LIS3DH because it was very exact about its orientation with 1's, 0's, and -1's. The ADXL337 gives more of a loose range for each of the xyz data. Therefore it would require a little more Max programming. However, it is an easy workaround to my problem. It uses three analog pins to send its data, not SPI or I2C. So it would not cause me any grief for making the Arduino sketch work for it and my other sensors. So now I have a new "to-do". 1) Test the simple ADXL337 example code to be sure I want to go with this workaround. 2) Make sure I am able to use this with the rest of my sensors, and the mux through serial. 3) Combine the giant sketch with the NRF24l01
0 Comments
Leave a Reply. |
Welcome!If you are looking for a summary for my Masters thesis, it is here. Archives
October 2023
Categories |