[go: up one dir, main page]

0% found this document useful (0 votes)
601 views54 pages

Otto Blockly Guide

Otto Blockly provides two ways to code and upload programs to Otto - using the Otto Blockly software offline or using the Arduino IDE with additional library installations. Otto Blockly is easy to use with all-in-one coding and USB upload without needing Arduino libraries, while the Arduino IDE requires library installations but works offline and is compatible with all operating systems. The document then provides instructions on setting up Otto Blockly software, familiarizing with the block programming environment, completing simple example projects, and making more complex projects interacting with sensors and using advanced programming.

Uploaded by

porsche6911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
601 views54 pages

Otto Blockly Guide

Otto Blockly provides two ways to code and upload programs to Otto - using the Otto Blockly software offline or using the Arduino IDE with additional library installations. Otto Blockly is easy to use with all-in-one coding and USB upload without needing Arduino libraries, while the Arduino IDE requires library installations but works offline and is compatible with all operating systems. The document then provides instructions on setting up Otto Blockly software, familiarizing with the block programming environment, completing simple example projects, and making more complex projects interacting with sensors and using advanced programming.

Uploaded by

porsche6911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Otto

Blockly
guide
Uploading a code, there are 2 ways...

Otto Blockly Standalone: Works Arduino IDE: Works offline


offline, now compatible with all OS compatible with all OS, requires to
easy to use, all in one coding & USB additionally install libraries and
upload (No need Arduino Libraries) coding experience with C++
Code your own robot
● Setup and installation of software
● Familiarize with the block
programming environment.
● First simple projects, like
programming a dance with Otto.
● Learn the concept of sequential
thinking and conditionals.
● Make more complex project, interact
with sensors, use advance
programming.

Did you read this guide?


Download
Otto Blockly
*your antivirus might tell you
the software is not safe,
but it not true 😀
just proceed
Install
Install USB Driver
Some computers automatically recognize
Otto as a USB device when is connected, but
some do not.
If your computer did not recognize the USB
device you need to download and install the
USB driver:
USB serial CH340, download it here
This guide covers all OS step by step
or
FT232 USB UART download it here
This guide covers step by step
User interface of
Otto Blockly
Levels Language Examples Board USB port Upload About Serial Mode

Workspace save arduino code

Blocks
Toolbar Drag, Drop & Connect
Quick start test
Hi Otto Builder
I am back, ready to help you.
1 Let’s open an example by
clicking the hat button.

2 Select the “Dance”


example.

If you are
adventurous
select a different
example
3 Connect your robot and
make sure the COM# is
selected in the USB port
dropdown menu*

*If nothing appears then


the USB driver was not
properly installed in your
computer you must restart
your computer and try
again.
4 Click in the upload button.

The upload process should


take less than a minute.
4 If this error appears that
means the Arduino Nano*
board is not correct, then try
selecting Arduino Nano
instead and click upload
again.

Oops! no worries we
can fix that
*sometimes Nano boards
come with a different
“bootloader”
they use different settings for
uploading, both work the
same at the end
5 Itupload
only takes few seconds to
the code
successfully when the right
board is selected.

This means your code was


uploaded to Otto! and your
robot should be dancing
now.

Yay you did it congrats!


see you later
Quick start resume
1. Install Otto Blockly
2. Open an example
3. Connect your Otto
4. Select Arduino Nano

(old bootloader or without)

5. Select USB COM#


6. Click Upload (wait a bit)
Common issues
Otto doesn’t appear connected?
Install the CH340 or FTDI USB driver to see be
able to see it in the COM port.

Can't upload code?


Wrong board selected (try Arduino Nano old
bootloader or Arduino Nano)

Does Otto reset every now and then?


Low quality batteries or bad connections.

Are Otto legs and feet twisted?


Make sure you centered and aligned your
servos when assembling.
Now let’s learn the
Basics
Levels & Language
Help us improve
and add new
Languages here
Toolbar Categories

Structure Otto Sensors Displays

Math Logic Variable Function

Audio Text Motor Time

IoT Cameras Communication


�� Level 1
Beginner Toolbar with all main Otto movements

Structure: Setup and Loop main brackets for the program.


Otto: Movements, sounds and gestures.
Sensors: Ultrasound, touch, sound and gyro.
LED Eyes: I2C 16x8 Matrix .
LED Mouth: SPI 8x8 Matrix.

Time: Used to delimit the program over time.


Input/Output: Full control of Arduino GPIO ports
Logic: Create conditionals, repetitions and logic
programming.
Math: Make calculations or insert numbers.
Functions: create a procedure that can be repeated.
Variable: A named value that can be changed.
��💻 Level 2 and 3
Advanced Toolbar with blocks for Arduino projects

Sensing: All sort of sensors that can be added to Otto or to


create other Arduino projects,

Motor: Control all kinds of servos steppers and dc motors

LED: RGB, Neopixels and LED matrix.


Displays: LCD, OLED and other screens.
Audio: emit a sound with a buzzeror play mp3 songs
Communication: with modules. Bluetooth, IrDa or Serial.
Keyboard and Mouse: (only for Arduino Leonardo and
Micro)
MuVision: Video recording or more advanced image
recognition interactions
Setup / Loop
You should always use this block

First click Structure on the left side toolbar.

We will start with the Setup / Loop block, click


on it

