58
Studuino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino programming environment develops, these instructions may be edited or revised.

Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

  • Upload
    others

  • View
    19

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

Studuino Icon Programming

Environment

Guide

Ver 0.9.6

4/17/2014

This manual introduces the Studuino Software environment. As the Studuino

programming environment develops, these instructions may be edited or revised.

Page 2: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

Index

1. Introduction ............................................................................................................ 1

1.1. Studuino Setup ........................................................................................................ 1

1.2. Connecting Parts ..................................................................................................... 1

2. LEDs ...................................................................................................................... 4

2.1. Flashing One LED .................................................................................................... 4

2.2. Flashing Four LEDs in Order ................................................................................... 7

2.3. Using Repeats ....................................................................................................... 10

3. Buzzers ................................................................................................................ 11

3.1. Using a Buzzer ....................................................................................................... 11

3.2. Making a Melody .................................................................................................... 13

4. Using Conditions and Submenus ......................................................................... 17

4.1. Push-button Switches ............................................................................................ 17

4.2. Submenus .............................................................................................................. 21

4.3. Using Touch Sensors............................................................................................. 24

4.4. Using Light Sensors ............................................................................................... 26

4.5. Using Sound Sensors ............................................................................................ 31

4.6. Using Reflective Infrared Sensors ......................................................................... 34

4.7. Using Accelerometers ............................................................................................ 38

5. Using DC Motors .................................................................................................. 42

5.1. Making the DC Motor Move ................................................................................... 42

5.2. Making a Twin-motor Car ...................................................................................... 44

5.3. DC Motor Calibration ............................................................................................. 47

6. Using Servomotors ............................................................................................... 49

6.1. Servomotor Calibration .......................................................................................... 49

6.2. Creating a Robotic Arm that Uses Three Servomotors ......................................... 53

Page 3: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

1

1. Introduction

1.1. Studuino Setup

Before beginning, visit http://www.artec-kk.co.jp/en/studuino and download the

document Studuino Programming Environment Setup for reference.

1.2. Connecting Parts

① Connecting sensors, buzzers, and LEDs

Sensor connecting cables are used to link sensors to the Studuino board. The cables

attach to sensor/LED/buzzer connectors located on the board, as shown below.

★ The three-wire cable is used for every sensor except the accelerometer, which

requires a four-wire cable.

★ Sound, light, and reflective infrared sensors can connect to A0 through A7.

★ Touch sensors, LEDs, and buzzers can connect to A0 through A5.

★ Accelerometers should connect to both A4 and A5.

★ Push-button switches A0-A3 cannot be used when using a sensor with connectors A0-A3.

BlGr

Bl

Sensor/LED/buzzer connectors

Gray wires face inside as shown.

A0 A1 A2 A3

A4 A5 A6 A7

Page 4: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

2

② Connecting a DC Motor

Up to two DC motors can be connected using connectors M1 and M2.

★ DC motor cables can only fit into the connector one way.

★ DC motor connector M1 cannot be used at the same time as servomotor connectors D2 and D4.

★ DC motor connector M2 cannot be used at the same time as servomotor connectors D7 and D8.

③ Connecting a Servomotor

Up to eight servomotors can be connected to the servomotor connectors.

★ DC motor connector M1 cannot be used at the same time as servomotor connectors D2 and D4.

★ DC motor connector M2 cannot be used at the same time as servomotor connectors D7 and D8.

M1

M2

Bl

ac

Bl

ac

Gr

ay

As shown in the picture to the right, the

gray cable should be on the right.

D9 D10 D11 D12

D2 D4 D7 D8

Page 5: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

3

④ Connecting a Battery Box

Connect the battery box cable to the POWER pins.

Sensors/LEDs/buzzers/switches can use voltage supplied via USB, but DC

motors and servomotors require voltage from the power jack. When USB is

disconnected, all devices require voltage from the power jack to operate.

POWER

Page 6: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

4

2. LEDs

2.1. Flashing One LED

Learning targets: ●Setting ports ●Placing icons ●Flashing and turning off an LED

●Transferring a program

① Connect an LED to a sensor/LED/buzzer connector.

