Artec Studuino User manual

Studuino
Block Programming Environment
Guide (Part 01)
[LEDs, Buzzers, and Sensors]
Published 2014/11/01
Revised 2018/06/28

1
Date Content
2016/11/01 First version
2017/01/16 Updated for new Studuino website
2017/04/14 Changed access guide based on new Studuino website
2018/01/22 Revised to include software and OS updates
2018/06/28 Updated description of Buzzer values
Version History

1
Index
1. Getting Started .......................................................................................... 1
2. Setup .......................................................................................................... 1
2.1. Installing Studuino Software ............................................................. 1
2.2. Connecting Parts .............................................................................. 2
3. LEDs ........................................................................................................... 5
3.1. Connecting an LED ........................................................................... 5
3.2. Port Settings ..................................................................................... 5
3.3. Lighting Up an LED........................................................................... 7
3.4. Making an LED Blink......................................................................... 9
3.5. Setting a Specic Number of Blinks................................................ 11
3.6. Changing the Speed of a Blink........................................................ 14
4. Buzzers..................................................................................................... 16
4.1. Connecting a Buzzer ....................................................................... 16
4.2. Port Settings ................................................................................... 16
4.3. Playing a Buzzer ............................................................................. 17
4.4. Playing a Melody............................................................................. 19
4.5. Using a List to Play Melodies .......................................................... 22
5. Push-buttons and Sensors..................................................................... 31
5.1. Connecting an LED ......................................................................... 31
5.2. Push-buttons................................................................................... 31
5.2.1. Port Settings...................................................................................................32
5.2.2. How Push-buttons Work................................................................................32
5.2.3. Programming ................................................................................................ 34
5.3. Light Sensors .................................................................................. 40
5.3.1. Connecting a Light Sensor .............................................................................40
5.3.2. Port Settings ..................................................................................................40
5.3.3. How a Light Sensor Works ............................................................................41
5.3.4. Programming .................................................................................................41
5.4. IR Photoreectors ........................................................................... 45
5.4.1. Connecting an IR Photoreector ....................................................................45
5.4.2. Port Settings ..................................................................................................45
5.4.3. How an IR Photoreector Works....................................................................46
5.4.4. Programming .................................................................................................47
5.5. Touch Sensors ................................................................................ 52

2
5.5.1. Connecting a Touch Sensor...........................................................................52
5.5.2. Port Settings ..................................................................................................52
5.5.3. How a Touch Sensor Works ..........................................................................53
5.5.4. Programming .................................................................................................53
5.6. Sound Sensors ............................................................................... 56
5.6.1. Connecting a Sound Sensor ..........................................................................56
5.6.2. Port Settings ..................................................................................................56
5.6.3. How a Sound Sensor Works..........................................................................57
5.6.4. Programming ................................................................................................57

1
1. Getting Started
This manual explains how to use the following electronic parts in the Block Programming
Environment:
LEDs
Buzzers
Push-buttons
Light Sensors
IR Photoreectors
Touch Sensors
Sound Sensors
The information in this manual may be revised at any time.
2. Setup
2.1. Installing Studuino Software
Follow the steps below to download the instruction manuals
you’ll need to install your Studuino software.
1) Go to the Studuino website at http://www.artec-kk.co.jp/studuino/en/
2) Mouse over Software and click Studuino or Studuino mini.
3) If you’ve chosen Studuino, use the next page to choose your system.
4) On the next page, go to the Software section and click the button for your operating system
to download the software.

2
Sensor/LED/Buzzer Connectors
★ Sound Sensors, Light Sensors, and IR Photoreectors connect to A0 through A7.
★ Touch Sensors, LEDs, and Buzzers connect to A0 through A5.
★ Accelerometers use both A4 and A5 at the same time.
★ Push-buttons A0-A3 can’t be used when a sensor is connected to A0-A3.
The gray wires of your sensor connecting
cables should face towards the center of
the board.
Gray
Black
Black
A4 A5 A6 A7
A0 A1 A2 A3
2.2. Connecting Parts
① Connecting Sensors, LEDs, and Buzzers
The pictures below show how to plug sensor connecting cables into your Sensors, Buzzers, and
LEDs in order to connect them to your Studuino.
★ Every sensor uses a three-wire cable except for the Accelerometer, which uses a four-wire cable.

