pitsco TETRIX PULSE Operating instructions

44301
TETRIX® PULSE™ Robotics Controller
Programming Guide

Content advising by Tammy Pankey, Paul Uttley, and Tim Lankford.
Build creation and SolidWorks® Composer™ and KeyShot® renderings by Tim Lankford, Brian Eckelberry, and Jason Redd.
Desktop publishing by Todd McGeorge.
©2017 Pitsco, Inc., 915 E. Jefferson, Pittsburg, KS 66762
All rights reserved. This product and related documentation are protected by copyright and are distributed under licenses
restricting their use, copying, and distribution. No part of this product or related documentation may be reproduced in any
form by any means without prior written authorization of Pitsco, Inc.
All other product names mentioned herein might be the trademarks of their respective owners.
Check TETRIXrobotics.com for PDF updates of this guide.
V1.0
8/17

Table of Contents
Preface......................................................................................................................................................................................................................2
TETRIX® PULSE™ Robotics Controller Introduction.................................................................................3
PULSE Controller Technology Overview..............................................................................................................4-6
PULSE Setup.................................................................................................................................................................................................7-8
Software Overview.................................................................................................................................................................................9
Software Setup....................................................................................................................................................................................10-23
Getting Started Activities...........................................................................................................................................................24
Activity 1: Hello World!.................................................................................................................................................................... 25-28
Activity 2: Moving Your DC Motors............................................................................................................................................ 29-32
Activity 3: Moving Your Servo Motors...................................................................................................................................... 33-36
Activity 4: Introduction to the Line Finder Sensor.............................................................................................................. 37-40
Activity 5: Introduction to the Ultrasonic Sensor ................................................................................................................ 41-44
Building and Coding the PULSE Codee Bot.......................................................................................................45
Hardware Overview ......................................................................................................................................................................... 46-68
Activity 6: Build the PULSE Codee Bot ..................................................................................................................................... 69-87
Activity 7: Drive Forward................................................................................................................................................................ 88-91
Activity 8: Drive in a Circle............................................................................................................................................................. 92-94
Activity 9: Drive in a Square.......................................................................................................................................................... 95-99
Activity 10: Simplify the Square............................................................................................................................................. 100-103
Activity 11: Drive to a Line and Stop.................................................................................................................................... 104-107
Activity 12: Follow a Line .......................................................................................................................................................... 108-111
Activity 13: Drive Toward a Wall and Stop......................................................................................................................... 112-115
Activity 14: Avoiding Obstacles ............................................................................................................................................. 116-118
Activity 15: Combining the Sensors..................................................................................................................................... 119-122
Build, Code, Test, Learn . . . Go! ........................................................................................................................................................ 123
Appendix
Scope and Sequence........................................................................................................................................................................... 124
Standards Addressed .......................................................................................................................................................................... 125
Glossary............................................................................................................................................................................................ 126-127
Getting Started Extension Activities.................................................................................................................................... 128-129
Careers Complete Listing................................................................................................................................................................... 130
TETRIX PULSE Robotics Controller Technical Specifications............................................................................................... 131
TETRIX PULSE Controller Sensor Port Pinout Diagrams............................................................................................... 132-133
TETRIX PULSE Arduino Library Functions Chart ............................................................................................................. 134-140
TETRIX PULSE Arduino Library Functions Cheat Sheet......................................................................................................... 141
Notes .......................................................................................................................................................................................................... 142

Preface
This programming guide has been developed to provide students with positive experiences in robotics engineering and
programming. With the assistance of this guide, students will learn to use the TETRIX® PRIME parts to construct different
robots while learning about programming with the PULSE controller. After using this guide, students should be able to use
the TETRIX PRIME parts to construct a robot of their own design.
Grade Level Appropriateness
The activities used in this guide are targeted toward middle school students. With some additional instruction, upper-
elementary students should be able to successfully complete the activities. Additionally, secondary teachers could use
these parts to provide an exploratory experience in engineering.
Using This Guide
The activities in this guide build upon each other. The activities should be completed in the order in which they are
presented. Concepts explored in one activity might not be repeated in later activities, but students could be required to
understand the concepts in order to be most successful.
Safety Information
Mechanical
• Keep fingers, hair, and loose articles of clothing clear of gears and moving parts.
• Never pick up the robot while it is moving or the servo motors are running.
Electrical
• Make sure the power is turned off when the robot is not in operation.
• Do not operate the robot in a wet environment.
• Always power down the robot before making any changes.
• Use caution when working with bare wires to avoid creating a short circuit situation.
• Route wires carefully, and secure them if necessary to avoid damage to the wire or its insulation.
• Mount the battery pack securely.
2Getting Started

Welcome to Coding with PULSE™
and Building with TETRIX PRIME!
My name is Codee!
I’ll follow your every
command.
PULSE Controller Introduction
Pitsco Education is pleased to bring you the TETRIX® PULSE™ Robotics Controller Programming Guide – an exciting and
progressive series of activities that teaches the essentials of learning to program your TETRIX PRIME creations using the
PULSE controller and the graphic-based TETRIX Ardublockly software.
This programming guide offers a valuable tool for teaching students and teachers how to use the PULSE controller (the
brain) and the TETRIX PRIME system to build and code smart, precise robots that are as real world as it gets. The guide
comes with five getting started activities, step-by-step building instructions for creating a Codee Bot, 10 complete Codee
Bot-oriented lessons, and extension activities. This is a great tool for exploring the functionality of the PULSE controller,
TETRIX hardware components, and software. Your students are offered a great foundation to build on.
By combining the plug-and-play PULSE controller with the intuitive PRIME building system and an easy-to-use, graphic-
based software environment, this solution offers a great entry into teaching and learning through robotics. The progressive
nature of the activities enables robotic creations to come to life quickly and easily, meaning students can experience instant
success and focus more classroom time on problem solving and applying their STEM knowledge.
Plus, PULSE is not just a great tool for teaching programming. It can bring to life lessons on sensors, power, gear ratios, and
more. Even the controller’s clear polycarbonate shield was designed to maximize educational value – letting users see the
inner architecture of the controller.
We have also included some STEM connections (concepts beyond the scope of this guide) that can be covered in each
lesson if you choose to do so. These connections can be incorporated if you have content knowledge of these concepts or if
you can work with other teachers to integrate these concepts.
We hope this guide offers a great jumping-off point to learning with PULSE. We cannot wait to see the innovative projects
and robotic creations that result.
Getting Started 3

PULSE Controller Technology Overview
PULSE Robotics Controller:
A programmable device that is the brain of the TETRIX PRIME robot
Tip: For complete, detailed specifications, please refer to the TETRIX PULSE
Robotics Controller Specifications located in the appendix on page 131.
6 standard control servo ports
2 quadrature
encoder input ports
Battery connection port
2 DC motor control ports
Power
switch
Start
button
Stop/Reset
button
USB
programming
port
i2C port
3 digital
sensor ports
3 analog
sensor ports
4Getting Started

PULSE Controller Technology Overview
Getting Started 5

Ultrasonic Sensor:
Enables a robot to measure
distance to an object and
respond to movement
DC Motor:
Allows for speed and
torque
Standard Servo Motor:
Allows for exact
positioning within a
180-degree range of
motion
Line Finder Sensor:
Enables a robot to follow
a black line on a white
background or vice versa
Sensor:
A device that detects surrounding environmental factors for the controller
Motor:
A machine that produces motion or power for completing work
6Getting Started

Attaching the Sensors:
To connect a sensor to the PULSE, plug the
end of the sensor wire into ports labeled
D2-D4 for digital sensors, A1-A3 for analog
sensors, or I2C for I2C components.
Attaching the DC Motors:
To connect a DC motor to the PULSE, plug
the end of the DC motor wire into one of
the two DC motor ports.
Important: The black wire end must be
closest to the minus sign on the controller.
Attaching the Servo Motors:
To connect a standard servo motor to the
PULSE, plug the end of the servo motor wire
into one of the servo ports
Important: The black wire end must be
closest to the minus sign on the controller.
PULSE Setup
Getting Started 7

Warning: Do not attempt to use third-party battery packs with the PULSE
controller. The TETRIX battery packs are equipped with a safety fuse and are
the only packs approved for use with the system. Damage to the product as a
result of doing so will void your warranty.
Downloading and Uploading:
The PULSE USB port is used for
communication between PULSE and a
Windows or Macintosh device.
The port enables users to download and
upload data from the computer to the PULSE
controller.
To upload a program to the PULSE, plug one
end of the USB cable into the controller’s USB
port and plug the other end into a USB port
on your device.
Attaching the Battery to the PULSE:
The PULSE controller is powered by a
TETRIX 6-Volt Rechargeable NiMH Battery
Pack.
To connect the battery pack to the PULSE,
plug the end of the battery wire into the
battery port located on the controller.
Important: The black wire end must be
closest to the minus sign on the controller.
8Getting Started