Use connector A0 for the LED.

② Port Settings

Select Edit from the menu, then select Port Settings from the pull down menu to open

the setting dialog box.

First, uncheck all the boxes. Then check A0 under Sensor/LED/buzzer and

select LED from the menu.

Black Gray

Black

Gray wires face inside as shown.

LED

A0

Click Click

Page 7: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

5

③ Place an LED icon.

Drag & drop an LED icon from the icon palette to the first Operation Icon

box in the Program Field.

④ Turn the LED switch on.

Click on the LED icon you've just placed. Select ON in the Attribute Field at the

bottom.

A misplaced icon can be deleted by right-clicking on it and selecting Delete from the

context menu.

Icon Palette

Program Field

LED icon

Operation icon box

Drag & Drop

Click

Right-click Delete

Click

Attribute Field

Click

Page 8: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

6

⑤ Transfer the program.

Connect the Studuino board to the PC via USB cable and click the button to

transfer your program.

★ See 6. Troubleshooting in the Studuino Programming Environment Manual if you're having trouble

transferring your program.

⑥ Checking the result

After the data finishes transferring, the LED on the board will flash

automatically.

Click

It can take several seconds to transfer

a program. This message will disappear

after the transfer completes.

Do not disconnect the USB

cable during a transfer!

This can cause incomplete

data transfers or software

crashes.

You can also power your Studuino

using the battery box.

While the USB cable is connected,

power for the LED is supplied by the PC.

Page 9: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

7

2.2. Flashing Four LEDs in Order

Learning targets: ●Deleting and inserting icons ●Wait icons

① Connect four LEDs to sensor/LED/buzzer connectors on the Studuino

board.

Use connectors A0, A1, A2, and A3 for the LEDs.

② Port Settings

Choose LED for A0, A1, A2, and A3 under Port Settings.

Refer to 2.1. Flashing One LED for how to select Port Settings..

③ Place LED icons.

Place LED icons in Operation icon boxes 1 through 8 as shown below.

Refer to 2.1. Flashing One LED for how to place icons.

LED×4

A0 A1 A2 A3

Gray cable faces inside as shown.

★ Drag and drop

icons you've placed

to copy them.

Page 10: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

8

④ Set up the LED icons as shown below.

NO Switch Connector

1 ON A0

2 OFF A0

3 ON A1

4 OFF A1

5 ON A2

6 OFF A2

7 ON A3

8 OFF A3

The LEDs will not flash if the program is transferred as is. Processes 1 through 8 are

executed almost instantly and the flashes of the LEDs cannot be seen by human eyes.

⑤ Inserting Wait icons

Insert a Wait icon between each LED icon in the. We'll use the Wait icons to make the

flash duration longer.

Right-click

Click

To create an empty operation icon space, right-click on an Operation icon and select Add a

column from the context menu.

Page 11: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

9

⑥ Transfer the program again. Run it and see whether the LEDs flash in order.

This program makes four LEDs flash and turn off in order.

To repeat the program, press the RESET button.

Place a Wait icon in the new space and set the

duration.

Duration

Repeat this process to add a Wait

icon after each ON LED icon.

RESET button

Page 12: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

10

2.3. Using Repeats

Learning target: ●Loop functions

Use Repeats and the program from the previous section to make the four LEDs flash in

order repeatedly.

① Place a Start Repeat icon in the first Repeat icon box.

② Place an End Repeat icon in the last box.

A Repeat Settings dialog box appears when an End Repeat icon is placed. The number

of repeats determines how many times the LEDs will flash.

③ Transfer the program and the LEDs will flash according to the number of repeats that

were set.

Repeat icon boxes

Drag & Drop

Drag & Drop

A misplaced End Repeat icon can be

deleted by right-clicking on it and

selecting Delete from the context menu.

Right-click

Click

To clear any program you've created, select Edit

from the menu then click on Reset Menu.

★ Port Settings will also be reset.

Page 13: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

11

3. Buzzers

3.1. Using a Buzzer

Learning target: ● Buzzer settings

① Connect a buzzer to a sensor/LED/buzzer connector on the Studuino

board.

Use connector A0 for the buzzer.

