background image

44301

TETRIX® PULSE™ Robotics Controller

Programming Guide

Summary of Contents for tetrix prime

Page 1: ...44301 TETRIX PULSE Robotics Controller Programming Guide...

Page 2: ...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 d...

Page 3: ...e 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...

Page 4: ...erience 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...

Page 5: ...ld 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 an...

Page 6: ...cations 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...

Page 7: ...PULSE Controller Technology Overview Getting Started 5...

Page 8: ...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...

Page 9: ...C 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...

Page 10: ...ce 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 t...

Page 11: ...are 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...

Page 12: ...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 Li...

Page 13: ...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 i...

Page 14: ...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...

Page 15: ...tor 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 a...

Page 16: ...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...

Page 17: ...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...

Page 18: ...blockly 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 F...

Page 19: ...n 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 F...

Page 20: ...t 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 Fi...

Page 21: ...djust the COM port to whichever port the PULSE controller is associated with Figure 16 When this step is complete your PULSE controller is connected to the TETRIX Ardublockly software and coding can b...

Page 22: ...you to open your sketch in the Arduino Software IDE Your program will be opened in syntax format You can edit the syntax code within Arduino Software IDE if desired This process will not be covered in...

Page 23: ...red LED Sets the state of the PULSE yellow LED Sets the state of the PULSE green LED Reads the state of the PULSE Start button Reads the battery pack voltage Waits for a specific time in milliseconds...

Page 24: ...hannels Sets the position of the selected servo to a position between 0 and 180 degrees Sets the positions of all six servo motor channels Reads the position of the selected servo and stores it in a v...

Page 25: ...and reconnecting it You can also try closing the software and opening it again Open your sketch in the Arduino IDE output window to see if you have coding errors Remember that you can use the resourc...

Page 26: ...x programming TETRIX Ardublockly uses visual programming also known as graphic programming Many times the best way to learn how to code is by following an example In the following activities you will...

Page 27: ...basic PULSE code All you need is the PULSE controller a power source and a USB connection to the computer Figure 22 Open the Program Let s start by looking at the first example sketch Open the sketch...

Page 28: ...ready to execute Press the green Start button to execute the code The red LED next to the Stop Reset button will blink off and on in one second intervals To stop the program press the Stop Reset butto...

Page 29: ...wait block determines how long the LED will be on and off Figure 26 This is a parameter you can change in your sketch Experiment with changing those values to create new blinking behaviors for the LED...

Page 30: ...light engineer electronic engineer STEM Connections Science Electricity LED lighting Technology Electronic design Traffic light programming Engineering Lighting types Optics Math Frequency Pattern Tip...

Page 31: ...sketch you want to reference later Let s start by looking at the example sketch Open the sketch by selecting Examples GS_Activity_2 A new sketch window will open titled GS_ Activity_2 Figure 30 Parts...

Page 32: ...ode is ready to execute When this has happened press the green Start button on the PULSE controller Observe the direction and duration of the motor rotation Did the motor s behavior match the intended...

Page 33: ...ity With the example as a reference try creating a new sketch using your DC motor and LEDs on the controller Remember what you learned from your first activity and come up with a creative way to inclu...

Page 34: ...nology DC motor use Torque Engineering Motor wiring Ground Math Revolutions per minute rpm Degrees Block Text Correlation Arduino Source Code include PULSE h PULSE pulse void setup pulse PulseBegin vo...

Page 35: ...If it starts at 120 it will move counterclockwise to 45 Figure 34 Open the Program Before you open your next example sketch be sure to save any sketch you want to reference later Let s start by lookin...

Page 36: ...the servo motor rotation Did the motor s behavior match the intended program Press the Stop Reset button when you are ready to stop the motor Further Investigate In this sketch you will use two new P...

Page 37: ...use while moving to the target position You can alter the position and speed of the servo by changing the values of both functions Practice changing the parameters in the sketch Observe the effect the...

Page 38: ...hnology Motor assembly Feedback system Engineering Energy conversion Motor gearing Math Accuracy Precision Block Text Correlation void setup pulse PulseBegin pulse setServoSpeed 1 25 void loop pulse s...

