Thanks to the help from this forum i have managed to get data for my project, though a little bodged!
For those who havent seen my project guidance thread, i am trying to use multiple MPU6050 accelerometers to measure the accelerations of the sprung (body of the motorcycle) and unsprung (wheels, brakes, suspension etc.) masses from a motorcycle for my dissertation. thread below;
Currently i am using two accelerometers and Jeff Rowbergs code. One attached to an UNO R3, one to a NANO and having to initialise them separately which is a pain and doesn’t give the data as a matching set so i can see when the masses start to move and i have to proces the data manually. I am currently trying to implement a wireless network of these accelerometers using NRF24L01 radio modules. One of these is attached to a Nano with an accelerometer so each accelerometer has the data processed by the Nano and then the data output is sent to the radio to send to a central Mega which collects the data from all of these sensors (up to 5) and then stores it on an SD card.
i would like to start all of the sensors, so that they are collecting data, at once and then send the data through using the radio modules. My problem is that in Jeffs code it requires you to “send a character to begin the demo” Preferably i would like to use a simple push to make switch to start the data flow. However i am unsure of how to remove the send any character protocol to change it to a switch. I have tried starting the code using a character and then using a switch but it fills up the fifo buffer, even with just one accelerometer hard wired to an UNO. So how would i go about removing the send a character part to replace with a switch. Attached is the original code taken straight from the example. Thank you
MPU6050_DMP6.ino (16.8 KB)