Compare commits

17 Commits
lars ... master

Author SHA1 Message Date
b10f90a19a Merge pull request #2 from roboticafacil/master
movement block fixed for "walk" option
2017-12-16 11:43:31 +01:00
342d6e69f2 Update WebInterface.ino 2017-12-13 11:56:09 +01:00
f48b595b14 modified: lars_blocks.js 2017-12-13 10:58:43 +01:00
0f53337ed7 expression pins 2017-12-13 10:58:20 +01:00
871d99ab35 Merge pull request #1 from s00500/master
Updated code
2017-12-13 10:50:30 +01:00
d21a52d6b2 Cleanup comments and more 2017-12-12 21:19:45 +01:00
2bb5001fe4 Cleanup example code 2017-12-12 21:19:24 +01:00
e28fe4928a Merge pull request #1 from roboticafacil/master
modified:   lars_blocks.js
2017-12-12 20:58:23 +01:00
d6f4e775b2 modified: lang/LARS.json
modified:   lars_blocks.js
2017-12-12 19:12:39 +01:00
89f1d579b3 modified: lars_blocks.js 2017-12-12 19:06:22 +01:00
21db36369b modified: lars_blocks.js 2017-12-12 19:00:58 +01:00
fd33225d2d modified: lars_blocks.js 2017-12-12 18:30:08 +01:00
a16edd7f20 Adding proper examples 2017-12-12 14:30:03 +01:00
22f78c4bad Constructor header fix 2017-12-12 13:13:43 +01:00
afaba02132 Merge and clean up 2017-12-12 12:11:09 +01:00
2cb7977856 changed library descriptor, nano compatible 2017-12-12 11:57:20 +01:00
84f01d277b new file: img/blocks/LARS.svg
new file:   img/blocks/LARS_BLH.svg
	new file:   img/blocks/LARS_BLL.svg
	new file:   img/blocks/LARS_BRH.svg
	new file:   img/blocks/LARS_BRL.svg
	new file:   img/blocks/LARS_FLH.svg
	new file:   img/blocks/LARS_FLL.svg
	new file:   img/blocks/LARS_FRH.svg
	new file:   img/blocks/LARS_FRL.svg
	new file:   img/blocks/acknowledgements.html
	new file:   lang/LARS.json
	modified:   lars_blocks.js
	modified:   src/LARS.cpp
	modified:   src/LARS.h
2017-12-12 00:01:01 +01:00
18 changed files with 1250 additions and 377 deletions

View File

@ -0,0 +1,60 @@
// Example of the LARS Movement library
#include <LARS.h>
LARS robot;
boolean walk_forward = false;
boolean walk_backward = false;
boolean hello = false;
boolean turn_left = false;
boolean turn_right = false;
boolean moonwalk = false;
boolean audience = false;
boolean omni = false;
boolean omni_left = false;
boolean dance = false;
boolean upDown = false;
boolean PushUp = false;
void setup() {
Serial.begin(115200);
/*
How to wire:
init(FRH, FLH, BRH, BLH, FRL, FLL, BRL, BLL)
Leg Hip Face Hip Leg
__________ __________ _________________
|(FLL)_____)(FLH) (FRH)(______(FRL)|
|__| |left FRONT right| |__|
| |
| |
| |
_________ | | __________
|(BLL)_____)(BLH)______(BRH)(______(BRL)|
|__| |__|
*/
robot.init(26, 25, 17, 16, 27, 5, 23, 13); // Calling init with default values
delay(500);
}
void loop() {
if (walk_forward) robot.walk(0);
else if (walk_backward) robot.walk();
else if (hello) robot.hello();
else if (turn_left) robot.turnL(1, 550);
else if (turn_right) robot.turnR(1, 550);
else if (moonwalk) robot.moonwalk(1, 5000);
else if (audience) robot.wave(1);
else if (dance) robot.dance(1, 600);
else if (omni) robot.omniWalk(1, 600, true, 1);
else if (omni_left) robot.omniWalk(1, 600, false, 1);
else if (PushUp) robot.pushUp(1, 600);
else if (upDown) robot.upDown(1, 5000);
else robot.home();
}

View File

View File

