OttoDIY / blockly

Otto Blockly; a fully integrated graphical programming for any type of Arduino projects, including robots, ready to install in your computer, it works offline and also online
https://www.ottodiy.com/software
GNU General Public License v2.0
114 stars 80 forks source link

Humanoid examples - error when checking code #89

Closed brendonhatcher closed 3 years ago

brendonhatcher commented 3 years ago

The Humanoid examples in 1.4.0 don't work - big block of red error text. It is only the blocks for arms that don't work. Code is

Error: Command failed: arduino-cli.exe compile --fqbn arduino:avr:nano:cpu=atmega328old sketch/sketch.ino C:\OttoBlockly\compilation\arduino\sketch\sketch.ino: In function 'void setup()': C:\OttoBlockly\compilation\arduino\sketch\sketch.ino:39:13: error: 'PIN_AR' was not declared in this scope AL.attach(PIN_AR); ^~ C:\OttoBlockly\compilation\arduino\sketch\sketch.ino:39:13: note: suggested alternative: 'PIN_RR' AL.attach(PIN_AR); ^~ PIN_RR C:\OttoBlockly\compilation\arduino\sketch\sketch.ino:40:11: error: 'PIN_AL' was not declared in this scope AR.attach(PIN_AL); ^~ C:\OttoBlockly\compilation\arduino\sketch\sketch.ino:40:11: note: suggested alternative: 'PIN_RL' AR.attach(PIN_AL); ^~ PIN_RL C:\OttoBlockly\compilation\arduino\sketch\sketch.ino:41:1: error: 'move_servo' was not declared in this scope move_servo(); ^~~~ C:\OttoBlockly\compilation\arduino\sketch\sketch.ino: In function 'void loop()': C:\OttoBlockly\compilation\arduino\sketch\sketch.ino:56:80: error: 'move_servo' was not declared in this scope for(int angle=90; angle<90+shift; angle+=shift_inc){ pos[2] = angle; move_servo(); delay(shift_delay);} ^~~~ C:\OttoBlockly\compilation\arduino\sketch\sketch.ino:57:84: error: 'move_servo' was not declared in this scope for(int angle=90+shift; angle>90-shift; angle-=shift_inc) { pos[2] = angle; move_servo(); delay(shift_delay); } ^~~~ C:\OttoBlockly\compilation\arduino\sketch\sketch.ino:58:77: error: 'move_servo' was not declared in this scope for(int angle=90-shift; angle<90; angle+=shift_inc) {pos[2] = angle; move_servo(); delay(shift_delay); } ^~~~ Error during build: exit status 1

cparrapa commented 3 years ago

solved here https://github.com/OttoDIY/blockly/commit/60a5d92a2500035fa2b0887922d9963d1c5a9297