Software Overview
• The TETRIX Ardublockly software is a special programming interface created
by Pitsco for exclusive use with the PULSE controller. The TETRIX Ardublockly
software was developed using the Google interface called Blockly.
• It can be used on a variety of Windows and Macintosh devices. The software
is placed on the hard drive of a device. The device used must have a USB
port for connection to the PULSE controller. It is not supported on tablets or
Chromebooks.
• The Arduino Software (IDE) will be used to communicate with the PULSE in the
background. You don’t need to open the Arduino Software (IDE) to create your
programs. It only needs to be installed on the computer. The PULSE controller
can be programmed through the Arduino Software (IDE), but for this guide, all
programming will occur within the TETRIX Ardublockly software.
• Within the TETRIX Ardublockly software, a program is referred to as a sketch.
Each of the activities in this guide will involve creating a sketch that gives
instructions to the robot.
• For the purposes of this guide, we will focus on the basics of using the
TETRIX Ardublockly software as it applies to the PULSE controller. Working
through examples and hands-on application of code using a small Codee Bot
constructed with the TETRIX PRIME robotics building system will show you
how easy it is to use TETRIX Ardublockly with PULSE.
Note: This is not meant to be
a tutorial on programming
with the Arduino C-based
language. There are
many excellent resources
available on the web to
learn more about advanced
programming skills. If you are
interested in such resources,
a good place to start would
be the Arduino website at
www.arduino.cc.
Getting Started 9

Arduino Software (IDE) Setup
The first thing we need to do is install the Arduino Software (IDE). The software can
be found at the Arduino website (www.arduino.cc) for Windows and Macintosh
operating systems. From the Arduino homepage, click the Software tab. On the
Software page, select the download for your operating system and follow any
additional instructions.
Installing the PULSE Controller Library
Adding custom libraries can expand the usability of the Arduino Software (IDE).
Libraries are collections of code that make it easier to create a program, or, as
Arduino calls it, a sketch. After you have successfully installed the Arduino Software
(IDE), you must add the Arduino PULSE controller library. The PULSE controller
library contains special programs written for the TETRIX PULSE controller.
The PULSE library is distributed as a .zip file: TETRIX_PULSE.zip. The first step is to
download the PULSE library from the TETRIX website. We can find the library at
www.TETRIXrobotics.com/PULSEdownloads.
After the library has been downloaded, there are two ways to install the PULSE
library into the Arduino Software (IDE).
Importing a .zip Library
One way is to import it using the Arduino Software (IDE) Add .ZIP Library menu
option.
In the Arduino Software (IDE), navigate to Sketch > Include Library. From the drop-
down menu, select Add .ZIP Library (Figure 1).
Figure 1
Note: All instructions
and screen shots used
throughout this guide are
based on the 1.8.2 version of
the Arduino Software (IDE).
Instructions and views might
slightly vary based on the
platform and version you are
using.
Teacher note:
• Depending on your
classroom and IT situation,
you might want to
download and install the
Arduino Software (IDE) and
the TETRIX PULSE Arduino
Library on the computers
you and your students will
be using.
• It is recommended that
you organize the class
into teams of two. It is
recommended that you
go through each process
before students do. This
will enable you to have a
good understanding of
what student questions
might arise and how to
answer those questions.
Tip: Figures within this
section show typical
installation within Windows.
The look and file locations
within the Mac operating
system might vary.
10 Getting Started

You will be prompted to select the library you would like to add. Navigate to the
location where you saved the TETRIX_PULSE.zip library file, select it, and open it
(Figure 2).
Return to the Sketch > Include Library menu. You should now see the library at
the bottom of the drop-down menu. It is ready to be used in our sketches; however,
example sketches for the library will not appear in the File > Examples menu until
after the Arduino Software (IDE) has been restarted.
Manual Installation
To install the PULSE library manually, first close the Arduino Software (IDE)
application. Then, extract the .zip file TETRIX_PULSE.zip containing the library. After
the folder is extracted, drag or copy the TETRIX_PULSE folder into the Arduino
libraries folder.
For Windows users, it will likely be called Documents\Arduino\libraries.
For Mac users, it will likely be called Documents/Arduino/libraries.
Restart the Arduino Software (IDE). Make sure the TETRIX_PULSE library appears in
the Sketch > Include Library menu of the software.
In addition, several PULSE sketch examples will now appear in the File >
Examples > TETRIX_PULSE drop-down menu.
That’s it! We have successfully installed the PULSE Arduino library.
Figure 2
Getting Started 11

Configuring USB Communication
PULSE and the Arduino Software (IDE) will communicate with each other through
the computer’s USB port.
Therefore, before we can begin programming, we first need to be sure that the
PULSE controller is properly set up in the Arduino Software (IDE) for communication
over the USB port.
The easiest way to do this is to first start the Arduino Software (IDE) and navigate to
Tools > Board and select Arduino/Genuino Uno (Figure 3). The PULSE controller
uses the same processor chip as a genuine Arduino UNO, so this is the board you
will select.
Figure 3
12 Getting Started

Next, without the PULSE connected, navigate to Tools > Port and check the
current connections. If there are no current connections detected, the word Port will
be grayed out. If there are connections detected, take note of the COM ports that
are listed.
Next, plug the PULSE controller into a USB port and power it up by connecting the
TETRIX battery pack and turning the power switch on.
With power applied, the blue power indicator LED will be lit. Be sure to give the
PULSE controller time to complete the first-time connect installation. This could
take 5-10 seconds. After the PULSE has been connected and installed, it will be
assigned a COM port by the computer system.
Navigate to Tools > Port and select the newly installed COM port. The new COM
port will be the PULSE. By selecting the new COM port, you are telling the Arduino
Software (IDE) to use this port for communications. The COM port you use could be
different from the one in Figure 4.
Figure 4: Port drop-down menu with PULSE not connected.
Please note that lists might vary.
Getting Started 13

The new port that appears in this example is COM1. Select the new port item to
tell the Arduino Software (IDE) to use this port for communications. Your port will
likely be different, and that is OK. When the communications port has been set up,
communications with the PULSE controller have been enabled.
When this step is complete, our computer system will automatically default to
this selected port each time we plug in our PULSE controller and start the Arduino
Software (IDE).
Note: Other devices
connected to the computer,
such as a cell phone, might
show up as a COM port
as well. You might have to
go back into the Arduino
Software (IDE) if you have
another device connected at
the same time to ensure the
right COM port is selected.
Tip: Each PULSE unit will
use a different COM port
on the same computer.
For each new PULSE that
is connected, follow the
steps for numbering
controllers and matching
to the computer as detailed
above. You can number
each PULSE controller and
assign it to a corresponding
computer. This will facilitate
the computer selecting the
correct port for PULSE each
time it is connected and
powered up.
14 Getting Started

Figure 5
TETRIX Ardublockly Software Setup
The TETRIX Ardublockly software is distributed as a .zip file: TETRIX_Ardublockly.
zip. There is a version for the Windows operating system and a version for the Mac
operating system. The first step is to download the appropriate version for your
device from the TETRIX website. You can find the library at www.TETRIXrobotics.
com/PULSEdownloads.
Place the downloaded file on the hard drive of your machine. Choose to extract the
zipped folder (Figure 5).
Locate the ardublockly_run file (Figure 6).
Create a shortcut and place it on your desktop (Figure 7). Do not delete the
extracted folder. It must remain on your machine to run the software.
Note: This software will not
work on a 32-bit Windows
machine.
Figure 6
Figure 7
Getting Started 15

You will see the TETRIX Ardublockly icon show up on your desktop while it’s loading
the software (Figure 8).
When the software is loaded, you should see this screen (Figure 9).
Navigate to Edit > Preferences (Figure 10).
Figure 8
Figure 9
Figure 10
16 Getting Started

You will need to adjust the settings in the software. Make sure the compiler location
links to where the Arduino Software (IDE) is located on your device (Figure 11).
Click below Compiler Location.
Choose your operating system folder (Figure 12).
Figure 11
Figure 12
Getting Started 17

Find the Arduino program files. Select the Arduino application (Figure 13).
Click below Sketch Folder. Choose which location the sketch folder will save to. You
can save to your Documents folder or another location on your device (Figure 14).
Figure 13
Figure 14
18 Getting Started
This manual suits for next models
1
Table of contents
Other pitsco Robotics manuals