@ -0,0 +1,267 @@
// Example of the LARS Movement library using the ESPUI Webinferface and the SimleExpressions Library by Lukas Bachschwell
#include <SimpleExpressions.h>
#include <WiFi.h>
#include <ESPUI.h>
#include <LARS.h>
#define ledDataPin 2
#define beeperPin 4
#define echoPin 18
#define triggerPin 19
#define checkTime 500
#define warningDistance 20
long oldTime = 0;
bool warning = false;
const char* ssid = "Lars";
LARS robot;
boolean walk_forward = false;
boolean walk_backward = false;
boolean hello = false;
boolean turn_left = false;
boolean turn_right = false;
boolean moonwalk = false;
boolean audience = false;
boolean omni = false;
boolean omni_left = false;
boolean dance = false;
boolean upDown = false;
boolean PushUp = false;
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_AP);
WiFi.setHostname(ssid);
WiFi.softAP(ssid);
Serial.println("");
Serial.print("IP address: ");
Serial.println(WiFi.softAPIP());
ESPUI.pad("Walking Control", true, &walkingPad, COLOR_CARROT);
ESPUI.pad("Wave some legs", false, &wavePad, COLOR_CARROT);
ESPUI.button("Wave Button", &audienceWaveButton, COLOR_PETERRIVER);
ESPUI.button("MoonWalk Button", &moonWalkButton, COLOR_PETERRIVER);
ESPUI.button("Dance Button", &danceButton, COLOR_PETERRIVER);
ESPUI.button("PushUp Button", &pushUpButton, COLOR_PETERRIVER);
ESPUI.button("upDown Button", &upDownButton, COLOR_PETERRIVER);
ESPUI.button("Slow Turn Right", &slowTurnRight, COLOR_PETERRIVER);
ESPUI.button("Slow Turn left", &slowTurnLeft, COLOR_PETERRIVER);
ESPUI.begin("Crabby Control");
SimpleExpressions.init(ledDataPin, beeperPin);
SimpleExpressions.clearMouth();
SimpleExpressions.writeMouth("happySmall", 0, 0, 80);
SimpleExpressions.playSound(S_SUPER_HAPPY);
SimpleExpressions.writeMouth("happyFull", 0, 60, 100);
/*
How to wire:
init(FRH, FLH, BRH, BLH, FRL, FLL, BRL, BLL)
Leg Hip Face Hip Leg
__________ __________ _________________
|(FLL)_____)(FLH) (FRH)(______(FRL)|
|__| |left FRONT right| |__|
| |
| |
| |
_________ | | __________
|(BLL)_____)(BLH)______(BRH)(______(BRL)|
|__| |__|
*/
robot.init(26, 25, 17, 16, 27, 5, 23, 13); // Calling init with default values
delay(1000);
}
void loop() {
if (millis() - oldTime > checkTime) {
checkDistance();
oldTime = millis();
}
if (walk_forward) robot.walk(0);
else if (walk_backward) robot.walk();
else if (hello) robot.hello();
else if (turn_left) robot.turnL(1, 550);
else if (turn_right) robot.turnR(1, 550);
else if (moonwalk) robot.moonwalk(1, 5000);
else if (audience) robot.wave(1);
else if (dance) robot.dance(1, 600);
else if (omni) robot.omniWalk(1, 600, true, 1);
else if (omni_left) robot.omniWalk(1, 600, false, 1);
else if (PushUp) robot.pushUp(1, 600);
else if (upDown) robot.upDown(1, 5000);
else robot.home();
}
// UI Callbacks
void audienceWaveButton(Control c, int type) {
if (type == B_DOWN) {
audience = true;
} else {
audience = false;
}
}
void moonWalkButton(Control c, int type) {
if (type == B_DOWN) {
moonwalk = true;
} else {
moonwalk = false;
}
}
void danceButton(Control c, int type) {
if (type == B_DOWN) {
dance = true;
} else {
dance = false;
}
}
void pushUpButton(Control c, int type) {
if (type == B_DOWN) {
PushUp = true;
} else {
PushUp = false;
}
}
void upDownButton(Control c, int type) {
if (type == B_DOWN) {
upDown = true;
} else {
upDown = false;
}
}
void slowTurnRight(Control c, int type) {
if (type == B_DOWN) {
omni = true;
} else {
omni = false;
}
}
void slowTurnLeft(Control c, int type) {
if (type == B_DOWN) {
omni_left = true;
} else {
omni_left = false;
}
}
void walkingPad(Control c, int value) {
switch (value) {
case P_LEFT_DOWN:
turn_left = true;
break;
case P_LEFT_UP:
turn_left = false;
break;
case P_RIGHT_DOWN:
turn_right = true;
break;
case P_RIGHT_UP:
turn_right = false;
break;
case P_FOR_DOWN:
walk_forward = true;
break;
case P_FOR_UP:
walk_forward = false;
break;
case P_BACK_DOWN:
walk_backward = true;
break;
case P_BACK_UP:
walk_backward = false;
break;
case P_CENTER_DOWN:
hello = true;
break;
case P_CENTER_UP:
hello = false;
break;
}
}
void wavePad(Control c, int value) {
switch (value) {
case P_LEFT_DOWN:
robot.wave(1);
break;
case P_RIGHT_DOWN:
robot.wave(2);
break;
case P_FOR_DOWN:
robot.wave(3);
break;
case P_BACK_DOWN:
robot.wave(4);
break;
}
}
// Ultrasonic Sensor
void checkDistance() {
int d = distance(triggerPin, echoPin);
ESPUI.print("Distance", String(d));
if (d < warningDistance) {
delay(100);
d = distance(triggerPin, echoPin);
if (d < warningDistance) {
if(!warning) {
SimpleExpressions.writeMouth("sadFull", 100, 0, 0);
SimpleExpressions.writeMouth("sadFull", 100, 0, 0); // only twice please
}
SimpleExpressions.playSound(S_CONFUSED);
warning = true;
}
} else {
if (warning) {
SimpleExpressions.writeMouth("happyFull", 0, 60, 100);
SimpleExpressions.writeMouth("happyFull", 0, 60, 100); // only twice please
warning = false;
}
}
}
long US_init(int trigger_pin, int echo_pin)
{
digitalWrite(trigger_pin, LOW);
delayMicroseconds(2);
digitalWrite(trigger_pin, HIGH);
delayMicroseconds(10);
digitalWrite(trigger_pin, LOW);
return pulseIn(echo_pin, HIGH, 100000);
}
long distance(int trigger_pin, int echo_pin)
{
long microseconds = US_init(trigger_pin, echo_pin);
long distance;
distance = microseconds / 29 / 2;
if (distance == 0) {
distance = 999;
}
return distance;
}