② Port Settings

Choose Buzzer for A0 under Port Settings.

Refer to 2.1. Flashing One LED for how to select Port Settings..

③ Place a Buzzer icon.

Place a Buzzer icon in the first blank Operation icon space as shown below.

Refer to 2.1. Flashing One LED for how to place icons.

Buzzer A0

Gray wires face inside as shown.

Page 14: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

12

④ Select a note.

Set the pitch and length of the note.

⑤ Transfer the program and see if the buzzer sounds.

Refer to 2.1. Flashing One LED for how to transfer a program.

After transferring, this program plays a note once for the duration you set.

To repeat the note, press the Reset button.

Click

Click

Duration

RESET button

Page 15: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

13

3.2. Making a Melody

Learning targets: ●Melody icons ●Test mode

Now we're going to create a melody while checking the pitch and duration of each

note.

① Use the same steps as the previous section, using Melody icons instead of

a Buzzer icon.

Place two Melody icons in a row in the Operation icon boxes.

Refer to 2.1. Flashing One LED for how to place icons.

② Select a note.

Choose scales and notes (or rests), then click → to add them to the list.

Click Click

Click

Click

Page 16: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

14

To delete a programmed note, right-click on the note, then click OK when the

dialog box appears.

Example: Twinkle, Twinkle, Little Star

Right-click

Click

Each Melody icon can hold up to eight notes.

1 2

Page 17: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

15

③ Make sure the USB cable is connected before clicking the Test button.

You can use Test mode to hear and adjust your melody in real time.

★ Don't disconnect the USB cable while in Test mode!

This can cause the software to crash.

④ Hear the notes you've programmed by clicking on a Melody icon.

Click

This message will disappear after

several seconds, the Test button will

turn gray and Test mode will start.

Test

Click

Select a tempo of 90, 120, or 150.

Page 18: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

16

⑤ Click the Test button again to close Test mode and transfer your

program.

This program plays a set melody once after it’s been transferred.

To repeat the melody, press the Reset button.

Click here to

transfer your

program and play

the melody.

RESET button

Page 19: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

17

4. Using Conditions and Submenus

4.1. Push-button Switches

Use the push-button switches on the Studuino board to create a program that plays a

melody and makes the LED flash.

① Connect a buzzer and LED to sensor/LED/buzzer connectors on the

Studuino board.

Connect the LED to A4 and the buzzer to A5.

② Port Settings

Choose LED for A4 and Buzzer for A5 under Port Settings.

Tick the boxes A0-A3 under Buttons.

Refer to 2.1. Flashing One LED for how to select Port Settings..

Learning target: ●Setting conditions

A4 LED

Black Gray

Black

Gray wire should face inside as

shown. A5 Buzzer

Page 20: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

18

Page 21: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

19

③ Place two LED icons and a Melody icon.

Refer to 2.1. Flashing One LED for how to place icons.

④ Use the steps in 2.1. Flashing One LED and 3.2. Making a Melody to set

each icon's attributes.

⑤ Place a Single Condition Icon in the Condition boxes under each icon.

1. LED→ON

2. Melody

3. LED→OFF

Set as above.

Drag & Drop

Page 22: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

20

⑥ Set each condition.

⑦ Use Repeat icons to make your program loop steps 1 to 3 indefinitely.

Refer to 2.3. Using Repeats for how to use Repeat icons.

⑧ Transfer the program and check to see if it works.

Select

Select

Drag from yellow to gray

to change from ON to

OFF and vice versa.

Click

Select Repeat

indefinitely in the

Repeat Settings

dialog.

Press A1 to play the melody.

Press A0 to turn the LED on.

Press A2 to turn the LED off.

1. A0 Button1 → ON

2. A1 Button2 → ON

3. A2 Button3 → ON

Set as above.

Page 23: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

21

4.2. Submenus

Learning target: ● Submenus

Use Submenus and push-button switches to create a program that makes the LED blink

while a melody plays.

① Use the program from the previous section and add Submenu and Condition

icons.

② Move the End Repeat icon to the fourth space.

Refer to 2.3. Using Repeats for how to use Repeat icons.