Page 39: ...ine Finder Sensor uses reflected infrared light to distinguish between light and dark surfaces Figure 37 Open the Program Before you open your next example sketch be sure to save any sketch you want t...

Page 40: ...pload the sketch to the PULSE remember to check your connections Keep in mind that you added a new connection in digital sensor port D2 with the Line Finder Sensor Upload the sketch The green LED will...

Page 41: ...s occurs when the line variable is set to LOW If the Line Finder Sensor detects a white or reflective surface it turns the yellow LED on In the program this occurs when the line variable is set to HIG...

Page 42: ...ransport goods Careers materials engineer electromechanical technician software developer STEM Connections Science Light Electromagnetic spectrum Technology Guidance system Automation Engineering Micr...

Page 43: ...y sending a sonic pulse burst and then waiting on its return as it is reflected off an object in range The reflected sonic pulse time period is measured to determine the distance to the object The sen...

Page 44: ...light up on the PULSE controller Execute the Code Before you can upload the sketch to the PULSE remember to check your connections Keep in mind that you added a new connection in digital sensor port...

Page 45: ...ey are detectable You can also program the motors to stop when an object reaches a certain distance from the Ultrasonic Sensor Try changing the distance units on the pulse Ultrasonic Sensor block from...

Page 46: ...t Correlation void setup pulse PulseBegin void loop if pulse readSonicSensorCM 3 10 pulse setRedLED LOW pulse setYellowLED HIGH else if pulse readSonicSensorCM 3 10 pulse setRedLED HIGH pulse setYello...

Page 47: ...have worked hard to learn the basics and now it is time to apply them to an actual robot The next 10 activities will walk you through building moving navigating and adding sensors to a robot and more...

Page 48: ...Note In order to complete the build shown in this book you must have the TETRIX PRIME Programmable Set Programmable Robotics Set 46 Building and Coding the PULSE CodeeBot...

Page 49: ...4 40215 TETRIX PRIME Beam Straight Connector 4 External Connectors Part No Part Name Quantity 40208 TETRIX PRIME 90 Degree Beam Bracket 10 40209 TETRIX PRIME 60 Degree Beam Bracket 10 40210 TETRIX PRI...

Page 50: ...he larger holes see right 15 Hole Square Beam 40207 13 Hole Square Beam 40206 8 Hole Square Beam 40205 7 Hole Square Beam 40204 6 Hole Square Beam 40203 5 Hole Square Beam 40202 4 Hole Square Beam 402...

Page 51: ...ents 3 Way Beam Connector 40212 Tee Beam Connector 40213 Beam End Connector 40214 Beam Extension Connector 40322 Beam Straight Connector 40215 90 Degree Beam Connector 40211 Building and Coding the PU...

Page 52: ...ross Block Connector 40217 Beam Attachment Hub 40228 TIP These two parts the straight block beam connector and the 90 degree cross block connector are very close in appearance and can be easily confus...

Page 53: ...Wheel with Tire 40222 80 Tooth Plastic Gear 40224 40 Tooth Plastic Gear 40223 Battery Mount Bracket 40236 80 mm Steel Axle 40225 40 mm Steel Axle 40226 D Shaft Set Collar 40229 Measure 80 mm and 40 m...

Page 54: ...0538 TETRIX PRIME DC Motor 44298 Shaft Servo Hub 40230 Servo Mounting Bracket 40232 Gripper Kit 40234 4 in 1 Screwdriver 36404 Plastic 2 oz Cups 41769 Practice Golf Balls 14041 Miniature Ball Point He...

Page 55: ...Battery Pack 40235 5 Cell NiMH Battery Pack Charger 40378 Control Elements TETRIX PULSE Robotics Controller 44268 Ultrasonic Sensor Pack 43055 Line Finder Sensor Pack 43056 3 Foot Type A B USB Cable 4...

Page 56: ...n the illustrations The other standard servo will be used for the gripper assembly Standard servo motors are used for proportional rotation and for grippers steering and positioning Servo Mounting Bra...