65
img/blocks/LARS.svg Normal file
View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

71
img/blocks/LARS_BLH.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS_BLH.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /><ellipse
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:110.7085495;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
id="path4525-2"
cx="18.429653"
cy="50.682549"
rx="7.3946142"
ry="7.508378" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

71
img/blocks/LARS_BLL.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS_BLL.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /><rect
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:7.77202845;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
id="rect4551-2"
width="12.764831"
height="14.320644"
x="0.24553759"
y="61.641895" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

71
img/blocks/LARS_BRH.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS_BRH.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /><ellipse
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:110.7085495;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
id="path4525-2"
cx="56.881649"
cy="49.089863"
rx="7.3946142"
ry="7.508378" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

71
img/blocks/LARS_BRL.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS_BRL.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /><rect
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:7.77249622;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
id="rect4551"
width="12.766374"
height="14.320638"
x="63.376617"
y="61.641895" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

71
img/blocks/LARS_FLH.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS_FLH.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /><ellipse
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:110.7085495;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
id="path4525-2"
cx="19.112232"
cy="32.480423"
rx="7.3946142"
ry="7.508378" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

71
img/blocks/LARS_FLL.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS_FLL.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /><rect
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:7.5590539;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
id="rect4551-2"
width="12.074839"
height="14.32064"
x="0.24245729"
y="-0.02453734" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

71
img/blocks/LARS_FRH.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS_FRH.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /><ellipse
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:110.7085495;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
id="path4525"
cx="57.751133"
cy="31.295048"
rx="7.3946142"
ry="7.508378" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

