This project is about
- Adding Micropython code generator to Ardublockly
- Adding Micropython WebREPL to Ardublockly
- Uploading generated micropython code to ESP8266/ESP32 over the air
Goal is to make a web based Blockly programming enviroment for programming of ESPs OTA, without installation of any additional software to a PC
this project demonstrates uploading generated Micropython code to a ESP8266/ESP32
To get the demo working do as follows:
- Get an ESP8266/ESP32 board
- Flash it with the MicroPython firware using esptool.py https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html
- open micropython terminal and setup webrepl by typing: import webrepl_setup
- follow instructions for setuping webrepl
- (Using uPyCraft IDE) Change internal boot.py file on the ESP8266/ESP32 as:
boot.py
import network
import webrepl
ap = network.WLAN(network.AP_IF)
ap.active(True)
webrepl.start()
- reboot ESP8266/ESP32
- connect your PC to a ESP_XXXXXX Access point
- open ardublockly/index.html
- press connect on the top of the page
- click on Micropython WebREPL console down left
- it should ask you for a password you choosed during the webrepl setup
- after connection build your blockly code as you like, or leave it at the blink sketch as is
- and for a upload click on the big orange button
- if is everything connected it should give you a message, that blocks.py was sent
- reboot the ESP and the sketch should run
Ardublockly is a visual programming editor for Arduino. It is based on Google's Blockly, which has been forked to generate Arduino code.
The ArdublocklyServer
Python package initialises a local server to be able to compile and load the Arduino code using the Arduino IDE.
This is all packaged in a self contained executable desktop application for Windows, Mac OS X, and Linux.
- Generates Arduino code with visual drag-and-drop blocks
- Uploads the code to an Arduino Board
- Useful "code block warnings"
- Compatible with a wide range of official Arduino Boards
- Works on Windows / Linux / Mac OS X
Ardublockly is still under development and a few features are not yet implemented. A to-do list can be found in the TODO.md file.
Currently tested under Windows with Python 2.7 and 3.4 and in Linux and MacOS X with Python 2.7.
Please note that there are submodules in the repository that need initialisation. So, to correctly clone the Ardublockly repository:
git clone https://github.com/carlosperate/ardublockly.git
cd ardublockly
git submodule update --init --recursive
The desktop application is available for Windows/Mac/Linux and runs as a stand-alone executable that can be downloaded from the Ardublockly repository releases page.
You will also need the Arduino IDE version 1.6.x or higher.
You can also test UNSTABLE development builds automatically generated every time an update is added to the GitHub repository:
Linux build | Windows build | Mac OS X build |
---|---|---|
Download Link | Download Link | Download Link |
If you prefer, the core software can be used by running only the Python server, which loads the web interface on your local browser (Chrome recommended).
Full installation instructions for this version can be found in this Github repository Wiki.
The quick version: Clone this repository, initialise all submodules, and execute:
python start.py
This will work on Windows, Linux (including ARM) and Mac OS X, with Python >2.7 or >3.4
- Install Ardublockly.
- Install the Arduino IDE version 1.6.x or higher (latest version is always recommended).
- Run Ardublockly as defined in your installation method.
- Configure Ardublockly to locate the Arduino IDE following these instructions.
A demo of the latest release of Ardublockly main interface can be found in the following two links (to load the code into an Arduino it requires the full Ardublockly application to be downloaded and run on your computer):
The documentation, including installation instructions, configuration instructions, and developer information can be found in the Ardublockly GitHub repository Wiki.
To download the documentation you can git clone the wiki data:
git clone https://github.com/carlosperate/ardublockly.wiki.git
This project has been inspired by BlocklyDuino.
Blockly original source is Copyright of Google Inc. https://developers.google.com/blockly/. A list of changes to the Blockly fork can be found in the Blockly subdirectory README file.
Copyright (c) 2016 carlosperate https://github.com/carlosperate/
Unless stated otherwise, the source code of this projects is licensed under the Apache License, Version 2.0 (the "License"); you may not use any of the licensed files within this project except in compliance with the License.
The full document can be found in the LICENSE file.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.