Drag & Drop

Drag & Drop

Set A3 Button4 → ON

Select Repeat

indefinitely in the

Repeat Settings

dialog.

Page 24: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

22

③ Click the Submenu 1 tab to show the Submenu.

④ As shown below, place and set icons in the Operation icon boxes.

Click

1: LED

2: Buzzer

3: Wait

4: LED

5: Buzzer

6: Wait

Page 25: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

23

⑤ Transfer the program and check to see if it works.

Hold down A3 and a

melody will play in time

with the blinking LED.

Dual-condition Icons

Placing a Dual-condition icon allows you to set two conditions for a

sensor.

AND: When both conditions are satisfied, the action will be executed.

OR: When either of the two conditions is satisfied, the action will be executed.

Page 26: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

24

4.3. Using Touch Sensors

Learning target: ●Touch sensors

Now we’re going to make a program that causes the LED to flash when the touch sensor is

pressed.

① Connect an LED and touch sensor to sensor/LED/buzzer connectors on

the Studuino board.

Use A4 for the LED and A5 for the touch sensor.

② Port Settings

Choose LED for A4 and Touch sensor for A5 under Port Settings.

Refer to 2.1. Flashing One LED for how to select Port Settings.

③ Place LED icons in the Operation boxes and Condition icons in the

Condition boxes. Set them as shown below.

Black Gray

Black

Gray cables should face inside as

shown.

A4 LED

A5 Touch Sensor

Page 27: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

25

④ Use Repeat icons to loop steps 1-2.

Refer to 2.3. Using Repeats for how to use Repeat icons.

⑤ Transfer the program and check to see if it works.

Select Repeat indefinitely

in the Repeat Settings

dialog.

The LED will keep flashing while the touch sensor is pressed.

Page 28: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

26

4.4. Using Light Sensors

Learning targets: ●Light sensors ●Sensor Viewer

Use a light sensor to create a program that makes the LED flash in a dark environment.

① Connect an LED and a light sensor to the Studuino board.

Connect the LED to A4 and the light sensor to A5.

② Port Settings

Choose LED for A4 and Light sensor for A5 under Port Settings.

Refer to 2.1. Flashing One LED for how to select Port Settings..

Black Gray

Black

Gray cables should face inside as

shown.

A4 LED

Light Sensor A5

Page 29: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

27

③ Use the Sensor Viewer to check the sensor values.

Choose Run from the menu, then Sensor Viewer. The Sensor Viewer will appear.

Make sure the Studuino board is properly connected to the PC via USB cable.

See whether the sensor value changes as the brightness of the light is varied.

Click

Click

It will take several seconds to open the Sensor Viewer.

Sensor Viewer

Under a fluorescent light.

Ex:

Shaded by a hand.

Light sensor value

Page 30: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

28

④ After checking the sensor value, exit the sensor viewer.

⑤ Place an LED icon in the operation area and a single-condition icon in the

condition area. Set them as shown below.

① Left click

Page 31: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

29

⑥ Specify the range of the light sensor.

Range Setting Description (for a set value)

In the example below, the condition is satisfied when the sensor value falls below 3.

⑦ Add a condition that turns the LED off when more light is present.

= Same value

< Less than the value

> Greater than the value

|→←| Within range specified

←||→ Outside range specified

Page 32: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

30

⑧ Use Repeat icons to loop steps 1-2.

Refer to 2.3. Using Repeats for how to use Repeat icons.

⑨ Transfer the program and check to see if it works.

Select Repeat indefinitely

in the Repeat Settings

dialog.

Under a fluorescent light. Shaded by a hand.

★ If the program does not work properly, change the condition settings.

Page 33: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

31

4.5. Using Sound Sensors

Learning target: ● Sound sensors

Make a program that changes the number of flashing LEDs in response to the volume of a

sound.

① Connect four LEDs and a sound sensor to the Studuino board.

Connect LEDs to A0-A3 and the sound sensor to A4.

② Port Settings

Choose LED for A0-A3 and Sound sensor for A4 under Port Settings.

Refer to 2.1. Flashing One LED for how to select Port Settings.

LED×4 A0 A1 A2 A3

