Makestro Cloud is a cloud service that can be used to develop your IoT project's prototype. It uses JSON format for sending and receiving data. With the client library available for any Arduino compatible devices especially ESPectro Core makes it easier for you to start making IoT projects right away.
Makestro Cloud also has a nice dashboard powered by Freeboard that can be used to visualize and control your device easily.
Most importantly, Makestro Cloud is free to use!
About This GuideThis guide is made for you who already have ESPectro Core board but didn't know how to use it with Makestro Cloud.
Please note that Makestro Cloud is not limited to only ESPectro Core board. You can use it along with any boards that have internet connectivity, theoretically.
With that being said, let's start!
Requirements- You have to install the ESPectro board to your Arduino IDE. The guide is here.
- You have to register to Makestro Cloud if you don't have any account yet. Click this link to open the registration page. Make sure to check your email to confirm your registration.
After installing ESPectro board and creating Makestro Cloud account, you can go to sign in page. As you can see, on the dashboard page, there is a simple form for you to create a project. All you need to do is fill in the project name and decide whether you will make it public or private. Public project means that you can share the link of your project dashboard to anyone. If everything's ok, click Create button.
Creating Project DashboardNow you have a project on your dashboard. You might notice that there are buttons and links on your project tile. These buttons and links allows you to export data as csv, clear data from your project, delete your project, and many more. But, the one we're going to use is the "Open Dashboard". Click that!
A new tab will open for you and there's a list of devices in your project. There's one that we created for you. Now, click the blue button with eye icon. An empty page will be opened in new tab. There you can create widgets to display data from your device and control your device.
Click the wrench icon on the center top of the page content, then click the "Add Pane" text. It will create a new pane to your dashboard content. You can adjust its width by clicking the wrench icon on the top right of your pane. For now, we'll use the default width.
Now click the plus icon on the top right of your pane to add a widget. A dialog will open for you. Now, you need to select the type of your widget. We'll use the "On/Off Switch" widget. Next, you need to configure your widget.
You will have to change the value of "Key/Property Name" field, or you can leave it as it is. That field will determine the key of a JSON object value that will be sent to your device. We're gonna change it to switch
so that the JSON string that will be sent will be like {"switch": 1}
. Then, click the "SAVE" button to add the widget to your pane.
Note that you can change other configuration such as widget title. And in this case, you can also change the ON text, OFF text, UI type which is either switch or push button.
As you can see, there is a widget on your pane now! Before we can use it, click "Save Dashboard" on the top left of your dashboard page. So that you don't need to re-create widget everytime you open your dashboard.
Enough talking, let's code!Now you have created a project along with its dashboard. Let's code!
Open your Arduino IDE, and install the Makestro Cloud Client library from the library manager. If you haven't installed any library from the library manager before, it can be found by clicking Sketch > Include Library > Manage Libraries. Then, search for "Makestro Clod Client" without the quotation marks on the search form. Then click Install.
You will have to install the ESPectro library from the library manager as well. The installation step is no different than before, so go ahead and install the library.
Next, choose an example example by clicking menu File > Examples > MakestroCloudClient > PubSubKeyValuePair.
Edit the following lines:
#define WIFI_SSID "AccessPointName"
#define WIFI_PASS "AccessPointPassword"
Change the AccessPointName
and AccessPointPassword
by your WiFi SSID name and password.
You will have to edit this line too:
MakestroCloudClient makestroClient("YOUR_USERNAME", "YOUR_CONNECTION_TOKEN", "YOUR_PROJECT_NAME", "YOUR_DEVICE_ID");
Change the YOUR_USERNAME
to your Makestro Cloud account username.
Then, change the YOUR_CONNECTION_TOKEN
to your connection token. You can generate the token in the profile page.
Then, change YOUR_PROJECT_NAME
to your project name, except that it should only contains alphanumeric characters. For example, your project name is "ESPectro Core Testing!!" then the correct value should be "ESPectroCoreTesting
".
Finally change YOUR_DEVICE_ID
to your default device ID. You can copy-paste the value from your project dashboard / device list page.
Now, you have to upload the code to your ESPectro Core board. Before that, you need to choose the board from Arduino IDE via Tools > Board menu. Also you need to change the upload speed to 921600. Then, change the serial port from Tools > Port menu to COMx
on Windows or /dev/ttyUSBx
on GNU/Linux where x
is a number.
Now upload the code by clicking the "Upload" button on your top left.
Try clicking the switch widget on your device dashboard and see whether the LED is blinking or not!
ClosingNow you know how to use Makestro Cloud with ESPectro Core board. I also have recorded a screencast for this tutorial. Thanks for reading!
Edit: I have updated the video with explanation and the LED switching demo on ESPectro Core board.
Edit: I've updated this tutorial to match the latest version of Makestro Cloud.
Comments
Please log in or sign up to comment.