mc-Things General Discussion > mc-Things General Discussion

Help with the accelerometer (mcMod120)

(1/2) > >>

Junkboy:
Hello, I just started using mcthings, I just bought my kit and the only example I could find that has served me is to take the temperature and voltage of the battery and send the data to Losant.

Now .. I am developing a project in which I need to obtain the accelerometer data, I need to know the inclination in all the axes, all this info I need to send it using MQTT, continue using Losant could be a good option.

Therefore I would like someone to help me in my search for information since I really have more than 2 days looking for examples and I can not find anything about the accelerometer, I would even like to know how to use the reef sensor.

I would be infinitely grateful for the help because I am stopped because I do not know how to obtain this information from the sensor.

Beforehand thank you very much.

mc-T2:
Hi Junkboy -
to help you out, i need some additional info:

1) What devices do you have? mcMod110 or mcMod120 devices?

The devices do have an accelerometer and we do have some examples and libraries for the mcMod120 devices (which i can direct you to after you confirm what devices you are working with).

NOTE - We are moving to the new system (with mcCloud - http://mcthings.createaforum.com/general/http-requests/msg2227/#msg2227) we are not able to support the older version at this time. I am happy to direct you to information that is available however, since we are in transition, new examples and libraries will need to wait until we are complete and have the new system available for everyone to use.
Let us know about the above question so we can try to help you out
Thanks

Junkboy:
I have the mcMod120 please help me  ;D.

mc-T2:
Hey Junkboy

Ok good that you have mcMod120's - Check out this post that talks about using the accelerometer on the mcMod120 (including an initial downloadable library): http://mcthings.createaforum.com/support/module-120-accelerometer-communications/msg1187/#msg1187

You can also check out this github example: https://github.com/mcThings/mcScript-examples/tree/develop/examples/Accelerometer

As mentioned, when mcCloud is released, there is a new accelerometer example that will be included in the latest version of mcStudio as well. Thanks for the patience and hopefully the above info helps you to get going.

Junkboy:
I am trying to do my best to understand how the code that you send me as an example works, but is there a way to always be sending the current orientation of the device? I want to know at all times or as soon as possible the location, let me put you in context, for example, at the start I have: X = 0 Y = 0 Z = 0 in that case the device would be on the floor with all axes at "0" but let's say I start walking with the device at my leg, in that case let's say that we would have X = 12 Y = 8 Z = 15 that data I want to be taking for example every second or every 500 ms to keep a continuous tracking of the information, right now idk how to send that info by MQTT but.. I use an example that I found at internet that send the temp and batteryVoltaje to Losant and I'm using Losant until I learn how to send that data to my own server.

Navigation

[0] Message Index

[#] Next page

Go to full version