Black Lives Matter - Action and Equality.
0

MPU6050 data to AdafruitIO using Adafruits please help
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

MPU6050 data to AdafruitIO using Adafruits please help

by Pwelco on Sat Apr 18, 2020 3:41 pm

sketch MPU6050-AdafruitIO 15APR20 0945AM.txt
the code here is pasted into notepad
(4.48 KiB) Downloaded 9 times
Just to be clear, I am not a programmer but know enough to be dangerous and have been successful in my other Arduino projects.

What I am using:
Adafruit Feather HUZZAH with ESP8266 WiFi
mpu6050 / GY-521
Adafruit IO

On this project I am stumped (not hard to do...) with the code for uploading data from a MPU6050 to Adafruit IO. I have done hours/days/weeks of web searches trying to find the right code to help get movement data from an MPU6050 or GY-521. What I want to graph is a single feed that tells what day/time the mpu6050 was moved and how much. After that add up to 5 feeds from several say six mpu6050's. Baby steps.

What I have done is started with both the Adafruitio_08_analog_in and the Adafruit mpu6050_unifiedsensors example sketches. I just cant figure it out. I have a dashboard with a feed and graph block.
For the code attached I am just at first trying to see temperature from the mpu6050. You can laugh when you see my butchered code. I won't mind :)

I am getting data to the graph block but its flatline or rather a 1 when I look at the Arduino serial monitor.

Please be positive and constructive with your questions and comments,
Thx! Pwelco

Pwelco
 
Posts: 5
Joined: Thu Nov 08, 2018 2:22 pm

Re: MPU6050 data to AdafruitIO using Adafruits please help

by Pwelco on Mon Apr 20, 2020 12:04 pm

After staring at this for a few more hours I at least have the temperature working now, see attached code. Just need to get the accel and gyro data figured out.
sketch MPU6050-AdafruitIO 20APR20.txt
(3.17 KiB) Downloaded 7 times

Pwelco
 
Posts: 5
Joined: Thu Nov 08, 2018 2:22 pm

Re: MPU6050 data to AdafruitIO using Adafruits please help

by Pwelco on Sun Apr 26, 2020 5:03 pm

Finally got it working!!

Pwelco
 
Posts: 5
Joined: Thu Nov 08, 2018 2:22 pm

Please be positive and constructive with your questions and comments.


cron