Skip to content

Otto Blockly; a fully integrated graphical programming for any type of Arduino projects, including robots, ready to install in your computer, it works offline and also online

License

Notifications You must be signed in to change notification settings

OttoDIY/blockly

Repository files navigation

Otto Blockly

This is a free and open source visual programming language based on Blockly from Google & MIT, to generate C/C code, compile and upload to multiple options of microcontrollers. Compatible with any Otto DIY robots, Arduino or ESP8266 and ESP32 related boards.

Windows ONLY

Download the installer from the releases page. After the software is installed in your PC, it is ready to use immediately, you do not need to import Arduino libraries or any additional setup for the boards, you will be ready to upload codes directly to your robot or any other Arduino project via USB cable.

A better solution that works in all other OS, is the new HP Robots Otto web coding ecosystem

How to Use

  1. Open any example.
  2. Connect your microcontroller.
  3. Select your board and the USB port where is connected.
  4. Click upload and the code will be automatically compiled, but it will take some time.

Drag, drop, connect, mix, play and create your own codes. Join the Otto Builder community, see all the cool stuff and post your ideas!

Help us add your Language

Leave your mark by translating Blockly, you are welcome to contribute with any languages you know, by fixing mistakes you see, it will benefit you and everyone in your community.

The more people helping to translate the better, it is important to translate while understanding the context and what is the robot actually doing to be accurate.

  1. Go to the lang folder and duplicate the Arduino_en.js Blockly_en.js and msg_en.js files from English
  2. Rename them according to your ISO language code, for example fr is for French, so the files are renamed like this: Arduino_fr.js Blockly_fr.js and msg_fr.js
  3. Edit the files with any code editor software like Visual Studio Code translating only the English part after = in between the quotes "" in visual studio is the text in red.
  4. Then open a pull request here in github or just attach the files in a new issue.

How to run project

You will need to have installed the node.js tools in your computer. The version must be the 12.0

  1. Clone or download the source code.

git clone https://github.com/OttoDIY/blockly.git

  1. OPEN GIT BASH as Administrator and cd in folder

cd blockly

  1. Install required tools.

npm install -g build-tools npm install -g windows-build-tool (this command is not working ok. If the log is held then you must install python 2.7 before because the problem is with the python installation.) npm install -g node-gyp

  1. Install required node modules. Execute following on the source code directory

npm install

  1. Install Arduino CLI get arduino-cli.exe from https://github.com/arduino/arduino-cli/releases and place it under compilation/arduino

cd compilation/arduino curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh mv bin/arduino-cli ./ rm -rf bin

  1. Execute following to install required tools

cd compilation\arduino arduino-cli core update-index arduino-cli core install arduino:[email protected] arduino-cli core install arduino:[email protected] arduino-cli core install arduino:[email protected] arduino-cli core install esp8266:[email protected] arduino-cli core install esp32:[email protected] arduino-cli core update-index

  1. Build (creates .exe and .zip) You can use electron-builder to pack your electron app in zip, nsis (Installer), portable (App without installation) formats.

cd ../../ # ( go back to the repository’s top directory) npm run compiler or build --win --ia32 export PATH=$PATH:node_modules/.bin npm install [email protected] build --mac --x64 electron-builder --mac --x64

How to Contribute

Contributing to this software is warmly welcomed. There are 5 ways you can contribute to this project:

  1. Test and report. Let us know if there is something missing in the issue section.
  2. Helps us solve current issues or other bugs .
  3. Suggest or request new blocks.

You can do this basically by forking, committing modifications and then open a pull request. Please explain the changes and make sure they have been tested.

Just make sure to keep consistency in the naming and make a record of the change or improvement made.

Welcome to the Otto DIY team! Thanks for your contribution.

Attribution

Thanks to all these great people and open projects, it has been possible to make this software: