Intro: MediaTek Sandbox Interfacing With LinkIt One
The MediaTek Cloud Sandbox is a cloud platform for IoT projects. Though there are multiple platforms available now, this one is made by the manufacturer! So the integration with your hardware is seamless.
In this instructable, I will walk you through the process of transmitting data to the MediaTek Cloud Sandbox using HTTP protocol and their REST API. We will log data from pressure and temperature sensors to the cloud.
The temperature sensor monitors temperature and humidity and the pressure sensor monitors pressure and altitude.
Let's get started!
Here is the link for the Sandbox: https://mcs.mediatek.com/
Register for a free account and proceed.
Step 1: Create a Prototype!
The first step to connecting your device with MCS is 'Creating a Prototype' on the dashboard.
Right now we are creating a prototype named 'test' to log our sample data.
Step 2: Adding Data Channels
After the prototype is ready, it's time to add data channels, the listeners for your data logs.
The first is our temperature channel. I have made use of a display type channel with float input values.
The ID is very significant, because this will be the matching point for the REST API inputs.
Take a look at the name and ID and units I've specified.
Go on to add the same for rest of your channels!
Step 3: Add a Test Device
Go to 'Add a test Device' now and create a device.
Here I have created a device named 'linkit1', you can name it whatever you want.
After this is complete, you will get a Device ID and device Key, they are required for data uploading through the API!
Step 4: Make the Connections!
Connect the required sensors, and antennas.
Here I have connected the wifi module, Temperature and Pressure sensors.
Step 5: Code!
I have attached my code here.
We start with including all the required files. Then define your WiFi AP and Password.
Enter Device ID and Key.
Burn the code.
And you're good to go!