3
②Connecting DC Motors
Up to two DC Motors can be connected using connectors M1 and M2.
★DC Motor connectors can only connect one way.
③Connecting Servomotors
Up to eight Servomotors can be connected to the Servomotor connectors.
The gray wires of your Servomotor cables
should face towards the center of the board.
★DC Motor connector M1 can't be used at the same time as Servomotor connectors D2 and D4.
★ DC Motor connector M2 can't be used at the same time as Servomotor connectors D7 and D8.
M1
M2
Gray
Black
Black
D9
D10
D11
D12
D2
D4
D7
D8

4
④Connecting a Battery Box
Plug your Battery Box into the POWER connector.
Sensors, LEDs, Buzzers, and Push-buttons can run on a USB connection, but DC Motors and
Servomotors require power from the Battery Box. You’ll also need a Battery Box in order to
power devices when the USB cable is disconnected.
POWER

5
3. LEDs
Learn how to program an LED in this chapter. It covers connecting devices to your Studuino,
setting ports, programming in the Block Programming Environment, and transferring data to
the board.
3.1. Connecting an LED
Connect an LED to Sensor/LED/Buzzer connector A4 on your Studuino.
3.2. Port Settings
Before you start programming, you’ll need to tell the Block Programming Environment which
Studuino ports you’ll be using. Open the Block Programming Environment and choose Port
Settings under Edit in the menu bar to open the Port Settings dialog.
LED
A4
Keep an eye on your cables!
The gray wire should be at the top.
Gray
Black
Black
Click
Click
①
②
You’ll see the
Port Settings dialog

6
Click
Click OK
Check the box here
Check A4 under Sensor/LED/Buzzer and choose LED.
You’ve now set the Studuino ports you’ll be using in the Block Programming Environment.
①
②
③
④
Choose LED

7
Click
3.3. Lighting Up an LED
It’s time to start learning about some programming basics using the block.
① Click the Motion button in the Command Palette. Now drag to the Script
Field and connect it to the block.
①
Drop the block once
you see the white line
② Drag and Drop
Command Palette
BlockPalette
Make sure the block is connected!
★Move blocks anywhere in the Script Field by dragging and dropping them. Dragging and
dropping a block will also move any blocks connected to it.
Script Field

8
② Use a USB cable to connect your Studuino to your PC. Now choose Transfer from the
Run menu to transfer your program.
Click
Click
①
②
Seeing the message below disappear means that your program has been successfully
transferred to your Studuino. The LED will light up automatically once the transfer nishes.
Your program didn’t transfer correctly if you see any of the messages below. Check the solutions
and try again.
Message Solution
Could not access to Studuino
Make sure Studuino is connected to the
PC.
Make sure your USB cable is properly connected
to your PC and Studuino
Could not access to Studuino
Serial port already in use. Try quitting
any programs that may be using it.
Close any applications that may be
communicating with your Studuino. If no other
applications are communicating with the board,
unplug the USB cable and press the onboard
Reset button.

9
3.4. Making an LED Blink
Now we’re going to program your LED to blink based on the program from 3.3. Lighting Up
an LED. This section will teach you about repeats by using the block to make your
program repeat forever.
①Click Control in the Command Palette then drag from the Control Palette to
the Script Field. Connect it to the blocks of your last LED program.
②Right-click on the block. Now click Duplicate in the menu.
③Now connect the block to the bottom of .
Drag the block and
drop it once you see
the white line
②
Click
①
Drag and drop
Right-click
①
②Choose Duplicate
This will duplicate
the block!
Connect it to the
end of your
program

10
④Drag from the Control Palette and use it to enclose your program in the
Script Field.
⑤Set the bottom to OFF.
Now you’ve programmed your LED to blink every second indenitely.
Use a USB cable to connect your Studuino to your PC. Now choose Transfer from the Run
menu to transfer your program. The LED will blink once every second once the transfer nishes.
①Turn on LED Repeat forever
②Wait one second
③Turn o LED
④Wait one second
Drag and drop
①
Make sure the block
encloses the whole
program
Click ▼
①
Choose o
②

