This is all for the MPU6050 gyro/accelerometer which I'm using with an Arduino uno, however any time I try and use any of the example sketches with it the serial data comes out completely garbled.
As an example for the raw data sketch all that appears on the serial port is this...
It does scroll across meaning something is happening but somewhere that data is being garbled.
I haven't modified any of the sketches in any way, I just opened them and downloaded them to the Arduino.
My only guess is I might have messed up installing the libraries somehow, in some of the sketches I find that in the included libraries section some included libraries aren't highlighted in orange.... IE in #include <I2Cdev.h> the I2Cdev part appears in orange but in the #include <MPU6050.h> part the MPU6050 part of it won't highlight in orange so at a blind guess I assume this is where I might have gone wrong but can't figure out how.
Well if anyone runs into similar issues in future this problem turned out to be the serial data rate was far too high, the sketches that come with the library put the serial rate at 38400 which seems to be far to high for an arduino uno at least so lower them back down to something like 9600 and go up from there, im not sure what the max is but 38400 is just far too high and causes the serial output to be completely garbled.
Well if anyone runs into similar issues in future this problem turned out to be the serial data rate was far too high, the sketches that come with the library put the serial rate at 38400 which seems to be far to high for an arduino uno at least so lower them back down to something like 9600 and go up from there, im not sure what the max is but 38400 is just far too high and causes the serial output to be completely garbled.
That might be true for SoftwareSerial. For HardwareSerial, it is a load of hogwash.
Oddwired:
Well if anyone runs into similar issues in future this problem turned out to be the serial data rate was far too high, the sketches that come with the library put the serial rate at 38400 which seems to be far to high for an arduino uno at least so lower them back down to something like 9600 and go up from there, im not sure what the max is but 38400 is just far too high and causes the serial output to be completely garbled.