黒 灰

Make sure cables are inserted

correctly.

Sound sensor A4

Page 34: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

32

③ Open the Sensor Viewer to see the sound sensor value.

Refer to 4.4. Using Light Sensors for more information.

Notice how the sensor value changes as the volume of the sound varies.

④ As shown below, place LED and Condition icons in their corresponding

spaces. After placing the icons, set their attributes.

When it's quiet When the sensor detects sound Ex.

Sound sensor value

5

6

7

8

Page 35: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

33

⑤ Use Repeat icons to loop steps 1-8.

Refer to 2.3. Using Repeats for how to use Repeat icons.

⑥ Transfer the program and check to see if it works.

Select Repeat

indefinitely in the Repeat

Settings dialog.

Softer ← → Louder

The number of LED flashes will vary, depending on the loudness of the

sound detected by the sensor.

Page 36: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

34

4.6. Using Reflective Infrared Sensors

Create a program that uses the reflective infrared sensor to change the note the buzzer

plays.

① Connect a buzzer and a reflective infrared sensor to sensor/LED/buzzer

connectors on the Studuino board.

Connect the buzzer to A0 and the reflective infrared sensor to A1.

② Port Settings

Choose Buzzer for A0 and Reflective infrared sensor for A1 under Port Settings.

Refer to 2.1. Flashing One LED for how to select Port Settings..

Learning target: ●Reflective infrared sensors

Make sure cables are inserted

correctly.

Reflective infrared sensor

Buzzer A0

A1

Page 37: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

35

③ Open the Sensor Viewer to see the reflective infrared sensor value.

Refer to 4.4. Using Light Sensors for more information.

Notice how the sensor value changes as the distance between the object and the

reflective infrared sensor varies.

What is a reflective infrared sensor?

A reflective infrared sensor works by emitting invisible infrared rays. After hitting an

object, the rays are reflected back toward the source. The sensor detects the intensity of

the reflected rays. More reflective colors, such as white, cause the sensor value to

increase more easily. However, when an object is too close, the value gets smaller.

(The sensor will reach its maximum value when placed approximately 6

mm away from an object.)

Reflective infrared

sensor value

Ex.

Object is far from the sensor Object is near the sensor

赤外線フォトリフレクタ 赤外線フォトリフレクタ

Page 38: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

36

④ As shown below, place buzzer and Condition icons in their corresponding

spaces. After placing the icons, set their attributes.

5

6

7

8

Page 39: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

37

⑤ Use Repeat icons to loop steps 1-8.

Refer to 2.3. Using Repeats for how to use Repeat icons.

⑥ Transfer the program and check to see if it works.

Select Repeat

indefinitely in the

Repeat Settings

dialog.

Block is farther → Lower note

Block is closer → Higher note

Reflective infrared sensor

Buzzer

Page 40: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

38

4.7. Using Accelerometers

Learning target: Accelerometers

Make a program that uses the accelerometer to report the degree of tilt using light and

sound.

① Connect three LEDs, the sound sensor, and the accelerometer to the

sensor/LED/buzzer connectors on the Studuino board.

Connect LEDs to A0-A2, the buzzer to A3, and the accelerometer to A4-A5.

② Port Settings

Choose LED for A0-A2, Buzzer for A3, and Accelerometer for A4-A5 under Port

Settings.

Refer to 2.1. Flashing One LED for how to select Port Settings..

The accelerometer requires connectors

A4 and A5 because it has four wires.

A0 A1 A2

LED×3

A3 Buzzer

Make sure cables are inserted

correctly.

Accelerometer A4-A5

Page 41: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

39

③ Open the Sensor Viewer to see the accelerometer value.

Refer to 4.4. Using Light Sensors for more information.

As the accelerometer is moved in different angles, each value changes as shown

below.

What is an accelerometer?

An accelerometer works by detecting acceleration in the X, Y and Z axes. It calculates how

speed varies over different periods of time.

An accelerometer, even when in a fixed position, will never show a value of 0 because it

detects gravitational acceleration*. Objects are pulled toward the ground by Earth's gravity.

This force can be used to measure angles (tilt) relative to the ground.

