Skip to content

Commit 03860be

Browse files
committed
fix issues #167 #168 #171 and new examples
1 parent 20639cf commit 03860be

14 files changed

Lines changed: 3040 additions & 23 deletions

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is a free and open source visual programming language based on Blockly from Google & MIT, to generate C/C++ code,
44
compile and upload to multiple options of microcontrollers. Compatible with any
5-
[Otto DIY robot, Arduino oe ESP8266 and ESP32 related boards](https://www.ottodiy.com/software). It is the perfect
5+
[Otto DIY robot, Arduino or ESP8266 and ESP32 related boards](https://www.ottodiy.com/software). It is the perfect
66
software to get you started into coding and STEM robotics.
77

88
## [Click here to watch the video to see all the main features](https://youtu.be/chcWxh4Co_c)
@@ -11,21 +11,17 @@ software to get you started into coding and STEM robotics.
1111
This software can work offline (standalone) by installing it on your computer. Depending on your operating system the
1212
installation files are already available or you have to create them yourself.
1313

14-
### Windows
14+
### Windows and MacOS
1515

1616
Download the installer from the [releases page](https://github.com/OttoDIY/blockly/releases). After the software is
1717
installed in your PC, it is ready to use immediately, you do not need to import Arduino libraries or any additional
18-
swtup for the boards because it comes with a copy of the Arduino CLI, it is all in one software!, you will be ready
18+
setup for the boards because it comes with a copy of the Arduino CLI, it is all in one software!, you will be ready
1919
to upload codes directly to your robot or any other Arduino project via USB.
2020

2121
If your computer do not recognize the USB device or Otto, you have to install the CH340 or CH341 or FTDI driver that
2222
is in the ["driversUSB" folder](https://github.com/OttoDIY/blockly/tree/master/driversUSB) or download from
2323
[this link](https://sparks.gogo.co.nz/ch340.html)
2424

25-
### MacOS
26-
27-
TODO
28-
2925
### Linux
3026

3127
For Linux operating systems go to [this repo](https://github.com/OttoDIY/blocklyLinux).
@@ -34,13 +30,11 @@ For Linux operating systems go to [this repo](https://github.com/OttoDIY/blockly
3430

3531
1. Open any example.
3632
2. Connect your Otto robot.
37-
3. Select Arduino nano and the USB port where Otto is connected.
33+
3. Select your board and the USB port where Otto is connected.
3834
4. Upload and yes is that easy you can even just click upload and the code will be automatically compiled!
3935

4036
Drag, drop, connect, mix, play and create your own codes. [Join the Otto Builder community, see all the cool stuff we are making with Otto Blockly and post your ideas!](http://builders.ottodiy.com/)
4137

42-
[## Support us by buying our awesome STEM robot kits](http://store.ottodiy.com/)
43-
4438
## Help us add new Languages
4539

4640
Leave your mark in the world by translating Blockly, you are welcome to contribute with any languages you know, it will
@@ -50,12 +44,12 @@ The more people helping to translate the better, it is important to translate wh
5044
is the robot actually doing to be accurate.
5145

5246
1. Go to the [lang folder](https://github.com/OttoDIY/blockly/tree/master/www/lang) and duplicate the Arduino_en.js
53-
Blockly_en.js and msg_en.js files from english
47+
Blockly_en.js and msg_en.js files from English
5448
2. Rename them according to your ISO language code, for example fr is for French, so the files are renamed like this:
5549
Arduino_fr.js Blockly_fr.js and msg_fr.js
5650
3. Edit the files with any code editor software like [Visual Studio Code](https://code.visualstudio.com/) translating
57-
only the english part after = in between the quotes "" in visual studio is the text in red.
58-
4. Then open a pullrequest [here in github](https://github.com/OttoDIY/blockly/pulls) or just attach the files in a
51+
only the English part after = in between the quotes "" in visual studio is the text in red.
52+
4. Then open a pull request [here in github](https://github.com/OttoDIY/blockly/pulls) or just attach the files in a
5953
[new issue](https://github.com/OttoDIY/blockly/issues).
6054

6155
## How to run project
@@ -70,7 +64,7 @@ You will need to have installed the node.js tools in your computer. The version
7064
>npm install -g windows-build-tool
7165
(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.)
7266
> npm install -g node-gyp
73-
4. Install required node modules.Execute following on the source code directory
67+
4. Install required node modules. Execute following on the source code directory
7468
> npm install
7569
5. Install Arduino CLI
7670
get arduino-cli.exe from https://github.com/arduino/arduino-cli/releases
@@ -129,6 +123,7 @@ Thanks to all these great people and open projects, it has been possible to make
129123
- [Bodo Minea](https://github.com/BodoMinea)
130124
- [Takuji Kawata](https://github.com/takujikawata-pr)
131125
- [Nicolas Nca78](https://github.com/Nca78/Matrix_GFX)
126+
- [Iván R.](https://github.com/IvanR3D)
132127
- [Node.js](https://nodejs.org/)
133128
- [Bootstrap](http://getbootstrap.com)
134129
- [Font Awesome](http://fontawesome.io)

www/blocs&generateurs/actionneur.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Blockly.Arduino["play"]=function(block){
2222
var value_pin=Blockly.Arduino.valueToCode(block, "PIN", Blockly.Arduino.ORDER_ATOMIC);
2323
var value_note=block.getFieldValue("note");
2424
var value_tempo=block.getFieldValue("tempo");
25-
Blockly.Arduino.setups_["setup_output"]="pinMode( "+value_pin+" , OUTPUT);";
25+
Blockly.Arduino.setups_["setup_output" + value_pin]="pinMode( "+value_pin+" , OUTPUT);";
2626
return "tone( "+value_pin+"," + value_note + "," + value_tempo + ");\n delay(" + value_tempo + ");\n"
2727
};
2828
Blockly.Python["play"]=function(block){

www/blocs&generateurs/motor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ Blockly.Blocks['servo_2wheels_init'] = { init: function() {
471471
+ 'int leftSpeed = 0;\n'
472472
+ 'void motorControl(int rightSpeed, int leftSpeed, int stepDelay) {\n'
473473
+ 'rightServo.write(90 + rightSpeed); leftServo.write(90 - leftSpeed);\n'
474-
+ 'delay(stepDelay*1000);}';
474+
+ 'delay(stepDelay*1000);rightServo.write(90);leftServo.write(90);}';
475475
Blockly.Arduino.setups_['otto9_initw']='rightServo.write(90);\n'
476476
+'leftServo.write(90);\n'
477477
+'delay(1000);\n'

www/examples/examples.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
{"source_url": "matrixeyestest.xml","source_text": "👨‍💻Level 2 | 👀 16x8 LED eyes matrix test |","visible": true },
2525
{"source_url": "matrixeyes.xml","source_text": "👨‍💻Level 2 | 👀 16x8 LED eyes matrix emotions |","visible": true},
2626
{"source_url": "eyesall.xml","source_text": "👨‍💻Level 2 | 👀 Otto eyes all emotions |","visible": true},
27+
{"source_url": "matrixeyescounter.xml","source_text": "👨‍💻Level 2 | 👀 Otto eyes counter |","visible": true},
28+
{"source_url": "fizzbuzz.xml","source_text": "👨‍💻Level 2 | 🎮 Fizzbuzz |","visible": true},
2729
{"source_url": "matrixtest.xml","source_text": "👨‍💻Level 2 | 👄 8x8 LED mouth matrix test |","visible": true },
2830
{"source_url": "matrixmouths.xml","source_text": "👨‍💻Level 2 | 👄 8x8 LED mouth emotions | ","visible": true },
2931
{"source_url": "matrixsing.xml","source_text": "👨‍💻Level 2 | 👄 8x8 LED mouth sing |","visible": true },
@@ -35,6 +37,11 @@
3537
{"source_url": "ledpot.xml","source_text": "👨‍💻Level 2 | 💡 Single LED + potentiometer |","visible": true },
3638
{"source_url": "ledfadepot.xml","source_text": "👨‍💻Level 2 | 💡 Single LED + potentiometer fade effect |","visible": true },
3739
{"source_url": "servoadvanced.xml","source_text": "👨‍💻Level 2 | 🦿 Servo advanced control | ","visible": true},
40+
{"source_url": "neopixel.xml", "source_text": "👨‍💻Level 2 | 🌈 Neopixel Color LED |","visible": true },
41+
{"source_url": "neopixelfunctions.xml", "source_text": "👨‍💻Level 2 | 🌈 Neopixel Functions |","visible": true },
42+
{"source_url": "neopixelclockwisecounter.xml", "source_text": "👨‍💻Level 2 | 🌈 Neopixel Clockfun |","visible": true },
43+
{"source_url": "neopixelgame.xml", "source_text": "👨‍💻Level 2 | 🌈 Neopixel Game |","visible": true },
44+
{"source_url": "Police_Siren.xml", "source_text": "👨‍💻Level 2 | 🌈 Color neopixel LED police siren |","visible": true },
3845
{"source_url": "IFTTT.xml","source_text": "👨‍🚀Level 3 | 🐱‍👤Ninja + ☁️ IoT IFTTT | ","visible": true },
3946
{"source_url": "MQTT.xml","source_text": "👨‍🚀Level 3 | 🐱‍👤Ninja + ☁️ IoT MQTT |","visible": true },
4047
{"source_url": "NTP.xml","source_text": "👨‍🚀Level 3 | 🐱‍👤Ninja + ☁️ IoT NTP | ","visible": true },
@@ -50,24 +57,23 @@
5057
{"source_url": "oled.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display |","visible": true},
5158
{"source_url": "oledshapes.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display shapes |","visible": true},
5259
{"source_url": "oledframe.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display frame | ","visible": true},
60+
{"source_url": "oledicon.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display icon | ","visible": true},
5361
{"source_url": "oledanimation.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display animation | ","visible": true},
5462
{"source_url": "oledanimationwalk.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display animation walk | ","visible": true},
55-
{"source_url": "Oledspectrumgraph.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display Spectrum graph | ","visible": true},
56-
{"source_url": "oledicon.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display icon | ","visible": true},
5763
{"source_url": "oledmouth.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display mouth | ","visible": true},
5864
{"source_url": "oledmouths.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display mouths | ","visible": true},
59-
{"source_url": "oledlogo.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display Logo | ","visible": true},
65+
{"source_url": "oledlogo.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display Logo animation | ","visible": true},
66+
{"source_url": "Oledspectrumgraph.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display Spectrum graph | ","visible": true},
6067
{"source_url": "oledgyro.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display with Gyro sensor | ","visible": true},
6168
{"source_url": "servocalibration.xml","source_text": "👨‍🚀Level 3 | 🖥️ OLED display with Servo motor | ","visible": true},
6269
{"source_url": "dhttemp.xml","source_text": "👨‍🚀Level 3 | 🌡️ DHT Temperature in OLED display |","visible": true},
6370
{"source_url": "oledlaser.xml","source_text": "👨‍🚀Level 3 | ⚡ OLED display with Laser sensor | ","visible": true},
6471
{"source_url": "Laser_Theremin.xml","source_text": "👨‍🚀Level 3 | ⚡ Laser sensor into Theremin |","visible": true },
65-
{"source_url": "neopixel.xml", "source_text": "👨‍🚀Level 3 | 🌈 Color neopixel LED |","visible": true },
66-
{"source_url": "Police_Siren.xml", "source_text": "👨‍🚀Level 3 | 🌈 Color neopixel LED police siren |","visible": true },
6772
{"source_url": "dfmini.xml","source_text": "👨‍🚀Level 3 | 🔊 MP3 DF mini basics |","visible": true },
6873
{"source_url": "dfminitriggers.xml","source_text": "👨‍🚀Level 3 | 🔊 MP3 DF mini Triggers |","visible": true },
6974
{"source_url": "TFTicon.xml","source_text": "👨‍🚀Level 3 | 📺 TFT display Icon | ","visible": true },
7075
{"source_url": "TFTAnimation.xml","source_text": "👨‍🚀Level 3 | 📺 TFT display animation | ","visible": true },
7176
{"source_url": "irda.xml","source_text": "👨‍🚀Level 3 | 🎮 Remote infrared control |","visible": true},
77+
{"source_url": "serverOTA.xml","source_text": "👨‍🚀Level 3 | 🌐 Server and OTA ESP8266 |","visible": true },
7278
{"source_url": "MUvision.xml","source_text": "👨‍🚀Level 3 | 👁️ MU vision AI camera |","visible": true}
7379
]

0 commit comments

Comments
 (0)