Page 57: ...r neutral position The servo motor will move to its neutral position Line up the splines on the hub with the splines on the servo and press the two parts together The set screw should line up as close...

Page 58: ...d cap screws installed and the directions call for that operation you can skip to the next step TIP Directions will show these types of parts in proper position After the parts are in place don t forg...

Page 59: ...the following steps Instructions on assembly of TETRIX PRIME parts can also be found at TETRIXrobotics com Gripper Assembly The gripper kit is included with the TETRIX PRIME Programmable Robotics Set...

Page 60: ...Step 5 Step 6 Step 7 Step 8 Step 3 Step 4 Servo Horn Screw 58 Building and Coding the PULSE CodeeBot...

Page 61: ...Step 9 Step 10 Step 12 Step 14 Step 11 Step 13 Building and Coding the PULSE CodeeBot 59...

Page 62: ...Step 18 Step 17 Finished Assembly Step 16 Step 15 60 Building and Coding the PULSE CodeeBot...

Page 63: ...Construction Tips Connectors fit inside beams and come in 3 way tee 90 degree end extension and straight beam block connector designs Building and Coding the PULSE CodeeBot 61...

Page 64: ...k option for securing connectors Press the rivet in place on the beam and use the peg to spread the rivet to secure the connection Using rivets on two sides of the connection will make it more stable...

Page 65: ...ors TIP Wing nuts are placed in position first and thumbscrews are tightened into them After wing nuts are placed and seated properly they cannot be turned TIP Thumbscrews should be snug but not overt...

Page 66: ...for a tee connection 60 degree connection or 90 degree connection Brackets should be used in pairs with two brackets on opposite sides of a beam Brackets are secured using quick rivets and pegs or th...

Page 67: ...Beam end connectors straight block beam connectors and 90 degree cross block connectors are secured using a thumbscrew through the beam and into the connector Building and Coding the PULSE CodeeBot 65...

Page 68: ...After the thumbscrew is used to secure the end of the connector a quick rivet and peg or a thumbscrew and wing nut are used to secure the intersecting beam 66 Building and Coding the PULSE CodeeBot...

Page 69: ...should be supported at two points Place a bronze bushing on opposite sides of a beam and place the axle through the bushings Secure the axle to a D shaft set collar wheel gear or hub Building and Cod...

Page 70: ...allation or the plastic mount might be damaged Line Finder Sensor Pack Assembly The screws in this pack will self thread into the plastic mounts The 4 in 1 screwdriver that comes as part of the TETRIX...

Page 71: ...t in later activities You can complete this build even if you have little to no experience with metal based building systems Building Time Expectations 30 minutes Real World Link In manufacturing and...

Page 72: ...tor 40217 2x 40 mm Steel Axle 40226 4x 8 mm x 6 mm Bronze Bushing 40227 11x Thumbscrew 40323 2x TETRIX DC Motor 44298 with Servo Mounting Bracket 40232 Assembly instructions on pages 54 55 Tip See pag...

Page 73: ...Step 1 0 Step 1 1 Build two like this Building and Coding the PULSE CodeeBot 71...

Page 74: ...Step 1 2 Step 1 3 72 Building and Coding the PULSE CodeeBot...

Page 75: ...Step 1 4 Building and Coding the PULSE CodeeBot 73...

Page 76: ...tor 40216 2x 90 Degree Cross Block Connector 40217 1x Wing Nut 40221 2x 40 mm Steel Axle 40226 2x 8 mm x 6 mm Bronze Bushing 40227 1x D Shaft Set Collar 40229 2x Beam Attachment Hub 40228 2x Battery M...

Page 77: ...Partial assembly should look like this Step 2 0 Step 2 1 Building and Coding the PULSE CodeeBot 75...

Page 78: ...Step 2 2 Step 2 3 76 Building and Coding the PULSE CodeeBot...

Page 79: ...Step 2 4 Step 2 5 Building and Coding the PULSE CodeeBot 77...

Page 80: ...Step 2 6 Step 2 7 78 Building and Coding the PULSE CodeeBot...

