-
Create a Visual Embedded Rust program in a web browser and deploy it with Apache Mynewt to STM32 Blue Pill
-
Integrate with Mynewt drivers for CoAP, ESP8266, nRF24L01, NB-IoT
-
Deliver sensor data to an IoT cloud like thethings.io
-
Video Demo:
https://youtu.be/5hWq5TDEpIg -
Source code:
https://github.com/lupyuen/blockly-mynewt-rust -
Extended the Google Blockly visual programming tool. Built a simple Rust + Mynewt Code Generator for Google Blockly, based on the Dart Code Generator
-
Dart Code Generator for Google Blockly:
https://github.com/lupyuen/blockly-mynewt-rust/blob/master/generators/dart.js
https://github.com/lupyuen/blockly-mynewt-rust/tree/master/generators/dart -
Simple Rust + Mynewt Code Generator for Google Blockly:
https://github.com/lupyuen/blockly-mynewt-rust/blob/master/generators/rust.js
https://github.com/lupyuen/blockly-mynewt-rust/tree/master/generators/rust -
Added Mynewt Blocks:
https://github.com/lupyuen/blockly-mynewt-rust/blob/master/generators/rust/mynewt_blocks.js -
Added Mynewt Generator Functions:
https://github.com/lupyuen/blockly-mynewt-rust/blob/master/generators/rust/mynewt_functions.js -
If we make changes to the Rust code, Blockly will not update our visual program. We may be able to use the
syn
crate to parse the changed Rust code and update the visual program:
https://docs.rs/syn/0.15.38/syn/index.html
-
Visual Programming with Google Blockly
https://developers.google.com/blockly/ -
Creating Custom Blocks with Google Blockly:
https://developers.google.com/blockly/guides/create-custom-blocks/define-blocks
https://developers.google.com/blockly/guides/configure/web/custom-blocks -
Generate Rust Code with Code Generators in Google Blockly:
https://developers.google.com/blockly/guides/configure/web/code-generators -
Build image for Mynewt Embedded OS
https://mynewt.apache.org/latest/ -
Deploy to Blue Pill
https://medium.com/swlh/super-blue-pill-like-stm32-blue-pill-but-better-6d341d9347da -
Transmit to network:
NB-IoT, ESP8266, nRF24L01, thethings.io...
https://medium.com/@ly.lee/build-your-iot-sensor-network-stm32-blue-pill-nrf24l01-esp8266-apache-mynewt-thethings-io-ca7486523f5d -
Based on:
Hosting Embedded Rust apps on Apache Mynewt with STM32 Blue Pill
Safer, Simpler Embedded Rust with Apache Mynewt on STM32 Blue Pill -
Inspired by the Embedded Blocks from MakeCode:
https://visualbluepill.github.io