"Ardublockly" is a fork of [Blockly](https://developers.google.com/blockly/), a web-based graphical programming editor, that has been updated to generate [Arduino](http://www.arduino.cc/) code.
Ardublockly is a visual programming editor for Arduino. It is based on Google's [Blockly][1], which has been forked to generate [Arduino](http://www.arduino.cc/) code.
The "ArdublocklyServer" python package initialises a local server to be able to compile and load the Arduino code using the [Arduino IDE](http://arduino.cc/en/main/software).
The "ArdublocklyServer" Python package initialises a local server to be able to compile and load the Arduino code using the [Arduino IDE][2].
This project has been influenced by BlocklyDuino.
This is all packaged in a self contained executable:
![Ardublockly desktop program screenshot][desktop_screeshot]
## Features
* Generate Arduino code with visual drag-and-drop blocks
...
...
@@ -13,39 +14,39 @@ This project has been influenced by BlocklyDuino.
* Compatible with a wide range of official Arduino Boards
* Runs 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](https://github.com/carlosperate/ardublockly/blob/master/TODO.md).
Ardublockly is still under development and a few features are not yet implemented. A to-do list can be found in the [TODO.md][3] file.
Currently tested under Windows and Linux with python 2, but developed for portability. Will soon be tested on all platforms.
Currently tested under Windows with Python 2.7 and 3.4 and in Linux and MacOS X with Python 2.7.
## Demo
## Online Demos
A demo of the current state of Ardublockly can be found in the following two links (to load the code into an Arduino requires Ardublockly to be executed locally):
#### [Ardublockly with responsive design](http://carlosperate.github.io/ardublockly/ardublockly/apps/arduino/index.html)
![WebApp screenshot responsive design](http://carlosperate.github.io/ardublockly/images/screenshot_material_all_small.jpg"Ardublockly with responsive design")
Installation instructions can be found in [this Github repository Wiki](https://github.com/carlosperate/ardublockly/wiki/Installing-Ardublockly).
There is a packaged version for Windows that runs as a stand-alone executable and can be downloaded from the [Ardublockly repository releases page][4].
Alternatively, there is a packaged version for Windows that runs as a stand-alone executable and can be downloaded from the [Ardublockly-package repository](https://github.com/carlosperate/ardublockly-package) or directly as a zip file [clicking here](https://github.com/carlosperate/ardublockly-package/archive/master.zip).
Installation instructions for developers can be found in [this Github repository Wiki][5]. This will work on Windows, Linux and MacOS X.
It also needs the [Arduino IDE version 1.6 or higher](http://arduino.cc/en/main/software).
## Running
1.[Install Ardublockly](https://github.com/carlosperate/ardublockly/wiki/Installing-Ardublockly) or [Ardublockly-package](https://github.com/carlosperate/ardublockly-package)
2. Install the [Arduino IDE version 1.6 or higher](http://arduino.cc/en/main/software)
3. Run the `start.py` python script (for Ardublockly) or `ardublockly_win.bat` package file (for Ardublockly-package)
3. Configure Ardublockly to locate the Arduino IDE [following these instructions](https://github.com/carlosperate/ardublockly/wiki/Configure-Ardublockly)
1.[Install Ardublockly][5].
2. Install the [Arduino IDE][2] version 1.6 or higher.
3. Run Ardublockly as defined in your installation method.
3. Configure Ardublockly to locate the Arduino IDE [following these instructions][6].
## Documentation
The documentation, including installation instructions, configuration instructions, and developer information can be found in [this Github repository Wiki](https://github.com/carlosperate/ardublockly/wiki).
The documentation, including installation instructions, configuration instructions, and developer information can be found in the [Ardublockly GitHub repository Wiki][7].
To download the documentation you can git clone the wiki data:
This folder contains the Python scripts required to package Ardublockly into a standalone executable. This way it can be distributed without any dependencies other than having the Arduino IDE.
Currently it is only built for Windows, but it could be updated to be built for Linux and Mac OS X (a move from py2exe to Pyinstaller is planned).
__Downloading the packaged Ardublockly__: The binaries will be hosted in GitHub as part of the [repository releases][1].
## Building Ardublockly from source
These scripts are currently built and tested using Python 2.7.
While it is possible to maintain compatibility with other Python versions (the ArdublocklyServer Python package used in the developer installation has been tested on Python 2.7 and 3.4), due to the multiple individual perks of the python libraries used here, it has been decided to target a single build environment.
If you are using Python virtual environments on Windows this [collection of Python extensions binaries][2] is highly recommended.
### Python dependencies
The specific version of the Python dependencies can be found in the [requirements.txt][3] file.
#### wxPython
wxPython provides python bindings for the wxWidgets, the cross-platform GUI toolkit.
You can download wxPython from their [official website][4].
#### cefpython3
CEF Python provides python bindings for the Chromium Embedded Framework. This is used in Ardublockly to create a webview of the Ardublockly web app without requiring any specific browser installation. This is specially useful for the project because the frameworks used work best on the Chrome engine.
[Install cefpython following their project installation instructions][5]
#### py2exe
py2exe is a Distutils extension to build Python scripts into Windows executable programs.
There is a plan to migrate from py2exe to Pyinstaller, but for now this is the main library used to create the Windows build.
You can download py2exe from their [official website][6].
Now navigate to the `package` folder in the project directory:
```
cd ../package
```
To build Ardublockly all you have to do is execute the `build_windows.py` file:
```
python build_windows.py
```
This will remove any previous build directory (`/win` directory in project root), rebuild, and create the `ardublockly_run.bat` file into the project root.
To run Ardublockly then just execute the `ardublockly_run.bat` file.