Sending MPU6050 data to the cloud

Hello all,

I have my core connected via I2C to my MPU6050 accelerometer and gyroscope sensor.I am sampling at 20Hz per second.1 sample contains 12 bytes of data (ax,ay,az and gx,gy,gz).

I need to send the data to cloud.Will the cloud be able to accept if i send the samples in real time?
Or should i store data in a string for 30s or so and send it?

How to send my data to the cloud? I think its using Spark.variable or Spark.publish,but how can I view the data in the cloud and check if the data is sent to the cloud?

Thanks

Hi @adithyalobo,

Good question! The fastest way to send data from your core would be to open a direct TCP or UDP connection to your core, and stream data directly into your program. The next best is probably a Spark.publish, but the limit is currently 1 publish a second, at a length of about 63 characters. If you did a Spark.variable, you could get it at about the same speed, but you could encode up to about 600 characters.

If you’re using Spark.publish, you can open a stream to the API anywhere in the world that will let you see your events:

http://docs.spark.io/api/#reading-data-from-a-core-events

You can also use the spark-cli to watch your events: https://github.com/spark/spark-cli

spark login
spark subscribe mine

Thanks!
David

1 Like