71
img/blocks/LARS_FRL.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="75.938px"
height="75.938px"
viewBox="0 0 75.938 75.938"
style="enable-background:new 0 0 75.938 75.938;"
xml:space="preserve"
sodipodi:docname="LARS_FRL.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview39"
showgrid="false"
inkscape:zoom="4.3950905"
inkscape:cx="57.872316"
inkscape:cy="52.258221"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" /><path
d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
style="stroke-width:1.41756129" /><g
id="g8" /><g
id="g10" /><g
id="g12" /><g
id="g14" /><g
id="g16" /><g
id="g18" /><g
id="g20" /><g
id="g22" /><g
id="g24" /><g
id="g26" /><g
id="g28" /><g
id="g30" /><g
id="g32" /><g
id="g34" /><g
id="g36" /><rect
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:7.77249622;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
id="rect4551"
width="12.766368"
height="14.32064"
x="63.3797"
y="-0.02453734" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1 @@
<div>Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>

46
lang/LARS.json Normal file
View File

@ -0,0 +1,46 @@
{
"langs":
{
"en-GB":
{
"keys":
{
"LANG_SUBCATEGORY_WALK": "Robot walk",
"LANG_MOVEMENT_LARS_ROBOT": "Define robot",
"LANG_MOVEMENT_LARS_FRH": "Hip 1",
"LANG_MOVEMENT_LARS_BRH": "Hip 2",
"LANG_MOVEMENT_LARS_BLH": "Hip 3",
"LANG_MOVEMENT_LARS_FLH": "Hip 4",
"LANG_MOVEMENT_LARS_FRL": "Leg 1",
"LANG_MOVEMENT_LARS_BRL": "Leg 2",
"LANG_MOVEMENT_LARS_BLL": "Leg 3",
"LANG_MOVEMENT_LARS_FLL": "Leg 4",
"LANG_LARS_INIT_TOOLTIP": "Defines the servo pins for a quadruped robot.",
"LANG_LARS_MOVEMENT": "Move robot",
"LANG_LARS_MOVEMENT_MOVEMENT": "Movement",
"LANG_LARS_MOVEMENT_HOME": "Home",
"LANG_LARS_MOVEMENT_WALK": "Walk",
"LANG_LARS_MOVEMENT_OMNIWALK": "Omni walk",
"LANG_LARS_MOVEMENT_TURN_LEFT": "Turn left",
"LANG_LARS_MOVEMENT_TURN_RIGHT": "Turn right",
"LANG_LARS_MOVEMENT_MOONWALK": "Moonwalk",
"LANG_LARS_MOVEMENT_DANCE": "Dance",
"LANG_LARS_MOVEMENT_UPDOWN": "Up-down",
"LANG_LARS_MOVEMENT_PUSHUP": "Push-up",
"LANG_LARS_MOVEMENT_HELLO": "Hello",
"LANG_LARS_MOVEMENT_WAVE": "Wave",
"LANG_LARS_MOVEMENT_LEG_NUMBER": "Leg number",
"LANG_LARS_MOVEMENT_STEPS": "Steps",
"LANG_LARS_MOVEMENT_PERIOD": "Period",
"LANG_LARS_MOVEMENT_DIR": "Direction",
"LANG_LARS_MOVEMENT_SIDE": "Side",
"LANG_LARS_MOVEMENT_TURN_FACTOR": "Turn factor",
"LANG_LARS_MOVEMENT_FORWARD": "Forward",
"LANG_LARS_MOVEMENT_BACKWARD": "Backward",
"LANG_LARS_MOVEMENT_YES": "Yes",
"LANG_LARS_MOVEMENT_NO": "No",
"LANG_LARS_MOVEMENT_TOOLTIP": "Generates movement primitives for a quadruped robot"
}
}
}
}

View File