Page 81: ...Step 2 8 Building and Coding the PULSE CodeeBot 79...

Page 82: ...Step 3 Parts Needed 2x Wheel with Tire 40222 1x TETRIX PULSE Controller 44268 3x Thumbscrew 40323 Partial assembly should look like this 80 Building and Coding the PULSE CodeeBot...

Page 83: ...Step 3 0 Step 3 1 Building and Coding the PULSE CodeeBot 81...

Page 84: ...Step 3 2 82 Building and Coding the PULSE CodeeBot...

Page 85: ...Step 3 3 Building and Coding the PULSE CodeeBot 83...

Page 86: ...assembly should look like this Parts Needed 2x Socket Head Cap Screw 40516 1x 6 V NiMH Battery Pack 40235 1x Line Finder Sensor Pack 43056 1x Ultrasonic Sensor Pack 43055 84 Building and Coding the P...

Page 87: ...Step 4 0 Step 4 1 Building and Coding the PULSE CodeeBot 85...

Page 88: ...Step 4 2 86 Building and Coding the PULSE CodeeBot...

Page 89: ...Finished assembly should look like this Building and Coding the PULSE CodeeBot 87...

Page 90: ...ork together in unison Being able to use two motors together in unison is a fundamental requirement for mobile robots Figure 45 Teacher Note Other factors can affect building time including matters su...

Page 91: ...s you to invert the rotational direction of a motor When two motors are mounted on opposite sides this block enables you to give a single direction command to both motors and have them work together T...

Page 92: ...ould affect the distance traveled in the same time frame With that in mind create a challenge by marking a specified distance on the floor Using the data you have collected program the Codee Bot to ge...

Page 93: ...000 pulse PulseEnd Real World Link Trains are machines that can go only forward or backward with the motors they use The motors are powered by thrust in either a forward or backward direction A train...

Page 94: ...ble to expand on that and make turns This activity will have your PULSE Codee Bot driving in circles by using different motor powers as the motors work in unison Open the Program Let s start by lookin...

Page 95: ...eeds in a single function One motor is set to 100 while the other is set to 50 resulting in a circular motion Extension Activity With the example as a reference try creating a new sketch to move the C...

Page 96: ...1 void loop pulse setMotorPowers 100 50 Note Motor 1 is turning at twice the power of Motor 2 Arduino Source Code include PULSE h PULSE pulse void setup pulse PulseBegin pulse setMotorInvert 1 1 void...

Page 97: ...lity to make 90 degree turns The ability to make 90 degree turns will be used to make the Codee Bot drive in a square Open the Program Let s start by looking at the example sketch Open the sketch by s...

Page 98: ...re An important thing to understand about this program is that you are using dead reckoning to program the robot s square driving path Dead reckoning is simply using time as the basis for controlling...

Page 99: ...Drive forward Brake Turn 3 Brake Drive forward Brake Figure 52 Tip Adjust the timing of the turns if the robot doesn t turn at right angles For example you can change the time from 1650 to 1300 The c...

Page 100: ...simple maze using dead reckoning Real World Link Some transportation vehicles take the same route time after time If a vehicle is in a warehouse it could transport items to three different locations...

Page 101: ...e PulseBegin pulse setMotorInvert 1 1 void loop pulse setMotorPowers 50 50 delay 3000 pulse setMotorPowers 0 0 delay 1000 pulse setMotorPowers 50 50 delay 1650 pulse setMotorPowers 0 0 delay 1000 puls...

Page 102: ...t activity you will use a more efficient way to code the same behavior Open the Program Let s start by looking at the example sketch Open the sketch by selecting Examples Activity_10 A new sketch wind...

Page 103: ...ketch The repeat do block is used to repeat a block of code contained within it An increment counter is used to count the number of times the code is executed before the loop is terminated The repeat...

Page 104: ...ply the coding knowledge you have learned in new and exciting ways Real World Link Robots are used to place items into packages in manufacturing They have to repeat this process over and over again Th...

Page 105: ...once Note This is the condition that is tested in each loop Note The increment is executed and then the condition is tested again Arduino Source Code include PULSE h PULSE pulse void setup pulse Pulse...