Loop opens and ends a function sequence


and it keeps repeating forever.

If you want to run your code only once use the


Setup brackets.

The setup bracket is also to initialize


components and configure pins.
Drag & drop blocks
From toolbar select Otto, drag from the list the configuration block
into the setup bracket and other blocks into the loop structure.
Servo centering example
Upload code

After upload the code the feet must


be aligned and centered as much
as possible, if not you must
re-assemble the servos in the right
angle.
Walk before Run
Walk in blocks in C++ code

Otto.walk(1,1000,1);
Can you make Otto
run?
Otto.walk(1,500,1);
Example in Blockly to
Servos wiring
control each motor
Add or duplicate one
more Servo block and
a Time delay
Dance Time!
Make your own dance!
Drag & drop more Otto blocks.

Otto.walk(2,1000,1);
move function
(“#steps, Time[ms], direction”)

Otto.tiptoeSwing(2, 1000, 25);


Otto.moonwalker(5, 1000, 40, 1);
Otto.moonwalker(5, 1000, 40, -1);
Otto.crusaito(3, 1000, 40, 1);
(steps,Time[ms],moveSize,direction);
Can Otto talk?
Piezo Buzzer
It is an actuator used to generate
sound, beep or even make the
melody of a song. Otto can’t talk
with this component only but he can
create sounds related to his
emotions similar to R2D2.

Make sure to identify the positive


mark and connect in the right pin.
Passive type. You could make Otto
PWM GND talk if you add an mp3 module.
Wiring
Compared to other components
there are only 2 pins/cables one goes
to GND and the one with the + sign in
the top, we connect to the signal pin
13.

You can see compared to the parts


we used before this one no need V.
Sound block
Otto have 19 different predefined
sounds related to emoji emotions. In
Arduino code is translated like this:

Otto.sing(S_superHappy);
sing function (“sound to make”)

(S_surprise); (S_OhOoh); (S_OhOoh2);


(S_cuddly); (S_sleeping); (S_happy);
(S_happy_short); (S_sad);
(S_confused); (S_buttonPushed);
(S_fart1)...
What is a gesture?
Otto.playGesture(OttoLove);
play Gesture function (“emotion/mood”)

Otto.playGesture(OttoSuperHappy);
Otto.playGesture(OttoSad);
Otto.playGesture(OttoSleeping);
Otto.playGesture(OttoConfused);
Movements + Otto.playGesture(OttoAngry);
sounds Otto.playGesture(OttoMagic);
to generate Otto.playGesture(OttoWave);
emotions or Otto.playGesture(OttoVictory);
Otto.playGesture(OttoFail);
moods.
Otto.playGesture(OttoFart);
How does Otto
“see”?
Ultrasonic Sensor
It is used to measure the distance to
an object by using ultrasonic waves,
have 4 pins:

VCC (Power), GND (Ground)


TRIG receives the control signal
ECHO sends a signal (pulse)

By measuring the duration of pulse


we can calculate the distance.
Otto can avoid
obstacles!
Avoid example
Measure distance
1. Go to examples/ serial
measure distance.
2. Then click Upload
3. Then open the serial
monitor by clicking on the
top right corner “search
icon”.

You must keep Otto


connected to USB
Serial Monitor
In the this Serial monitor window click start.

From here you will be able to see the distance


measured by the sensor in centimeters.

Test it out by putting your hand closer and


farther away from Otto.

You can use a ruler or a measure tape to see


how precise it is.
Play with other components
You can add Arms, all kinds of sensors, LED matrix, OLED displays and
more, the limit is in your imagination!
Coding Cards

Download
here
Use the Arduino code
You can always download the code or
copy/paste an use it as a normal Arduino
code!

Click the save button; that will exports the


sketch .ino text code file

This is also a way to convert blocks into


actual code that you can save and share to
other Arduino projects.

Convert code into blocks is not possible but


you can also open arduino sketch .ino files
directly from Otto Blockly and upload them!
Open the generated code in Arduino
You can open directly the file or open Arduino IDE and paste the code
into it. (follow the setup guide for Arduino in this link)
Check the settings (as in Otto Blockly)
1) Select tools from menu bar
2) Board select “Arduino Nano”
3) Processor select “Atmega328P” Old bootloader
4) For Port select the COM USB where your Otto is connected
Upload the Code to Otto
Once verified you are able to upload the code to Otto.

Lastly select the arrow pointing to the right to upload.

We basically just created a code in C++ for Arduino without actually


typing any line of code.
1 CHECK FOR UPDATES
Click on ? About button

2 Click on ☑Check now


button update to the latest
version

3 Ifavailable.
there is a new version
Click Yes and
wait to be downloaded
Find cool codes
in our community

🐱💻

join now!
Otto Blockly Otto Scratch AI
Standalone Windows Server based

● It can be installed locally and ● Needs internet connection.


therefore work without internet. ● It can’t upload code but you can
● It can upload code via USB. interact with Otto robot via BLE
● Lots of blocks to control all kinds (Bluetooth) instantaneously.
of Arduino boards, sensors, RGB ● Control basic functions with AI.
lights, screens, audio, cameras, ● Stage simulator for games.
motors and more. ● Only need to pre-upload one
● It can preview and edit text code. code, one time for live coding.
● No need to install libraries.
● It has an online version too in
case you have problem with the
installation.

You might also like