Recently I was experimenting on the Mongoose OS. It is an open source IoT platform for developing applications on ESP32, ESP8266, STM32, TI CC3200 and TI CC3220 microcontrollers. It supports a simplified version of Javascript (mJS) and C/C++ as the development language for calling the OS APIs.
What are the features that impressed me?
What are the features that impressed me?
1. Installation
There is only 1 executable. (mos.exe) to be downloaded. Just clicked on the EXE and the web based IDE is displayed. Then I connect up ESP32 using the selected serial port, flashed the firmware and connect to my WIFI network. That's it! The MCU is setup! Amazingly simple.2. Connection to MQTT
After the initial setup, the connection to MQTT is only a few clicks away and the ESP32 is setup to send/receive message from MQTT server. Zero code for this entire process. Super impressed!!
Publishing to the MQTT is only a single line of code.
load('api_mqtt.js');
let topic = 'myesp32/topic';
let res = MQTT.pub(topic, JSON.stringify({ a: 1, b: 2 }), 1);
print('Published:', res ? 'yes' : 'no');
Subscribing to a topic is also very straightforward.
load('api_mqtt.js');
let topic = 'myesp32/topic';
MQTT.sub(topic, function(conn, topic, msg) {
print('Topic:', topic, 'message:', msg);
}, null);
3. Cross Platform
I have only experimented on ESP8266 and ESP32 on cross-platform support. Just like Arduino, after selecting the correct board type, the same piece of sketch can work on both the ESPs.4. Connecting to Google Cloud IoTCore
Connecting to Google Cloud IoTCore is straightforward. In my opinion, the author has shielded most of the underlying security handshaking work. The detail instructions on the setup can be found here. The more challenging portion is the understanding of Google Cloud Platform and the rest of the related products. More of the setup details will be discussed in future post.
Comments
Post a Comment