11
3.5. Setting a Specic Number of Blinks
Now we’re going to control the number of times your LED blinks based on the program from 3.4.
Making an LED Blink. This section will teach you how to set the number of repeats by using the
block.
①Drag from the Control Palette to the Script Field.
②Move the blocks in the block into the opening of the block.
Drag and drop
Drag and drop
Drop them inside
the block

12
③ Drag the block back to the Block Palette to delete it.
Except for , any block can be deleted by dragging it back to the Block Palette.
★Right-click a block to bring up the context menu and click Delete to delete it.
★Select Undelete from the Menu bar to restore a block if you've accidentally deleted it.
④Connect the group of blocks you made in ②to the block.
Drag and drop
Now you’ve programmed your LED to blink ten times in a row.
Use a USB cable to connect your Studuino to your PC. Now choose Transfer from the Run
menu to transfer your program. The LED will blink 10 times in 1-second intervals once the
transfer nishes.
①Turn on LED
②Wait one second
③Turn o LED
④Wait one second
Repeat 10 times

13
Next, we’ll change the number of blinks by changing the number in the block.
⑤Click the 10 in the block and type in the number of LED blinks you want.
Use a USB cable to connect your Studuino to your PC. Now choose Transfer from the Run
menu to transfer your program. Once the transfer nishes, the LED will automatically blink the
number of times you set.
You can start a transferred program by choosing Run from the Run menu.
★Once you’ve transferred a program, you can run it using power from your Battery Box. Unplug your USB
cable from the Studuino. Now plug in your Battery Box, turn it on, and check to see if your LED blinks the
number of times that you set.
★Once your program nishes, restart it by pressing the RESET button on the board.
Battery Box
Click here and type
①Click
②Click
RESET Button
POWER

14
3.6. Changing the Speed of a Blink
Now we’re going to control how fast your LED blinks based on the program from 3.5. Setting a Number of
Blinks. While you can change the speed of an LED by changing the value in the block, let’s
try using a variable to change multiple values at once.
①Open the Command Palette and click the Variables button. Now click Make a variable. You’ll be
asked for a variable name. Name your variable time and click OK.
②You’ll now see blocks that let you control the time variable
④Click here
③Name it "time"
①Click
②Click
This dialog box
lets you name the
variable
These blocks will
appear
automatically

15
③Connect the block to the block. Now set the value in the
block to 0.5.
④Connect the block to the block.
Now you’ve programmed your LED to blink ten times in 0.5-second intervals.
③ Wait for time (0.5 seconds)
⑤ Wait time (0.5 seconds)
②Click here and type
①Drag
and Drop
Drag
and Drop
Use a USB cable to connect your Studuino to your PC. Now choose Transfer from the Run menu to
transfer your program. The LED will blink 10 times in 0.5-second intervals once the transfer nishes.
① Set time to 0.5
②Turn on LED
LED
④Turn off LED
Repeat 10 times

16
4. Buzzers
This section teaches how to program a Buzzer to play and stop as well as how to use list and function
blocks.
4.1. Connecting a Buzzer
Connect your Buzzer to Sensor/LED/Buzzer connector A5 on the Studuino.
Black
Black
Gray
Keep an eye on your cables!
The gray wire should be at the top.
う
A5
Buzzer
Gray
Black
Black
4.2. Port Settings
Before programming, you'll need to set the ports in the Block Programming Environment to match the
parts connected to your Studuino. Select Edit from the menu and choose Port Settings to open the Port
Settings dialog box. Check A5 under Sensor/LED/Buzzer and choose Buzzer.
Choose Buzzer
Table of contents
Other Artec Robotics manuals

Artec
Artec Robo 2.0 User manual

Artec
Artec Working Arm Robot User manual

Artec
Artec Robo 2.0 Ninja Sword User manual

Artec
Artec Robo 2.0 Lucky Lottery User manual

Artec
Artec Robotist Double Dolphins User manual

Artec
Artec Line Tracer User manual

Artec
Artec Robo 2.0 User manual

Artec
Artec Doggy Robot User manual

Artec
Artec Sensor Melody User manual

Artec
Artec Robo 2.0 User manual