★ Gravitational acceleration is the force exerted on an object by gravity.

X Y

Z

Page 42: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

40

④ As shown below, place icons in their corresponding spaces. After placing

the icons, set their attributes.

5

6

See below for

Submenu 1.

See below for

Submenu 2.

Page 43: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

41

⑤ Use Repeat icons to loop steps 1-6.

Refer to 2.3. Using Repeats for how to use Repeat icons.

⑥ Transfer the program and check to see if it works.

Assemble the LED, buzzer, and accelerometer blocks as shown below.

Select Repeat

indefinitely in the

Repeat Settings dialog.

LED A0

The left-hand LED will

blink when level.

LED A1 LED A2

Accelerometer

★Connect this way.

Buzzer

Middle LED blinks and

buzzer sounds when

tilted to the right.

Right-hand LED blinks

and buzzer sounds when

tilted to further.

Example

Page 44: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

42

5. Using DC Motors

5.1. Making the DC Motor Move

Learning target: DC motor settings

① Connect the DC motor to the DC motor connector on the Studuino board.

Use connector M1 for the DC motor.

② Port Settings

Check DC motor box M1.

Refer to 2.1. Flashing One LED for how to select Port Settings..

③ As shown below, place DC motor icons in the Operation icon boxes.

DC motor M1

Drag & Drop

Page 45: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

43

④ DC motor settings

Use Test mode to see how the DC motor actually moves while inputting the

settings.

★ Refer to 3.2. Making a Melody for more information about Test mode.

★ When checking the DC motor, connect the battery box to the Studuino board

and turn on the switch. The USB cable does not supply enough power to operate

the DC motors.

Page 46: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

44

5.2. Making a Twin-motor Car

Learning target: Motion icons

① Assemble the car as shown below.

(1) Attach wheels to the DC motors.

★ Make a symmetrical pair.

(2) Attach both DC motors to the bottom of the Studuino mount.

(3) Use blocks to make a rear wheel.

(4) Connect the DC motors and battery box to the Studuino board.

M1: Right DC motor

M2: Left DC motor

POWER: Battery box

(5) Secure the battery box to the Studuino mount. Complete

Page 47: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

45

② Port Settings

Check DC motor boxes M1 and M2.

Refer to 2.1. Flashing One LED for how to select Port Settings.

③ Use Test mode to see how the DC motor actually moves while inputting the settings.

★ Refer to 3.2. Making a Melody for more information about Test mode.

★ When checking the DC motor, connect the battery box to the Studuino board

and turn on the switch. The USB cable does not supply enough power to

operate the DC motors.

Forward

Both (right and left) motors rotate

forward

Backward

Both (right and left) motors rotate

in reverse

Left turn (F)

Only the right motor rotates

forward

Left turn (B)

Only the right motor rotates in

reverse

Right turn (F)

Only the left motor rotates

forward

Right turn (B)

Only the left motor rotates in

reverse

Rotate

The right and left motors turn in

opposite directions.

Motion icons

Page 48: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

46

④ Select and place Motion icons to create a program that makes your car reach a goal.

⑤ Transfer the program if your car moves as planned.

Pressing the Reset button will make the program start over from the beginning.

★ Your car may run differently depending on the type of floor and the strength of your

batteries.

Example: A program that makes the car travel to three specified locations in order.

Programming tips

Before transferring the program, use Test mode to verify the proper time, speed,

distance, and rotation angle for each Motion icon.

Example

RESET button

Page 49: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

47

5.3. DC Motor Calibration

Learning target: DC motor settings

Every DC motor is different and each one may rotate at different speeds. If you make a

car using two DC motors and it veers to the left or right when moving forward, you can fix

this issue by calibrating your DC motors.

Connect your DC motors to the Studuino.

①Connect your DC motors to the Studuino.

②Port Settings

Tick the box next to DC motor connectors M1 and M2 under Port Settings.

Refer to 2.1. Flashing One LED for how to select Port Settings.

③Select Edit from the menu, then select Motor Calibration from the pull down menu to open

the setting dialog box.

Make sure the Studuino board is properly connected to the PC via USB cable.