@ -1,349 +1,225 @@
/*
Blockly.Blocks['espui_prepare_fs'] = {
category: 'ESPUI',
colour: '#3357c7',
helpUrl: Facilino.getHelpUrl('espui'),
tags: ['webinterface'],
examples: ['lol.bly'],
init: function() {
var wifiOptions = [
['No', false],
['Yes', true]
];
this.appendDummyInput()
.appendField('Prepare FileSystem (upload once without other in setup code, then omit)');
}
};
Facilino.LANG_COLOUR_MOVEMENT = '#CECE42';
Facilino.LANG_COLOUR_MOVEMENT_WALK = '#8D8D25';
Blockly.Arduino['espui_prepare_fs'] = function(block) {
var wifi_option = block.getFieldValue('wifi_option');
Blockly.Arduino.definitions_['define_espui_h'] = '#include <ESPUI.h>';
Blockly.Arduino.setups_['setup_espui'] = '\n';
Blockly.Arduino.setups_['setup_espui'] += ' ESPUI.prepareFileSystem();\n';
return null;
};
Blockly.Blocks['LARS_init'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_MOVEMENT'),
subcategory: Facilino.locales.getKey('LANG_SUBCATEGORY_WALK'),
category_colour: Facilino.LANG_COLOUR_MOVEMENT,
colour: Facilino.LANG_COLOUR_MOVEMENT_WALK,
helpUrl: Facilino.getHelpUrl('LARS_init'),
tags: [],
examples: [],
init: function () {
this.appendDummyInput('').appendField(new Blockly.FieldImage('img/blocks/LARS.svg', 32*options.zoom, 32*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_ROBOT'));
this.appendValueInput('FRH').appendField(new Blockly.FieldImage('img/blocks/LARS_FRH.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_FRH')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
this.appendValueInput('BRH').appendField(new Blockly.FieldImage('img/blocks/LARS_BRH.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_BRH')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
this.appendValueInput('BLH').appendField(new Blockly.FieldImage('img/blocks/LARS_BLH.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_BLH')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
this.appendValueInput('FLH').appendField(new Blockly.FieldImage('img/blocks/LARS_FLH.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_FLH')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
this.appendValueInput('FRL').appendField(new Blockly.FieldImage('img/blocks/LARS_FRL.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_FRL')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
this.appendValueInput('BRL').appendField(new Blockly.FieldImage('img/blocks/LARS_BRL.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_BRL')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
this.appendValueInput('BLL').appendField(new Blockly.FieldImage('img/blocks/LARS_BLL.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_BLL')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
this.appendValueInput('FLL').appendField(new Blockly.FieldImage('img/blocks/LARS_FLL.svg', 24*options.zoom, 24*options.zoom)).appendField(Facilino.locales.getKey('LANG_MOVEMENT_LARS_FLL')).appendField(new Blockly.FieldImage('img/blocks/pwm_signal.svg', 24*options.zoom, 24*options.zoom)).setAlign(Blockly.ALIGN_RIGHT);
this.setPreviousStatement(true,'code');
this.setNextStatement(true,'code');
this.setColour(Facilino.LANG_COLOUR_MOVEMENT_WALK);
this.setTooltip(Facilino.locales.getKey('LANG_LARS_INIT_TOOLTIP'));
}
};
*/
Blockly.Blocks['walk_forward'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('walk_forward'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Walking");
this.setColour("#FF00FF");
this.setTooltip("");
Blockly.Arduino['LARS_init'] = function(block) {
var code='';
var input_FRH = Blockly.Arduino.valueToCode(this,'FRH',Blockly.Arduino.ORDER_ATOMIC) || '26';
var input_FLH = Blockly.Arduino.valueToCode(this,'FLH',Blockly.Arduino.ORDER_ATOMIC) || '25';
var input_BRH = Blockly.Arduino.valueToCode(this,'BRH',Blockly.Arduino.ORDER_ATOMIC) || '17';
var input_BLH = Blockly.Arduino.valueToCode(this,'BLH',Blockly.Arduino.ORDER_ATOMIC) || '16';
var input_FRL = Blockly.Arduino.valueToCode(this,'FRL',Blockly.Arduino.ORDER_ATOMIC) || '27';
var input_FLL = Blockly.Arduino.valueToCode(this,'FLL',Blockly.Arduino.ORDER_ATOMIC) || '5';
var input_BRL = Blockly.Arduino.valueToCode(this,'BRL',Blockly.Arduino.ORDER_ATOMIC) || '23';
var input_BLL = Blockly.Arduino.valueToCode(this,'BLL',Blockly.Arduino.ORDER_ATOMIC) || '13';
Blockly.Arduino.definitions_['define_lars_h'] = '#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_lars']='LARS lars;\n';
Blockly.Arduino.setups_['setup_lars_init'] = 'lars.init('+input_FRH+','+input_FLH+','+input_BRH+','+input_BLH+','+input_FRL+','+input_FLL+','+input_BRL+','+input_BLL+');\n';
return code;
};
}
};
Blockly.Arduino['LARS_movement'] = function() {
var code='';
var movement = this.getFieldValue('MOVEMENT');
if (movement==='0')
code+='lars.home();\n';
else if (movement==='1')
code+='lars.hello();\n';
else if (movement==='2')
code+='lars.wave('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+');\n';
else if (movement==='3')
code+='lars.turnL('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '600')+');\n';
else if (movement==='4')
code+='lars.turnR('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '600')+');\n';
else if (movement==='5')
code+='lars.moonwalk('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '5000')+');\n';
else if (movement==='6')
code+='lars.dance('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '600')+');\n';
else if (movement==='7')
code+='lars.upDown('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '5000')+');\n';
else if (movement==='8')
code+='lars.pushUp('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '600')+');\n';
else if (movement==='9')
code+='lars.walk('+this.getFieldValue('FIELD3')+','+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '800')+');\n';
else if (movement==='10')
code+='lars.omniWalk('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '800')+','+this.getFieldValue('FIELD3')+','+(Blockly.Arduino.valueToCode(this, 'INP4', Blockly.Arduino.ORDER_ATOMIC) || '0')+');\n';
return code;
}
Blockly.Arduino['walk_forward'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.walk();\n';
code+= '\n';
return code;
};
Blockly.Blocks['walk_backward'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('walk_backward'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Walking_Back");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['walk_backward'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.walk(0);\n';
code+= '\n';
return code;
};
Blockly.Blocks['Turn_R'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('Turn_R'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Turn_Right");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['Turn_R'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.turnR(1, 550);\n';
code+= '\n';
return code;
};
Blockly.Blocks['Turn_L'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('Turn_L'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Turn_Left");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['Turn_L'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.turnL(1, 550);\n';
code+= '\n';
return code;
};
Blockly.Blocks['PushUp'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('PushUp'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Push_Up");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['PushUp'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.pushUp(1, 600);\n';
code+= '\n';
return code;
};
Blockly.Blocks['UpDown'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('UpDown'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Up_Down");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['UpDown'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.upDown(1, 5000);\n';
code+= '\n';
return code;
};
Blockly.Blocks['Dance'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('Dance'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Dance");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['Dance'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.dance(1, 600);\n';
code+= '\n';
return code;
};
Blockly.Blocks['Wave'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('Wave'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Wave");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['Wave'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.wave();\n';
code+= '\n';
return code;
};
Blockly.Blocks['Slow_Turn_R'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('Slow_Turn_R'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Slow_Turn_Right");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['Slow_Turn_R'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.omniWalk(1, 600, true, 1);\n';
code+= '\n';
return code;
};
Blockly.Blocks['Slow_Turn_L'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('Slow_Turn_L'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Slow_Turn_Left");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['Slow_Turn_L'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.omniWalk(1, 600, false, 1);\n';
code+= '\n';
return code;
};
Blockly.Blocks['MoonWalk'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('MoonWalk'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Moonwalk");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['MoonWalk'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.moonwalkL(1, 5000);\n';
code+= '\n';
return code;
};
Blockly.Blocks['Hello'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
helpUrl: Facilino.getHelpUrl('Hello'),
tags: [],
examples: [],
init: function() {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendDummyInput()
.appendField("Audience_Hello");
this.setColour("#FF00FF");
this.setTooltip("");
}
};
Blockly.Arduino['Hello'] = function(block) {
Blockly.Arduino.setups_['setup_']='robot.init();\n ';
var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
var code='';
code+='robot.hello();\n';
code+= '\n';
return code;
};
Blockly.Blocks['LARS_movement'] = {
category: Facilino.locales.getKey('LANG_CATEGORY_MOVEMENT'),
subcategory: Facilino.locales.getKey('LANG_SUBCATEGORY_WALK'),
tags: [],
helpUrl: Facilino.getHelpUrl('LARS_movement'),
examples: [],
category_colour: Facilino.LANG_COLOUR_MOVEMENT,
colour: Facilino.LANG_COLOUR_MOVEMENT_WALK,
init: function() {
this.setColour(Facilino.LANG_COLOUR_MOVEMENT_WALK);
var movement = new Blockly.FieldDropdown([
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_HOME'),'0'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_HELLO'),'1'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_WAVE'),'2'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_TURN_LEFT'),'3'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_TURN_RIGHT'),'4'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_MOONWALK'),'5'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_DANCE'),'6'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_UPDOWN'),'7'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_PUSHUP'),'8'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_WALK'),'9'],
[Facilino.locales.getKey('LANG_LARS_MOVEMENT_OMNIWALK'),'10']
]);
this.appendDummyInput().appendField(new Blockly.FieldImage('img/blocks/LARS.svg', 32*options.zoom, 32*options.zoom)).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT'));
this.appendDummyInput('').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_MOVEMENT')).appendField(movement,'MOVEMENT').setAlign(Blockly.ALIGN_RIGHT);
this.last_movement = -1;
this._inp1_removed = true;
this._inp2_removed = true;
this._inp3_removed = true;
this._inp4_removed = true;
this.checkMovement();
this.last_movement = this.getFieldValue('MOVEMENT');
this.setInputsInline(false);
this.setPreviousStatement(true,'code');
this.setNextStatement(true,'code');
this.setOutput(false);
this.setTooltip(Facilino.locales.getKey('LANG_LARS_MOVEMENT_TOOLTIP'));
},
checkMovement: function() {
var _movement = this.getFieldValue('MOVEMENT');
try {
if (_movement<10)
{
this._inp4_removed=true;
this.removeInput('INP4');
}
} catch (e) {}
try {
if (_movement<9)
{
this._inp3_removed=true;
this.removeInput('INP3');
}
} catch (e) {}
try {
if (_movement<3)
{
this._inp2_removed=true;
this.removeInput('INP2');
}
} catch (e) {}
try {
if (_movement<2)
{
this._inp1_removed=true;
this.removeInput('INP1');
}
} catch (e) {}
if ( _movement === '2') {
if (this._inp1_removed)
{
this.appendValueInput('INP1').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_LEG_NUMBER'),'TEXT1').setAlign(Blockly.ALIGN_RIGHT);
this._inp1_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_LEG_NUMBER'),'TEXT1');}catch (e) {}
} else if (( _movement >= '3')&&( _movement <= '8')) {
if (this._inp1_removed)
{
this.appendValueInput('INP1').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1').setAlign(Blockly.ALIGN_RIGHT);
this._inp1_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1');}catch (e) {}
if (this._inp2_removed)
{
this.appendValueInput('INP2').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD','TEXT2')).setAlign(Blockly.ALIGN_RIGHT);
this._inp2_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2');}catch (e) {}
} else if ( _movement === '9') {
if (this._inp1_removed)
{
this.appendValueInput('INP1').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1').setAlign(Blockly.ALIGN_RIGHT);
this._inp1_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1');}catch (e) {}
if (this._inp2_removed)
{
this.appendValueInput('INP2').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2').setAlign(Blockly.ALIGN_RIGHT);
this._inp2_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2');}catch (e) {}
if (this._inp3_removed)
{
this.appendDummyInput('INP3').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3').appendField(new Blockly.FieldDropdown([[Facilino.locales.getKey('LANG_LARS_MOVEMENT_FORWARD'),'0'],[Facilino.locales.getKey('LANG_LARS_MOVEMENT_BACKWARD'),'1']]),'FIELD3').setAlign(Blockly.ALIGN_RIGHT);
this._inp3_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3'); this.getInput('INP3').removeField('FIELD3'); this.getInput('INP3').appendField(new Blockly.FieldDropdown([['Forward','0'],['Backward','1']]),'FIELD3');}catch (e) {}
}
else if ( _movement === '10') {
if (this._inp1_removed)
{
this.appendValueInput('INP1').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1').setAlign(Blockly.ALIGN_RIGHT);
this._inp1_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1');}catch (e) {}
if (this._inp2_removed)
{
this.appendValueInput('INP2').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2').setAlign(Blockly.ALIGN_RIGHT);
this._inp2_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2');}catch (e) {}
if (this._inp3_removed)
{
this.appendDummyInput('INP3').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3').appendField(new Blockly.FieldDropdown([[Facilino.locales.getKey('LANG_LARS_MOVEMENT_YES'),'true'],[Facilino.locales.getKey('LANG_LARS_MOVEMENT_NO'),'false']]),'FIELD3').setAlign(Blockly.ALIGN_RIGHT);
this._inp3_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_SIDE'),'TEXT3'); this.getInput('INP3').removeField('FIELD3'); this.getInput('INP3').appendField(new Blockly.FieldDropdown([['Yes','true'],['No','false']]),'FIELD3');}catch (e) {}
if (this._inp4_removed)
{
this.appendValueInput('INP4').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_TURN_FACTOR'),'TEXT4').setAlign(Blockly.ALIGN_RIGHT);
this._inp4_removed=false;
}
else
try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_TURN_FACTOR'),'TEXT4');}catch (e) {}
}
},
onchange: function() {
if (this.getFieldValue('MOVEMENT') !== this.last_movement) {
this.checkMovement();
this.last_movement = this.getFieldValue('MOVEMENT');
}
}
};

View File

@ -6,4 +6,4 @@ sentence=ESP32 Movement library for a simple 4 leg 8 servo crab like robot Libra
paragraph=A library that creates simple commands for complex robotic movements of a 4 leg 8 servo crab when using the ESP32
category=Signal Input/Output
url=https://github.com/s00500/LARS
architectures=ESP32
architectures=*

View File

@ -17,39 +17,22 @@
LARS::LARS(): reverse{0, 0, 0, 0, 0, 0, 0, 0}, trim{0, 0, 0, 0, 0, 0, 0, 0} {
board_pins[FRONT_RIGHT_HIP] = 26; // front right inner
board_pins[FRONT_LEFT_HIP] = 25; // front left inner
board_pins[BACK_RIGHT_HIP] = 17; // back right inner
board_pins[BACK_LEFT_HIP] = 16; // back left inner
board_pins[FRONT_RIGHT_LEG] = 27; // front right outer
board_pins[FRONT_LEFT_LEG] = 5; // front left outer // POSITIONS LOOKING FROM THE MIDDLE OF THE ROBOT!!!!!
board_pins[BACK_RIGHT_LEG] = 23; // back right outer
board_pins[BACK_LEFT_LEG] = 13; // back left outer
}
void LARS::init() {
/*
trim[] for calibrating servo deviation,
initial posture (home) should like below
in symmetric
\ /
\_____/
| |
|_____|
/ \
/ \
*/
/*
trim[FRONT_LEFT_HIP] = 0;
trim[FRONT_RIGHT_HIP] = -8;
trim[BACK_LEFT_HIP] = 8;
trim[BACK_RIGHT_HIP] = 5;
void LARS::init(){
init(26, 25, 17, 16, 27, 5, 23, 13); // Calling init with default values
}
trim[FRONT_LEFT_LEG] = 2;
trim[FRONT_RIGHT_LEG] = -6;
trim[BACK_LEFT_LEG] = 6;
trim[BACK_RIGHT_LEG] = 5;
*/
void LARS::init(int FRH, int FLH, int BRH, int BLH, int FRL, int FLL, int BRL, int BLL) {
board_pins[FRONT_RIGHT_HIP] = FRH; // front right inner
board_pins[FRONT_LEFT_HIP] = FLH; // front left inner
board_pins[BACK_RIGHT_HIP] = BRH; // back right inner
board_pins[BACK_LEFT_HIP] = BLH; // back left inner
board_pins[FRONT_RIGHT_LEG] = FRL; // front right outer
board_pins[FRONT_LEFT_LEG] = FLL; // front left outer // POSITIONS LOOKING FROM THE MIDDLE OF THE ROBOT!!!!!
board_pins[BACK_RIGHT_LEG] = BRL; // back right outer
board_pins[BACK_LEFT_LEG] = BLL; // back left outer
for (int i = 0; i < 8; i++) {
oscillator[i].start();

View File

@ -1,6 +1,12 @@
#ifndef LARS_h
#define LARS_h
#include <ESP32_Servo.h>
#if defined(ESP32)
#include <ESP32_Servo.h>
#else
#include <Servo.h>
#endif
#include "Octosnake.h"
// servo index to board_pins
@ -20,6 +26,7 @@ class LARS {
public:
LARS();
void init();
void init(int FRH = 26, int FLH = 25, int BRH = 17, int BLH = 16, int FRL = 27, int FLL = 5, int BRL = 23, int BLL = 13);
void walk(int dir = 1, float steps = 1, float T = 800); // T initial 400
void omniWalk(float steps, float T, bool side, float turn_factor);
void turnL(float steps, float period);