We are going to present you the Scratch 2.0 adaptation for the Aisoy1. The use of it will be similar than the previous BYOB applications created by ourselves.
Using Scratch 2.0 we can create programs that uses Aisoy1 to do spectacular things, only dragging blocks to the script area. These blocks can be from the original Scratch or from the Aisoy Extension, that lend us work with our Aisoy1 in the online Scratch version.
How do we use Scratch 2.0 and Aisoy1?
Run the Scratch 2.0 editor writing the next direction on our browser address bar:
*We need internet connection to open that.
Scratch editor is like:
Scratch Display. We could interact with it using specific blocks (change sprites, show webcam…)
Types or Category blocks.
Specific blocks of selected category.
Costumes. To manage the different costumes of sprites.
Sounds. To manage the sounds to play at programm scripts.
The most important thing in Scratch. Programming area where we will put the different program blocks.
Scene or background of Scratch display.
Sprites. To manage and select the different sprites of the current program.
Now, we will introduce to Scratch the Aisoy Extension, that includes the new blocks to interact with our Aisoy1 in the “More blocks” category.
To add the extension we must to open the “aisoy_template.sb2” that Aisoy provides you. To do that, we have to click on “File” menu, and then, click on “Upload from your computer”. Select the “aisoy_extension.sb2” and accept. When you have opened that file in the Scratch editor, you could see the new Aisoy blocks to interact with the robot at “More blocks” section about scratch blocks.
Now, to connect the bot to Scratch, only we need is to drag the “connect” block to the script area and put it our Aisoy1 IP. After cliking it, we could see the green indicator of extension that informs it has connected one or more Aisoy1.
We will explain the function of all our blocks:
It disconnects the bot.
It sets the bot language and genre voice. In this case, “bot1” will be in “english” with “male” voice.
Here, we set the bot dictionary to recognise by voice (a list). The list will be from standard Scratch lists that we will set with words to recognize Check the language block previously. You must set it at the same of words list you want to use.
This block will set the bot to a specific emotional state. We could see a new parameter (“block” or “no block”). With block option enabled, program will be waiting until emotional change ends. Then, next block continues. “no block” does the next block executes although previous block has no ended. Default value is “block”.
Bot says a specific text without moving mouth.
Bot says a specific text moving mouth.
It makes the bot say a phrase of a list (standard list of Scratch) randomly. It is comfortable when placed inside a loop. Each iteration, the bot will say a phrase of the list randomly. Each phrase must end init in “ and end with another “, and no one if it is an only word (not a phrase with more than one word).
It makes the bot move head horizontally, to a “specific position” (between 0 and 1) in “specific seconds”. In this case, the bot will be in position “0.5” after “1” seconds.
Now, head vertically.
The same for eyebrows.
And finally, the eyes.
This lend us change the heart color of our bot, using RGB color codification. Here, the led will be in white after 1 seconds.
It will set the 70 leds of mouth display. 0 vaue to off, and 1 to on. Using it we could draw some pictures in the Aisoy1 mouth.
This block will be executed when bot will be touched at left-right sides or head (we indicate it at the menu). Then, the next blocks will be executed.
In this case, it will be activated with accelerometer values (0, 1, 2, 3 and 4).
This will be activated after listening “sentence”. Sentence could be an specific word by user.
Important: To use that, you need to have Aisoy1 Botmobil. If you don’t have them, you mustn’t use the next blocks. They could crash your program if you drag them to the script area and execute.
Bot move forward 1 seconds.
Move forward until we stop it manually.
**To the left,right and back movements are the same
It will stop the bot movement.
Using combinations of these blocks, and the possibilities of the original Scratch blocks, we will be able to make all that we may have in mind using our robot.
Now, make your Aisoy1 alive!