Click Click

Page 50: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

48

Click on Motor Calibration and you will see the dialog box below. The bottom

half of the window is used to calibrate your DC motors.

④ Click on the Rotate button and your motors will rotate.

⑤ Use the sliders to adjust the speed of your motors.

⑥ Click OK to close the dialog box.

Click

Your motors will rotate at maximum speed.

Use the slider to adjust the faster motor until both

motors are rotating at the same speed.

Adjust speed using the slider

Slow Fast

Click

Click

Click OK to apply settings.

Page 51: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

49

6. Using Servomotors

6.1. Servomotor Calibration

Learning target: Servomotor calibration

Due to individual differences in each servomotor, there may be several degrees of

deviation in their angles. This deviation needs to be adjusted through calibration.

① Adjusting the drive shaft angle of the servomotor

Before connecting the servomotor, check to see if the drive shaft is attached

correctly.

Default

Aligned

Misaligned

To prevent the inner gears from getting damaged, the block part is made to turn

freely when a large force is applied to the drive shaft.

Turn the block part by hand in the opposite direction until the drive shaft clicks into

the proper position.

Drive shaft

Body

From the default position, turn the block part of the drive shaft right and left. If there

is a large difference in how much each side turns, this means the block is slipping and

needs to be adjusted.

Cable

★ Do not turn the drive shaft block unless

absolutely necessary. This can damage the

servomotor.

★ If the deviation is nominal, use the

calibration settings in the software.

Page 52: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

50

② Connect the servomotor to the servomotor connector on the Studuino

board.

Use connector D9 for the servomotor

★ Connect the battery box.

③ Port Settings

Check Servomotor box D9.

Refer to 2.1. Flashing One LED for how to select Port Settings.

④ As shown below, place DC motor icons in the operation area.

Drag & Drop

灰 黒 黒

Make sure cables are inserted

correctly.

Page 53: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

51

⑤ Select Edit from the menu, then select Motor Calibration from the pull down menu to

open the setting dialog box.

Make sure the Studuino board is properly connected to the PC via USB cable.

When Motor Calibration is selected, all connected servomotors are set to 90

degrees. At this time, the Test mode window shown below will appear.

★ Connect the battery box to the board and turn on the power.

Click Click

The drive shaft and body

are at a 90 degree angle.

Page 54: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

52

⑥ If the block portion isn't properly aligned, try inputting values in the Motor

Calibration menu until you find a suitable angle.

★ If using a different servomotor for a connector, be sure to re-calibrate the servomotor.

After calibration, we recommend putting a sticker on the connector used for the

servomotor so it can be easily identified.

Adjustment needed

Page 55: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

53

6.2. Creating a Robotic Arm that Uses Three Servomotors

Learning target: Servomotors

① Calibrate three servomotors, following the steps in the previous section.

★ Use connectors D9, D10, and D11 for the servomotors.

② Assemble the robotic arm as show below.

Part 1 D9

Part 2 D10 ★Assemble the same as Part 1.

Part 3 D11

Complete

Complete

Complete

Page 56: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

54

Assembling the Arm

Part 1

Part 2

Part 3

(1) Assemble part 1-3 as shown.

(2) Mount the battery box on the mount as shown, and connect the cable to the POWER

pins. POWER

(3) Attach the arm as shown and connect each servomotor to the board.

灰 黒 黒

Make sure cables are inserted

correctly.

D9

D10

D11

Page 57: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

55

③ Port Settings

In the Port Settings dialog box, tick boxes D9, D10, and D11 in the servomotor area.

Also, tick boxes A0 through A3 in the Button area.

Refer to 2.1. Flashing One LED for how to select Port Settings..

④ Place icons and complete setting as shown below.

5

6

7

Select Repeat

indefinitely in the

Repeat Settings dialog.

Page 58: Studuino Icon Programming Environment GuideStuduino Icon Programming Environment Guide Ver 0.9.6 4/17/2014 This manual introduces the Studuino Software environment. As the Studuino

56

Transfer the program and check to see if it works.

A3: Arm bends to

the left

A0: Arm bends to

the right

A2: Arm opens

A1: Arm bends downward