Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primera adaptación a Linux #52

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
504 changes: 504 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

46 changes: 8 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
# Otto Blockly

This is a free and open source visual programming language based on Blockly from Google & MIT, Arduino codes are created by just combining the blocks, then they are compiled (check or verified) and quickly [upload to any Otto robot](https://wikifactory.com/+OttoDIY/projects) or similar Arduino(C++) or Micro:bit or Python robots.

## [Watch the video to see all the main features](https://youtu.be/chcWxh4Co_c)

## Installer
This software already works offline on Windows operating systems. You can [download the latest release from here](https://github.com/OttoDIY/blockly/releases), after install it is ready to use, no need to copy libraries or additional setup or even Arduino IDE, it is all integrated, ready to upload codes. Only if your computer do not recognize the USB device or Otto, you have to install the CH341 driver that is also [here in the "pilotes" folder.](https://github.com/OttoDIY/blockly/tree/master/pilotes/_CH341)

MAC and Linux version are under development, as some requested and as much as we want them to be ready too, unfortunately, there are not many collaborators, neither committed volunteers even for very simple BETA Tests, so WE NEED YOU!, if you really need this software for your OS, help us please and don't ask when it would be available, since it only will be ready with your support..So for now you will need a Virtual Machine or use the online App with copy and paste.

## Online App
Otto Blockly is also a web tool. You can [give it a try here.](https://ottodiy.github.io/blockly/) BUT the USB device cannot be recognized by the browser, therefore you won't be able to compile or upload the code.., although you can just simple copy and paste the generated code into your [local Arduino IDE](https://www.arduino.cc/en/Main/Software), therefore you can already use this tool from any operative system.

## How to Contribute
Contributing to this software is warmly welcomed. There are 5 ways you can contribute to this project:
1. Test and report.
2. Helps us [solve current issues](https://github.com/OttoDIY/blockly/issues) or other bugs.
3. Bring missing features from similar Blockly or Scratch alike programs, request new useful blocks.
5. Translating to new languages or fixing current ones.

You can do this [basically by forking](https://help.github.com/en/articles/fork-a-repo), committing modifications and then a [pull requests](https://help.github.com/en/articles/about-pull-requests). Please explain detailed 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 code development team!

Thanks for your contribution.

## More Languages

We are translating Blockly for Otto for the international community, you are welcome to contribute with the languages you know, 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, or what is the robot actually doing, to be accurate.

1. Go to [lang folder and duplicate the Arduino_en.js Blockly_en.js and msg_en.js files from english](https://github.com/OttoDIY/blockly/tree/master/www/lang),
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](https://code.visualstudio.com/) translating only the english part after = in between the quotes "" in visual studio is the text in red.
4. Then pull a request here in github or just send us the files.
# Otto Blockly for Linux
This is a Linux version for Otto Blockly developed by Antonio Gómez and Mª Dolores Nogueras.It's a project still developing. As far as we know, it works in Ubuntu 20
# Do you want to compile it?
1. Install node.js
2. Clone the repository
3. Run __npm install__
4. If you want to test the software, run __npm start__
5. To compile, run __npm run compiler__

## How to Use
[<img src="https://github.com/OttoDIY/blockly/blob/master/www/media/Ottoblockly.png" width="500" align="center">](https://youtu.be/chcWxh4Co_c)
Expand Down
Binary file added compilation/arduino/arduino-cli
Binary file not shown.
13 changes: 13 additions & 0 deletions compilation/arduino/flash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if [ $2 = "nanooptiboot" ];
then
./arduino-cli upload --port $1 --fqbn arduino:avr:nano sketch
elif [ $2 = "nano" ];
then
./arduino-cli upload --port $1 --fqbn arduino:avr:nano:cpu=atmega328old sketch


else
./arduino-cli upload --port $1 --fqbn arduino:avr:$2 sketch
fi


25 changes: 25 additions & 0 deletions compilation/arduino/ino/sketch.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <Otto9Humanoid.h>
Otto9Humanoid Otto;

int moveSize = 20;

#define PIN_YL 2 // left leg, servo[0]
#define PIN_YR 3 // right leg, servo[1]
#define PIN_RL 4 // left foot, servo[2]
#define PIN_RR 5 // right foot, servo[3]
#define PIN_LA 6 //servo[4] Left arm
#define PIN_RA 7 //servo[5] Right arm
#define PIN_Trigger 8 // ultrasound
#define PIN_Echo 9 // ultrasound
#define PIN_NoiseSensor A6
#define PIN_Buzzer 13

void setup() {
Otto.initHUMANOID(PIN_YL, PIN_YR, PIN_RL, PIN_RR, PIN_LA, PIN_RA, true, PIN_NoiseSensor, PIN_Buzzer, PIN_Trigger, PIN_Echo);
}

void loop() {
Otto.handwave(1);
while(true);

}
Binary file added compilation/arduino/libraries.zip
Binary file not shown.
1 change: 1 addition & 0 deletions compilation/arduino/sketch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INO
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:00000001FF
Binary file not shown.
55 changes: 55 additions & 0 deletions compilation/arduino/sketch/build/arduino.avr.nano/sketch.ino.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
:100000000C945C000C946E000C946E000C946E00CA
:100010000C946E000C946E000C946E000C946E00A8
:100020000C946E000C946E000C946E000C946E0098
:100030000C946E000C946E000C946E000C946E0088
:100040000C94DB000C946E000C946E000C946E000B
:100050000C946E000C946E000C946E000C946E0068
:100060000C946E000C946E00000000080002010069
:100070000003040700000000000000000000000072
:10008000250028002B0000000000240027002A0083
:10009000040404040404040402020202020203032E
:1000A0000303030301020408102040800102040836
:1000B000102001020408102011241FBECFEFD8E049
:1000C000DEBFCDBF21E0A0E0B1E001C01D92A931AB
:1000D000B207E1F70E9425010C94A7010C940000DF
:1000E00090E0FC01EC55FF4F249180579F4FFC019D
:1000F0008491882399F090E0880F991FFC01EA57BA
:10010000FF4FA591B491FC01E458FF4F8591949164
:100110008FB7F894EC91E22BEC938FBF089590E0A9
:10012000FC01E859FF4F2491FC01EC55FF4F34913D
:10013000FC01E057FF4FE491EE23C9F0222339F090
:10014000233001F1A8F4213019F1223029F1F0E037
:10015000EE0FFF1FE458FF4FA591B4918FB7F894AD
:10016000EC91611126C030953E233C938FBF0895DA
:100170002730A9F02830C9F0243049F78091800059
:100180008F7D03C0809180008F7780938000DFCFC8
:1001900084B58F7784BDDBCF84B58F7DFBCF809115
:1001A000B0008F778093B000D2CF8091B0008F7D68
:1001B000F9CF3E2BDACF1F920F920FB60F92112478
:1001C0002F933F938F939F93AF93BF93809105019C
:1001D00090910601A0910701B091080130910401AE
:1001E00023E0230F2D3758F50196A11DB11D209353
:1001F00004018093050190930601A0930701B09339
:1002000008018091000190910101A0910201B0913B
:1002100003010196A11DB11D80930001909301017E
:10022000A0930201B0930301BF91AF919F918F9171
:100230003F912F910F900FBE0F901F90189526E8B9
:10024000230F0296A11DB11DD2CF789484B5826090
:1002500084BD84B5816084BD85B5826085BD85B56A
:10026000816085BD80916E00816080936E001092E8
:100270008100809181008260809381008091810063
:1002800081608093810080918000816080938000F4
:100290008091B10084608093B1008091B000816052
:1002A0008093B00080917A00846080937A0080917E
:1002B0007A00826080937A0080917A0081608093D6
:1002C0007A0080917A00806880937A001092C10051
:1002D00085E00E94700086E00E94700089E00E9424
:1002E00070008AE00E94700085E090E090930A011F
:1002F0008093090186E090E090930C0180930B01BC
:1003000089E090E090930E0180930D018AE090E0E7
:100310009093100180930F01C0E0D0E061E08091E4
:100320000B010E948F0060E0809109010E948F0004
:1003300061E080910F010E948F0060E080910D01CB
:100340000E948F00209751F30E940000E7CFF8949D
:02035000FFCFDD
:00000001FF
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
:020000040000FA
:100000000C945C000C946E000C946E000C946E00CA
:100010000C946E000C946E000C946E000C946E00A8
:100020000C946E000C946E000C946E000C946E0098
:100030000C946E000C946E000C946E000C946E0088
:100040000C94DB000C946E000C946E000C946E000B
:100050000C946E000C946E000C946E000C946E0068
:100060000C946E000C946E00000000080002010069
:100070000003040700000000000000000000000072
:10008000250028002B0000000000240027002A0083
:10009000040404040404040402020202020203032E
:1000A0000303030301020408102040800102040836
:1000B000102001020408102011241FBECFEFD8E049
:1000C000DEBFCDBF21E0A0E0B1E001C01D92A931AB
:1000D000B207E1F70E9425010C94A7010C940000DF
:1000E00090E0FC01EC55FF4F249180579F4FFC019D
:1000F0008491882399F090E0880F991FFC01EA57BA
:10010000FF4FA591B491FC01E458FF4F8591949164
:100110008FB7F894EC91E22BEC938FBF089590E0A9
:10012000FC01E859FF4F2491FC01EC55FF4F34913D
:10013000FC01E057FF4FE491EE23C9F0222339F090
:10014000233001F1A8F4213019F1223029F1F0E037
:10015000EE0FFF1FE458FF4FA591B4918FB7F894AD
:10016000EC91611126C030953E233C938FBF0895DA
:100170002730A9F02830C9F0243049F78091800059
:100180008F7D03C0809180008F7780938000DFCFC8
:1001900084B58F7784BDDBCF84B58F7DFBCF809115
:1001A000B0008F778093B000D2CF8091B0008F7D68
:1001B000F9CF3E2BDACF1F920F920FB60F92112478
:1001C0002F933F938F939F93AF93BF93809105019C
:1001D00090910601A0910701B091080130910401AE
:1001E00023E0230F2D3758F50196A11DB11D209353
:1001F00004018093050190930601A0930701B09339
:1002000008018091000190910101A0910201B0913B
:1002100003010196A11DB11D80930001909301017E
:10022000A0930201B0930301BF91AF919F918F9171
:100230003F912F910F900FBE0F901F90189526E8B9
:10024000230F0296A11DB11DD2CF789484B5826090
:1002500084BD84B5816084BD85B5826085BD85B56A
:10026000816085BD80916E00816080936E001092E8
:100270008100809181008260809381008091810063
:1002800081608093810080918000816080938000F4
:100290008091B10084608093B1008091B000816052
:1002A0008093B00080917A00846080937A0080917E
:1002B0007A00826080937A0080917A0081608093D6
:1002C0007A0080917A00806880937A001092C10051
:1002D00085E00E94700086E00E94700089E00E9424
:1002E00070008AE00E94700085E090E090930A011F
:1002F0008093090186E090E090930C0180930B01BC
:1003000089E090E090930E0180930D018AE090E0E7
:100310009093100180930F01C0E0D0E061E08091E4
:100320000B010E948F0060E0809109010E948F0004
:1003300061E080910F010E948F0060E080910D01CB
:100340000E948F00209751F30E940000E7CFF8949D
:02035000FFCFDD
:107800000C94343C0C94513C0C94513C0C94513CE1
:107810000C94513C0C94513C0C94513C0C94513CB4
:107820000C94513C0C94513C0C94513C0C94513CA4
:107830000C94513C0C94513C0C94513C0C94513C94
:107840000C94513C0C94513C0C94513C0C94513C84
:107850000C94513C0C94513C0C94513C0C94513C74
:107860000C94513C0C94513C11241FBECFEFD8E036
:10787000DEBFCDBF11E0A0E0B1E0ECE9FFE702C060
:1078800005900D92A230B107D9F712E0A2E0B1E065
:1078900001C01D92AD30B107E1F70E942D3D0C945F
:1078A000CC3F0C94003C982F959595959595959582
:1078B000905D8F708A307CF0282F295A8091C0000B
:1078C00085FFFCCF9093C6008091C00085FFFCCF60
:1078D0002093C6000895282F205DF0CF982F809127
:1078E000C00085FFFCCF9093C6000895EF92FF92F1
:1078F0000F931F93EE24FF2487018091C00087FD22
:1079000017C00894E11CF11C011D111D81E4E8164B
:1079100082E4F8068FE0080780E0180770F3E09132
:107920000401F091050109958091C00087FFE9CF1E
:107930008091C6001F910F91FF90EF9008950E94D3
:10794000763C982F8091C00085FFFCCF9093C600B5
:1079500091362CF490330CF09053892F089597555D
:10796000892F08951F930E949F3C182F0E949F3CCF
:107970001295107F810F1F9108951F93182F882350
:1079800021F00E94763C1150E1F71F9108951F935A
:10799000182F0E94763C803249F0809103018F5F5E
:1079A000809303018530C1F01F9108958091C0003C
:1079B00085FFFCCF84E18093C6008091C00085FFE5
:1079C000FCCF1093C6008091C00085FFFCCF80E102
:1079D0008093C6001F910895E0910401F091050184
:1079E00009951F9108950E94763C803241F0809164
:1079F00003018F5F80930301853081F008958091AA
:107A0000C00085FFFCCF84E18093C6008091C00058
:107A100085FFFCCF80E18093C6000895E0910401CA
:107A2000F09105010995089540E951E08823A1F0FE
:107A30002D9A28EE33E0FA013197F1F721503040CA
:107A4000D1F72D9828EE33E0FA013197F1F7215064
:107A50003040D1F7815061F708953F924F925F9285
:107A60006F927F928F929F92AF92BF92CF92DF924E
:107A7000EF92FF920F931F93CF93DF93000080E16B
:107A80008093C4001092C50088E18093C10086E015
:107A90008093C2005098589A259A81E00E94143D24
:107AA00024E1F22E9EE1E92E85E9D82E0FE0C02ECA
:107AB00010E1B12EAA24A394B1E49B2EA6E58A2E50
:107AC000F2E57F2EE0E26E2E79E4572E63E5462E36
:107AD00050E5352E0E94763C8033B1F18133B9F107
:107AE000803409F46FC0813409F476C0823409F41B
:107AF00085C0853409F488C0803531F1823521F1A3
:107B0000813511F1853509F485C0863509F48DC0BC
:107B1000843609F496C0843709F403C1853709F423
:107B200072C1863709F466C0809103018F5F80932C
:107B30000301853079F6E0910401F0910501099582
:107B40000E94763C803351F60E94F33CC3CF0E94E2
:107B5000763C803249F78091C00085FFFCCFF092DF
:107B6000C6008091C00085FFFCCF9092C600809136
:107B7000C00085FFFCCF8092C6008091C00085FFC9
:107B8000FCCF7092C6008091C00085FFFCCF609250
:107B9000C6008091C00085FFFCCF5092C600809146
:107BA000C00085FFFCCF4092C6008091C00085FFD9
:107BB000FCCF3092C6008091C00085FFFCCFB09210
:107BC000C60088CF0E94763C863808F4BDCF0E945C
:107BD000763C0E94F33C7ECF0E94763C803809F4CC
:107BE0009CC0813809F40BC1823809F43CC1883942
:107BF00009F48FC080E00E94C73C6CCF84E10E94F2
:107C0000BD3C0E94F33C66CF85E00E94BD3C0E94D3
:107C1000F33C60CF0E94763C809306010E94763C44
:107C2000809307010E94F33C55CF0E94763C80333D
:107C300009F41DC183E00E94BD3C80E00E94C73C66
:107C400049CF0E94763C809309020E94763C809343
:107C5000080280910C028E7F80930C020E94763C79
:107C6000853409F415C18091080290910902892B8D
:107C700089F000E010E00E94763CF801E85FFE4FDA
:107C800080830F5F1F4F80910802909109020817AF
:107C9000190788F30E94763C803209F045CF809125
:107CA0000C0280FF01C16091060170910701660F0F
:107CB000771F7093070160930601A0910802B091AD
:107CC00009021097C9F0E8E0F1E09B01AD014E0F09
:107CD0005F1FF999FECF32BD21BD819180BDFA9A17
:107CE000F99A2F5F3F4FE417F50799F76A0F7B1F4B
:107CF00070930701609306018091C00085FFFCCF5F
:107D0000F092C6008091C00085FFFCCFB092C60003
:107D1000E1CE83E00E94C73CDDCE82E00E94C73CFA
:107D2000D9CE0E94763C809309020E94763C8093D3
:107D300008028091060190910701880F991F909386
:107D40000701809306010E94763C853409F4A6C0A1
:107D500080910C028E7F80930C020E94763C8032D0
:107D600009F0B8CE8091C00085FFFCCFF092C6002C
:107D7000609108027091090261157105B9F140E046
:107D800050E080910C02A82FA170B82FB27011C0E2
:107D9000BB2309F45CC0E0910601F0910701319624
:107DA000F0930701E09306014F5F5F4F46175707B7
:107DB000E8F4AA2369F3F999FECF209106013091E6
:107DC000070132BD21BDF89A90B58091C00085FFB2
:107DD000FCCF9093C6002F5F3F4F30930701209355
:107DE00006014F5F5F4F4617570718F38091C00099
:107DF00085FDE5CE8091C00085FFF8CFE0CE81E023
:107E00000E94C73C67CE0E94763C803209F08CCE3F
:107E10008091C00085FFFCCFF092C6008091C00029
:107E200085FFFCCFE092C6008091C00085FFFCCFAB
:107E3000D092C6008091C00085FFFCCFC092C600E2
:107E40008091C00085FFFCCFB092C60043CEE09188
:107E50000601F091070194918091C00085FFFCCF4D
:107E60009093C6009CCF80E10E94C73C33CE0E9415
:107E7000763C0E94763C182F0E94763C112309F430
:107E800083C0113009F484C08FE00E94C73C22CE29
:107E900080910C02816080930C02E5CE80910C02EF
:107EA000816080930C0259CF809107018823880F4D
:107EB000880B8A2180930B02809106019091070123
:107EC000880F991F90930701809306018091080203
:107ED00080FF09C080910802909109020196909359
:107EE000090280930802F894F999FECF1127E091D6
:107EF0000601F0910701C8E0D1E08091080290915D
:107F00000902103091F40091570001700130D9F34B
:107F100003E000935700E89500915700017001308D
:107F2000D9F301E100935700E89509901990009169
:107F3000570001700130D9F301E000935700E89534
:107F40001395103498F011270091570001700130FB
:107F5000D9F305E000935700E895009157000170B0
:107F60000130D9F301E100935700E895329602976A
:107F700009F0C7CF103011F00296E5CF112480919F
:107F8000C00085FFB9CEBCCE8EE10E94C73CA2CD19
:0E7F900085E90E94C73C9ECDF894FFCF80008B
:00000001FF
14 changes: 14 additions & 0 deletions compilation/arduino/sketch/sketch.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <Masaylo.h>
Masaylo m;

//no hay definiciones


void setup() {
m.init(5,6,9,10);
}

void loop() {
m.atras();

}
11 changes: 11 additions & 0 deletions compilation/arduino/verify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

if [ $1 = "nanooptiboot" ];
then
./arduino-cli compile --fqbn arduino:avr:nano sketch
elif [ $1 = "nano" ];
then
./arduino-cli compile --fqbn arduino:avr:nano:cpu=atmega328old sketch

else
./arduino-cli compile --fqbn arduino:avr:$1 sketch
fi
Loading