M2M Studio connection and data

Hi,
I have 2 questions regarding the code in M2M Studio:

  1. Can it work with my base starter board only powered by the rechargeable battery, and not connected to my laptop through an USB cable? For example, I want to monitor the voltage or location of the board which is in my office from home. Today I tried that, it only works when the USB is connected.

  2. Is it possible to transfer the data (obtained from running the sample code in M2M Studio) to my own server, so that I can check them without logging into my microtronics account?

Thank you very much!

Hello @se171011,

  1. Once the device logic is installed via USB to the rapidM2M Base Starter Board it is also executed if you use the rechargeable Batterie to supply the rapidM2M Base Starter Board. As I already told you it is normal that the “Power Good LED” and the “Charge Status LED” are off (see https://community.microtronics.com/t/rechargeable-lithium-ion-battery/201/3 ). If you have implemented a cyclical transmission the data is transferred to the rapidM2M Portal according to your set interval. You can easy verify this by checking the timestamp shown in the List of sites

  2. To access the transferred data without using the surface of the rapidM2M Portal you can use the API (see API Quick Guide). Note: Before accessing the data you have to activate the API (see Activating the API)

Kind regards
Josef

Hi Josef,
Thank you.
But it should be possible to program something so that the LED flashes if the board is powered, right?
Best regards,
Siyu

Hello @se171011,

Of course, you can program a logic that controls the LEDs. As I already mentioned (see Rechargeable Lithium-ion Battery) the LED1, LED2 and LED3 are controlled by the device logic and therefore the state of them depends on the code you created. Only the “Power Good LED” and “Charge Status LED” are controlled by hardware and cannot be influenced by you.

You can find a lot of examples for controlling the LEDs of the rapidM2M Base Starter on Github (Basic Example_Collection. This example (11_Led_2.p) toggles LED2 every second and turns off all other LEDs.

If you rapidM2M Base Starter is running from the rechargeable battery it is advisable to reduce power consumption. You should not constantly turn on a LED. Also blinking where the LED is turned on and turned off for the same Time period is not the best idea if you want to save power. You should only turn on the LED for example 500ms (or shorter) and then turn it off for 30sec. You also can combine the button and the LED. So for example if the button is pressed the LED blinks for 5sec. and is then turned off until somebody presses the button again. For low power application it is advisable to turn off all LEDs if nobody is looking at them.

An Example for using the button can be found here: 10_Switch

Kind regards
Josef

Thank you very much Josef, we tried a few sample code and managed to combine the LED blinking function into the GPS code!