Page 106: ...o stop based on the environment around it In this activity the Codee Bot will drive forward and stop at a line Open the Program Let s start by looking at the example sketch Open the sketch by selectin...

Page 107: ...ile loop block which is a new program structure In this sketch if do blocks are looking at the condition of the Line Finder Sensor The first if do block tells the Codee Bot to move at 35 power when it...

Page 108: ...ck line and stop Remember what you have learned from your previous activities Challenge yourself to create different behaviors for when the Codee Bot meets a line such as backing up or turning a diffe...

Page 109: ...otors if the reading is 0 Note This if loop stops the motors if the reading is 1 Note This while loop blinks the LED off and on while the reading is 1 Arduino Source Code include PULSE h PULSE pulse v...

Page 110: ...to create a new behavior This will enable the PULSE Codee Bot to follow a line Open the Program Let s start by looking at the example sketch Open the sketch by selecting Examples Activity_12 A new sk...

Page 111: ...Finder Sensor slightly to the side of a line to follow Press the green Start button to execute the sketch Observe the behavior of the robot Press the red Stop Reset button to end the sketch Based on t...

Page 112: ...ne while producing visual cues in the form of the blinking red LED Extension Activity With the example as a reference try creating a new sketch to have the Codee Bot follow a black line Remember what...

Page 113: ...will turn and the other wheel will brake depending on the readings from the Line Finder Sensor Arduino Source Code include PULSE h PULSE pulse void setup pulse PulseBegin pulse setMotorInvert 1 1 voi...

Page 114: ...trasonic Sensor This will enable the PULSE Codee Bot to drive toward a wall and stop a specified distance away Open the Program Let s start by looking at the example sketch Open the sketch by selectin...

Page 115: ...if this condition is false do this instead In this sketch the first part of the if else block tests the condition of the Ultrasonic Sensor and if the sensor is more than 25 cm away from an object it...

Page 116: ...orld Link Small vacuum robots that clean the floors of homes use sensors to detect if there are obstacles in their path If the little robot encounters a couch it is programmed to back up and turn to a...

Page 117: ...rPowers 0 0 Note The bot will drive forward until it encounters an obstacle 25 cm away and then it will brake Arduino Source Code include PULSE h PULSE pulse void setup pulse PulseBegin pulse setMotor...

Page 118: ...eter detection range Cardboard boxes work well for this purpose You do not want anything too heavy that could cause damage to your robot just in case your robot crashes into it Activity 14 Avoiding Ob...

Page 119: ...llenge yourself and experiment with different objects or make an obstacle course with multiple objects to detect You can experiment and modify the example code as needed to change the reaction and beh...

Page 120: ...e void setup pulse PulseBegin pulse setMotorInvert 1 1 void loop if pulse readSonicSensorCM 3 25 pulse setMotorPowers 35 35 pulse setRedLED LOW pulse setGreenLED HIGH else pulse setGreenLED LOW pulse...

Page 121: ...If an obstacle is detected then the Codee Bot will stop raise its beam arm and wait for the obstacle to be moved before continuing Open the Program Let s start by looking at the example sketch Open th...

Page 122: ...l for this purpose You do not want anything too heavy that could cause damage to your robot just in case your robot crashes into it Press the green Start button to execute the sketch Observe the behav...

Page 123: ...e obstacle to be cleared Real World Link Many different sensors are used in the medical field Some examples include those that determine your temperature heart rate breathing rate and heartbeat patter...

Page 124: ...setMotorInvert 1 1 pulse setServoSpeed 1 50 void loop if pulse readLineSensor 2 1 pulse setMotorPowers 30 0 pulse setRedLED HIGH else pulse setMotorPowers 0 30 pulse setRedLED LOW while pulse readSon...

Page 125: ...s guide through the text based Arduino Software IDE Re create the block based programs in actual text code Make modifications and attempt the extension activities using this code This can vastly exten...

Page 126: ...Activity 1 Hello World 20 minutes Activity 2 Moving Your DC Motors 20 minutes Activity 3 Moving Your Servo Motors 20 minutes Activity 4 Using the Line Finder Sensor 30 minutes Activity 5 Introduction...

Page 127: ...D SL 6 4 RST 6 8 3 RST 6 8 4 Math Practice MP1 MP2 Grades 6 8 1 F 1 G 1 H 2 M 2 N 2 O 2 V 3 D 3 E 3 F Grades 6 8 2 A 2 1 2 A 7 2 2 A 7 3 Grade 7 SL 7 1 SL 7 1 A SL 7 1 B SL 7 1 C SL 7 1 D SL 7 4 RST 6...

Page 128: ...will execute a set of instructions for loop a set of instructions that repeats a set number of times function a procedure within a computer program HIGH typically the on value of a switch or sensor i...

Page 129: ...ted syntax the precise way computer code is written to be understood by the computer or microprocessor TETRIX Ardublockly a plug in interface that enables code to be written using graphic blocks rathe...

Page 130: ...Getting Started Extension Activities GS Activity 1 extension GS Activity 2 extension GS Activity 3 extension 128 Appendix...

Page 131: ...GS Activity 4 extension GS Activity 5 extension Appendix 129...

Page 132: ...machine operator machinery maintenance worker machinist manufacturing engineer manufacturing technician mapping technician materials development engineer materials engineer measurement lab technician...

Page 133: ...6 volts DC 6 A max Servo control modes Set servo speed 0 to 100 Set servo position 0 180 degrees Battery voltage monitoring 0 7 5 volts range 3 digital sensor ports D2 D4 Each can be configured as di...

Page 134: ...3 SDA I2C serial data ADC4 input channel A4 digital I O 18 Pin 4 SCL I2C serial clock ADC5 input channel A5 digital I O 19 Table 2 Analog Sensor Port A1 Pin Function Arduino Software IDE pin assignmen...

Page 135: ...t Pin 1 Ground N A Pin 2 5 volts 100 mA N A Pin 3 Digital input output Digital I O 10 Pin 4 Digital input output Digital I O 3 Table 7 Digital Sensor Port D4 Pin Function Arduino Software IDE pin assi...

Page 136: ...HIGH or LOW setGreenLED HIGH or setGreenLED 1 Turn green LED on setGreenLED LOW or setGreenLED 0 Turn green LED off Set DC Motor Power Sets the power level and direction of a TETRIX DC Motor connecte...

Page 137: ...egrees per second DPS The encoder count target position is a signed long integer from 2 147 483 648 to 2 147 483 647 Each encoder count 1 4 degree resolution setMotorTargets speed1 target1 speed2 targ...

Page 138: ...he encoder target Set Motor Direction Invert Inverts the forward reverse direction mapping of a DC motor channel This function is intended to harmonize the forward and reverse directions for motors on...

Page 139: ...o implement PID control of a TETRIX DC Motor connected to the motor ports The PULSE controller counts the number of pulses produced over a set time period to accurately control velocity and position T...

Page 140: ...nsor can be connected to any digital port D2 D4 or analog ports A1 A3 configured as digital input Read Ultrasonic Sensor in Inches Reads the distance in inches of an object placed in front of the Ultr...

Page 141: ...operating a servo motor at the extreme ranges Listen closely if a servo is buzzing it is pressing against its mechanical stop which might damage the motor If this happens limit the range to values sl...

Page 142: ...to PULSE servo ports 1 6 The value returned will be 0 180 readServoPosition servo Data Type servo integer Data Range servo 1 to 6 Data Type Returned value integer 0 to 180 readServoPosition 1 Read the...

Page 143: ...etMotorTargets speed1 target1 speed2 target2 setMotorDegree motor speed degrees setMotorDegrees speed1 degrees1 speed2 degrees2 setMotorInvert motor invert readMotorBusy motor readEncoderCount enc rea...

Page 144: ...142 Notes...

Page 145: ......

Page 146: ...Call Toll Free 800 835 0686 Visit Us Online at TETRIXrobotics com TETRIX PULSE Robotics Controller Programming Guide...

Reviews: