The Beginners Guide to ROBOTC. Volume 2, 3 rd Edition Written by George Gillard Published: 18-July-2016

Size: px
Start display at page:

Download "The Beginners Guide to ROBOTC. Volume 2, 3 rd Edition Written by George Gillard Published: 18-July-2016"

Transcription

1 The Beginners Guide to ROBOTC Volume 2, 3 rd Edition Written by George Gillard Published: 18-July-2016

2 Introduction ROBOTC is an application used for programming robots. There are many different versions of ROBOTC, but I highly recommend using the latest version, and use the same version across your whole team. That way, different people in your team can program the same robot without having to download the firmwares every time. In this guide to ROBOTC, I'm using ROBOTC for VEX Robotics version 4.52, a VEX Cortex Microcontroller and a VEXnet Joystick. ROBOTC for VEX Robotics is able to program the VEX Cortex and VEX IQ Brain. If you wish to program the discontinued VEX PIC Microcontroller, you will need to install ROBOTC 3.X for Cortex & PIC. There are also many different styles of programming - this guide has been written for the way that I personally program. My last guide was aimed at getting a beginner programmer to be able to program a robot to a level at which it could be operated by a driver, and with some simple autonomous programming a good start for a competition. In this guide, I will expand on the previous guide, building upon the previous knowledge to write more and elegant code, which can be implemented better in practice. Sections 1. Driver Control Code (Part 2) 2. The ROBOTC Debugger 3. Variables 4. Functions and Tasks 5. Simple Improvements to Control 6. LCD Display Programming This guide is provided to assist those learning how to program VEX Robots. This is a free document, but I ask that you ask for my consent before redistributing online, but please feel free to share a link. This document, along with my others, are available for free download from Page 2 Published: 18-July-2016 George Gillard

3 1 Driver Control Code (Part 2) In the previous guide, we learned how to control motors with commands from the joystick. In this guide, we ll optimize this code a bit further, with some additional concepts. 1.1 Deadbands You ll find that when releasing a thumb-stick on a joystick, it most likely will not fall at exactly zero it ll be slightly off. In practice this isn t too much of an issue, because the motors won t actually be able to turn anything under load until they have a significant amount of power applied to them this could be as little as 15 or as much as 30. However, it is often still desirable to cut out the noise from a not-perfectly centred thumb-stick. What we need to do, is determine if the thumb-stick is within a certain threshold, which will be our deadband or dead zone if you like. Something like this: If the thumb-stick is more than 10 OR less than -10 Use the actual thumb-stick output value Else Consider as zero Note, the value of 10 is completely arbitrary, and would need testing. It might be that 15 works better for you, for example. I m using tank control for this example, for the left hand side of a drive train. We d then copy this again for the right hand side, changing the channel number and motor name as required: Figure However, we could make this a little more elegant. For this, we ll meet a new friend the absolute operator. The absolute operator (abs(input)) basically returns the magnitude of a number, that is, it returns the same number, but ignores if it is positive or negative. For example: abs(5) is equal to 5 abs(-5) is equal to 5 abs(0) is equal to 0 abs(127) is equal to 127 abs(-127) is equal to 127 Page 3 Published: 18-July-2016 George Gillard

4 This is useful for our purpose, because if we took the absolute of the thumb-stick value, we could use this to very easily determine if it is within the deadband region, as shown below: Figure If we wanted to be really fancy, we can actually reduce all of this down to a single line. For this, we could use a ternary operator. The ternary operator is used as a replacement for an if/else statement, when we want to directly control the value of something. It works something like this: Motor value = either vexrt[ch3], or 0, depending on the deadband Ternary operators are written in the format: Value = (condition)? (output 1) : (output 2); The? and : are the operating bits here. You could think of it this way: The question mark says, Is the condition true?. If so, it will give Value = output 1. Otherwise (says the colon), it will give Value = output 2. In our example, we get this: Figure Note: A lot of people don t like ternary operators because they can look a little bit confusing/scary. It is perfectly acceptable to just use an if/else structure if that s what you prefer. 1.2 Trim Sometimes, motors need to be given a bit of extra power to help hold something in place. For example, an arm might fall back down due to gravity if it hasn t any power resisting this. Ideally, you d use elastic to help the arm stay up such as from rubber bands, however in some cases this isn t so simple. Another example would be a claw/manipulator, which just needs an extra bit of power to hold something, when you don t want to apply full power to hold an object (which would likely cause the motor s thermal protector to trip, and the motor would stop working). Page 4 Published: 18-July-2016 George Gillard

5 In such cases, we want to apply a small amount of power (such as 15 out of 127) when the arm is at rest. Two ways that we could do this would be by simply add 15 to the existing control speed, however this means that the maximum negative speed would now become -112 instead of -127, or, we could just set the power to 15 when the power from the joystick would be 0. In this example, we ll use an arm motor, being operated by the 5U and 5D buttons on the joystick. Method 1: This is pretty simple we just use addition: Method 2: motor[arm] = (vexrt[btn5u] vexrt[btn5d])* ; This is a little more complicated we need to detect when the power from the joystick is zero. The following example does this by just checking if either button is being pressed. if ( vexrt[btn5u] vexrt[btn5d] ) motor[arm] = (vexrt[btn5u] vexrt[btn5d])*127; else motor[arm] = 15; 1.3 Preset Heights This is a topic in itself, so in this guide, I will just explain the concept. I have a separate document on my website which explains how I personally write code for preset heights. The idea of a preset height is that you could press a button on the joystick, and an arm (or other elevating mechanism) would lift automatically to a particular height. You might use this for lifting to a goal, without having to worry about controlling the arm as well as other mechanisms such as a drive train. First, you d need to determine the height of each goal or preset height you wish to use. Using the ROBOTC debugger, this is pretty easy make sure you have the sensors window open, and start the debugger, and you should see the value of the potentiometer or whichever sensor you use on your lift change as you move it around. Record the relevant values for the right heights you ll need to put them in your code. Then, in your code, you need to detect when the relevant button on your joystick is pressed this will be the activation of the preset control. Finally, you need some autonomous code within your driver control code which executes the actions to lift the arm to the required heights. Page 5 Published: 18-July-2016 George Gillard

6 2 The ROBOTC Debugger The ROBOTC Debugger is a powerful tool when testing your robot. It s most useful for getting real-time feedback and data from your robot, particularly if you want to know what the sensors are reading, or if you want to run through your code line-by-line or up to breakpoints, allowing you to analyse the execution of your code as it happens. When you download code to your robot, a little box will display on your screen: Figure 2.1 This is the main control of the debugger. By clicking the Start button, your robot will begin the program. Once started, you can click Stop which will stop the program. The ROBOTC Wiki/API has a great explanation of the various functions in the debugger. For this guide, we ll just worry about the Start/Stop control. Below the main text editor, you ll see a big box, something like this: Figure 2.2 This is where you ll find information from your sensors, motors, variables, etc. By going to Robot Debugger Windows, you ll be able to choose whichever windows you wish to use. Try not to have too many open at once, or the debugger will slow down. Page 6 Published: 18-July-2016 George Gillard

7 Figure 2.3 Say we have an arm on our robot with a potentiometer. If we wanted to see what the potentiometer was reading, we d have to check the Sensors window was checked in the list on Robot Debugger Windows, and then so long as our sensor has been set up correctly in the Motors and Sensors Setup window, we should see our potentiometer in the debugger window along the bottom of the screen. Figure 2.4 You can even control motors from the debugger if you really wanted to open the Motors window, and type in a value for the Power column. When using the larger red Quadrature Encoders, try testing them with the debugger. Quite often you ll find that the wires are plugged in in the wrong order, and the debugger can be really useful for finding these sorts of issues. Page 7 Published: 18-July-2016 George Gillard

8 3 Variables Variables are used to label and store a value in memory. A bit like how in algebra, you might use the letter x to replace a value, variables can be helpful to keep things simple in code. There are multiple types of variable in ROBOTC, such as: Integer (int) a whole number (e.g. -3, -2, -1, 0, 1, 2, or 3) Floating decimal number (float) a number with a decimal point (e.g. 1.5, 0.321, ) Boolean (bool) either true or false/1 or 0. Character (char) a single number, letter, or symbol String (string) a series of characters There are others too, such as bytes, and variations of integers such as short or long, however we ll focus only on the types above. 3.1 Creating a Variable To create a variable, we must declare it. To do this, we type the code for what type it is (in brackets above), followed by a name. If we know what value we want it to be, we can set that straight away, as shown: Unknown/Normal: int myvariable; With a known value: int myvariable = 20; If we want to define multiple variables of the same type, we can do so in a single line by separating the names by a comma: int apples, bananas, pears; If we never want our variable to change, and we know it s value, we can set it up as a constant when we define the variable: const int lifttrim = 15; Page 8 Published: 18-July-2016 George Gillard

9 Or, instead, we could use the #define command to do a similar thing: #define lifttrim 15 Note: We don t need an equal sign or a semicolon for a #define. The way the define command works, is that it essentially does a find a replace through the code in the program when it is downloaded. It will replace lifttrim with 15 in the above case, whenever lifttrim is seen in the code. 3.2 Using a Variable Once defined, we can give our variable a new value, like shown below: myvariable = 30; Or, perhaps a more practical use: currentangle = sensorvalue(armpotentiometer); If we want to read a value in a variable, we can do so like shown: speed = 127; motor[leftdrive] = speed; We can do pretty much anything with a variable, for example, maths: Or, apples = 6; bananas = 5; piecesoffruit = apples + bananas; boxheight = 5; boxwidth = 10; boxarea = boxheight * boxwidth; You can view the value of a variable in the ROBOTC Debugger when your program is running. Page 9 Published: 18-July-2016 George Gillard

10 4 Functions and Tasks Functions and tasks are used to add a bit more structure to your code mainly to avoid writing repetitive sections of code, and hence make it all shorter and more user-friendly. 4.1 Functions Void-type functions Recall the simple autonomous from Volume 1 of The Beginners Guide to ROBOTC: Figure This code was used to drive forwards for 5 seconds, turn left for 1 second, drive forwards for another 2.5 seconds, and then stop. Wouldn t this be simpler if we could write something like this: Figure Apart from clearly being shorter, it also is much easier to understand. This is an example of a use of functions where we create a command, and then use it to make the code much more elegant and user-friendly. To use a function, we must first have declared it (created its name), much like a variable. void functionname (input parameters); We use a void when we want the function to do a job, without needing a value out of it. For the driveforward function used above, we d declare it as follows: void driveforward(int time); In this case, time is an input parameter (a variable) we use in the function, but we must declare it with the function, in the round brackets. Page 10 Published: 18-July-2016 George Gillard

11 Of course, to go with the declaration, we must write the code that actually does the job the definition. Once again though, we must write the type of function at the front, and the declaration of variables in the round brackets. The definition of the driveforward function would look something like the following: Figure Note: No semicolon is needed at the end of the very first line (after void driveforward(int time) ), unlike in the definition. If we define the function before we actually use it, we don t actually have to declare it at all the definition will take care of that for us. We only need to declare it separately if we use the function before we have defined it. Generally, it s far more common to define all the functions at the very beginning of your program, and just keep it straightforward without extra declarations. What if we wanted to control the speed, as well as the time? Our definition would look something like this: Figure We d then incorporate that into our code like so: driveforward(5000, 127); What if we wanted to be able to control the speed, but also wanted it to have a default value so that if we don t specify a speed, it automatically assumes 127? Our definition would look something like this: Figure Page 11 Published: 18-July-2016 George Gillard

12 4.1.2 Variable-type Functions Not all functions have to be of the type void. Quite often, we might want a value out of the function. Variables too, can be used as functions, and are created in the exact same was as void-type functions. Say, we might want to calculate the area of a box as a simple example, or maybe a more practical solution would be to calculate the average value of two drive encoders (one left, one right). Inside the definition of the function, we use return to write the output. For the first example, let s assume that we want to plug in a height and a width, both integers, and get an area out of that. We know that the output must also be an integer, so, we can create an int-type function: Figure Then, when we wish to use the function, we would just write something like: area = findarea(5, 6); For the second example, so long as we know the names of the encoders we wish to use, and want to create a function to just find the average of these (rather than a generic average function), we could create a function with no input variables. We know that both encoders will be integers, but the output might not for example if one encoder was 120 and the other was 125, the average would be For this, we d need a float-type function: Figure Note: We can create and use variables like normal within the function, but only need to use the return command for the final output value. We would then call this function by writing something like: currentdistance = aveencoders(); Note: we still need to use the two round brackets alongside the function name, even if there are no inputs. Page 12 Published: 18-July-2016 George Gillard

13 4.2 Tasks Tasks are similar in concept to functions in the sense that you can replace huge chunks of repetitive code with them, however they work quite differently. Tasks are started or stopped, and work in the background, rather than sequentially like functions. This makes tasks more ideal for multitasking purposes. For example, it is quite common to use functions to control a drive-train, but a task to control an arm. This means that the wheels can continue to drive on with the next instructions, while the arm begins to lift, without having to wait. You will probably recognise tasks from task main(), or task usercontrol() or task autonomous(). The latter two are created as tasks, so the competition template still retains control, and can cut off the usercontrol() or autonomous() tasks without having to wait. Tasks are defined much like a function, however they cannot have any input parameters. They are defined as shown below: task taskname() { } Tasks are then called in your code by using: starttask(taskname); Tasks can be stopped by using: stoptask(taskname); If you wish to have the equivalent of an input parameter, you ll need to set up a global variable. Page 13 Published: 18-July-2016 George Gillard

14 The following task is used to control an arm: Figure Note: A threshold is used because it is highly unlikely that the arm s potentiometer would read the exact value of height when it has lifted, meaning that the arm would continuously bounce up and down as it overshoots the perfect value. Therefore, an acceptable range was created for the above code. The target height is then specified and task is then called once by using: height = 1500; starttask(arm); Throughout the autonomous code, if the target height were to be changed, the only thing that needs doing is changing the value of height. For example: Figure Page 14 Published: 18-July-2016 George Gillard

15 5 Simple Improvements to Control The programming taught so far for controlling wheels and arms has been quite crude. There are a number of improvements that can greatly improve the accuracy or smoothness of code. The first improvement is to use sensors wherever appropriate, as the inbuilt timer to ROBOTC depends on the motors running at the same speed every time which of course won t be true when your batteries aren t at the same voltage. As you get more and more confident with programming, I highly encourage you to experiment with some of your own ideas for improvements, and also explore other ideas, but for now, here are some reasonably good ways to quickly improve the control you have: 5.1 Braking for Drive-trains A common issue with drive-trains is that you ll instruct the robot to drive forwards a certain distance at full speed, and then suddenly stop. Due to the inertia of the robot, the robot will never stop quite like you would like, so applying some slight power in the opposite direction for a short period of time will provide some resistance to the continued movement of your robot. Taking the driveforwards function from earlier, we can implement braking like shown below: Figure Warning: This can be quite nasty to the motors. Don t do this on a heavy robot moving quite fast when it tries to brake, or you ll most likely damage quite a few motors! 5.2 Driving Straight Driving in a perfectly straight line can be really tricky. Whilst this solution won t get your robot driving perfectly straight, it will probably be an improvement. This is a very basic implementation of a proportional controller in the rotational dimension, applied to the basic driveforwards function. A variable called turncorrection is created, which will be positive when the robot has unintentionally turned left slightly. By adding this value to the left hand side and subtracting it from the right hand side, the new speeds of the motors should correct the curve somewhat. Page 15 Published: 18-July-2016 George Gillard

16 This code also uses the encoders to get a more accurate measured distance in the forward direction, rather than by using time. The aveencoders function created earlier is also used. Figure If the robot now shakes as it drives, we might need to multiply the value of turncorrection by 0.5 or so, to get it to smoothen up. 5.3 Smoother Lifting The task created earlier to control an arm needed a threshold as an acceptable range for the arms position, otherwise the arm would bounce as it overshot the target height. This threshold then means that we have a reasonably large acceptable range, which means we could be significantly off the target height at the end. We can make the speed of the arm go up proportional to how far away the arm currently is from where we want it to be, and that way the arm will be going slow enough near the target not to bounce too much. This way, we don t need an acceptable range at all, and the arm will be both smoother and more accurate. Like the turn correction solution in Section 5.2, this is a basic implementation of a proportional controller. Figure If the arm is a bit unstable/bouncy around the target height, we might need to multiply difference by 0.5 or so to get it to smoothen up. Page 16 Published: 18-July-2016 George Gillard

17 6 LCD Display Programming The VEX LCD is a simple display which has two rows, each of which can show 16 characters. There are three buttons below the display, which can be used as an input. These LCDs are commonly used to display data from the robot, such as battery voltage or sensor values, or to select an autonomous routine before a competition game, if the robot has multiple stored routines. You can open a mock LCD display in the ROBOTC Debugger. If you wish to program and test some code for an LCD without having a robot present to download onto, you can use the PC-Based Emulator option (Robot Compiler Target PC-Based Emulator), which allows you to test code without needing a Cortex. The best way to program an LCD display is to be creative. There are so many things you can do and ways of doing it, so I will just show you the tools you ll need to explore and have fun. 6.1 The Screen The screen has two rows and 16 columns, where 0 is the top line, 1 is the bottom line, 0 is the far left column and 15 is the far right column. clearlcdline(linenumber); This command will print all characters along a row (either 0 or 1). displaylcdcenteredstring(rownumber, "STRING"); This command will print a line of text along a row, such that it is centred horizontally. displaylcdstring(rownumber, columnnumber, "STRING"); This command will print a line of text, starting at the specified position, moving right. displaylcdchar(rownumber, columnnumber, CHARACTER ); This command will print a single character (letter, number, or symbol). Page 17 Published: 18-July-2016 George Gillard

18 displaylcdnumber(rownumber, columnnumber, value); This command will print a number at the specified position. setlcdposition(rownumber, columnnumber); This command will set the next position think of this as the location of a text cursor. displaynextlcdstring("string"); This command will print a string from the set position of the text cursor. displaynextlcdchar('character'); This command will print a single character from the set position of the text cursor. displaynextlcdnumber(value); This command will print a value from the set position of the text cursor. The following code would print out the value of a sensor in real-time, and an image of the LCD Display debugger window follows: Figure Page 18 Published: 18-July-2016 George Gillard

19 Figure sprintf(string to write to, STRING AND FORMATTING, values); This command writes to a pre-declared string, a string which follows the specified text and formatting, with any relevant values at the end. This can be quite confusing to learn, but can make printing complicated strings much easier. Type text as per normal for the string you wish to display. Wherever you want to insert a value, use a % symbol, then type a specifier d for an integer, f for a float, c for a character or s for a string. If you want to be specific about how much of the number is displayed, you can type the formatting as %(minimum width).(precision)(specifier). For example, %5.2f would have a minimum width of 5 digits, 2 decimal places, and would be a floating point number (e.g. if the value was , it would display ). %.5d would have a precision of 5 places, and be a decimal value (e.g. if the value was 123, it would display 00123). Example: Creating the string Battery: 7.2V : Figure Figure Page 19 Published: 18-July-2016 George Gillard

20 6.2 Buttons We can get the value from the LCD Display buttons, by calling nlcdbuttons. This variable will have a value of 1 for the left button, 2 for the middle button, or 4 for the right button, when pressed. If multiple buttons are pressed, the value will be the sum of the values for each independent pressed button. When detecting if a button has been pressed, it is worth having a way of waiting for the button to be released again. If pressing the same button twice would have some action, without waiting for the release, you d skip straight through to the second action. Either use time, or detect when the button is released again. 6.3 Routines for Autonomous Selection Sometimes, having one autonomous routine for competition is not enough. Adaptability, flexibility, and unpredictability are valuable assets in competition. You could write multiple autonomous routines, but to do this, you d need a selection method. Quite common solutions include using a potentiometer as a selection dial, or buttons, or jumper switches (which act as a digital input, giving a 1 or 0 value). These are all pretty easy to work with. However, you may decide that actually you d like to use the LCD display to run a routine of its own to select an autonomous routine. If you choose to do this, write this code in the pre_auton() function in the competition template this will run when you switch the robot on, and allow you to select a routine in the period prior to the start of the game. Tip: Consider what would happen if your robot were to disconnect in a game. You want a fail-safe, such that the robot wouldn t be stuck in a game waiting for a user input for the autonomous selection. Either have a timeout, or use the bifirobotdisabled boolean variable, so that the selection routine only runs when the robot is disabled, and therefore not in the middle of an autonomous or driver control routine. Conclusion I hope that this guide has been of good use to you, and that you now feel more confident in programming using ROBOTC. When I began programming, I was incredibly nervous the first time I tried to write code. Thankfully, ROBOTC is very forgiving, and will point out most issues with your code when you compile it. In the current day and age, learning to program is an incredibly useful skill, and ROBOTC is a great language to learn in. I have other guides available on my website, and there are plenty of other fantastic resources online. For example, ROBOTC have a great wiki/api on their website, which has more-or-less everything you d need to know to be able to use the language. ROBOTC also provide plenty of sample programs, which are useful for learning. Good luck with all of your future programming endeavours! Page 20 Published: 18-July-2016 George Gillard

Programming Preset Heights in ROBOTC for VEX Robotics By George Gillard

Programming Preset Heights in ROBOTC for VEX Robotics By George Gillard Programming Preset Heights in ROBOTC for VEX Robotics By George Gillard Introduction Programming a button that lifts an arm (or other mechanism for that matter) to a specific preprogrammed point can be

More information

RobotC for VEX. By Willem Scholten Learning Access Institute

RobotC for VEX. By Willem Scholten Learning Access Institute RobotC for VEX By Willem Scholten Learning Access Institute 1 RobotCgetStarted.key - February 5, 2016 RobotC for VEX Section 1 - RobotC How to switch between VEX 2.0 Cortex and VEX IQ Section 2 - RobotC

More information

If Statements, For Loops, Functions

If Statements, For Loops, Functions Fundamentals of Programming If Statements, For Loops, Functions Table of Contents Hello World Types of Variables Integers and Floats String Boolean Relational Operators Lists Conditionals If and Else Statements

More information

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)... Remembering numbers (and other stuff)... Let s talk about one of the most important things in any programming language. It s called a variable. Don t let the name scare you. What it does is really simple.

More information

VEX Robotics A Primer

VEX Robotics A Primer 2015 Andrew Dahlen andrew.dahlen@northlandcollege.edu VEX Robotics A Primer 2015 HI-TEC Conference Workshop July 27 th 2015 Portland Oregon Background VEX Robotics Overview 360 VEX Robotics Competition

More information

These are notes for the third lecture; if statements and loops.

These are notes for the third lecture; if statements and loops. These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern

More information

Variables and Data Representation

Variables and Data Representation You will recall that a computer program is a set of instructions that tell a computer how to transform a given set of input into a specific output. Any program, procedural, event driven or object oriented

More information

How to Do Everything We Need to Do on a TI Calculator in Algebra 2 for Now (Unless Davies Forgot Something)

How to Do Everything We Need to Do on a TI Calculator in Algebra 2 for Now (Unless Davies Forgot Something) How to Do Everything We Need to Do on a TI Calculator in Algebra 2 for Now (Unless Davies Forgot Something) 10.01.17 Before you do anything, set up your calculator so that it won t get in your way. Basics:

More information

MS4SSA Robotics Module:

MS4SSA Robotics Module: Robotics Module: Programming and Sensors Kim Hollan Why Program a Robot? Building a robot teaches many valuable skills; however, the learning doesn t stop there Programming also teaches valuable life skills

More information

[ the academy_of_code] Senior Beginners

[ the academy_of_code] Senior Beginners [ the academy_of_code] Senior Beginners 1 Drawing Circles First step open Processing Open Processing by clicking on the Processing icon (that s the white P on the blue background your teacher will tell

More information

Testing VEX Cortex Robots using VEXnet

Testing VEX Cortex Robots using VEXnet Testing VEX Cortex Robots using VEXnet This document is an inspection guide for VEX Cortex based robots. Use this document to test if a robot is competition ready. Method I. Using the ROBOTC Competition

More information

Movement using Shaft Encoders

Movement using Shaft Encoders Movement using Shaft Encoders Configure (Motors and Sensors Setup) We will look at the following in this section SensorValue[] while Conditions (, =,!=, ==) Quadrature/Shaft/Rotation Encoder 360

More information

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0. L J Howell UX Software Ver. 1.0

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0. L J Howell UX Software Ver. 1.0 VISUAL GUIDE to RX Scripting for Roulette Xtreme - System Designer 2.0 L J Howell UX Software 2009 Ver. 1.0 TABLE OF CONTENTS INTRODUCTION...ii What is this book about?... iii How to use this book... iii

More information

VEX Startup and Configuration Procedures

VEX Startup and Configuration Procedures VEX Startup and Configuration Procedures Power Up Open RobotC Step 2 Plug battery into the Cortex power port. The plug is keyed to only install one way. Black wire will face to the outside of the Cortex.

More information

4. Java Project Design, Input Methods

4. Java Project Design, Input Methods 4-1 4. Java Project Design, Input Methods Review and Preview You should now be fairly comfortable with creating, compiling and running simple Java projects. In this class, we continue learning new Java

More information

UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING

UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2012 Lab 3 Matrix Math Introduction Reading In this lab you will write a

More information

the NXT-G programming environment

the NXT-G programming environment 2 the NXT-G programming environment This chapter takes a close look at the NXT-G programming environment and presents a few simple programs. The NXT-G programming environment is fairly complex, with lots

More information

General Syntax. Operators. Variables. Arithmetic. Comparison. Assignment. Boolean. Types. Syntax int i; float j = 1.35; int k = (int) j;

General Syntax. Operators. Variables. Arithmetic. Comparison. Assignment. Boolean. Types. Syntax int i; float j = 1.35; int k = (int) j; General Syntax Statements are the basic building block of any C program. They can assign a value to a variable, or make a comparison, or make a function call. They must be terminated by a semicolon. Every

More information

RobotC. Remote Control

RobotC. Remote Control RobotC Remote Control Learning Objectives: Focusing on Virtual World with Physical Examples Understand Real-Time Joystick Mapping Understand how to use timers Understand how to incorporate buttons into

More information

Lab 1 Implementing a Simon Says Game

Lab 1 Implementing a Simon Says Game ECE2049 Embedded Computing in Engineering Design Lab 1 Implementing a Simon Says Game In the late 1970s and early 1980s, one of the first and most popular electronic games was Simon by Milton Bradley.

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

VEX ARM Cortex -based Microcontroller and VEXnet Joystick User Guide

VEX ARM Cortex -based Microcontroller and VEXnet Joystick User Guide 1. VEX ARM Cortex -based Microcontroller and VEXnet Joystick Pairing Procedure: a. The Joystick must first be paired to the VEX ARM Cortex -based Microcontroller before they will work using VEXnet Keys.

More information

Variables and Constants

Variables and Constants HOUR 3 Variables and Constants Programs need a way to store the data they use. Variables and constants offer various ways to work with numbers and other values. In this hour you learn: How to declare and

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

How to approach a computational problem

How to approach a computational problem How to approach a computational problem A lot of people find computer programming difficult, especially when they first get started with it. Sometimes the problems are problems specifically related to

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

Autonomy/Encoders Forward for Distance

Autonomy/Encoders Forward for Distance nomy/encoders Forward for Distance In this lesson, you will learn how to use an Encoder to more accurately control the distance that the robot will travel. 1. Your robot should have one encoder hooked

More information

Lab 1 Implementing a Simon Says Game

Lab 1 Implementing a Simon Says Game ECE2049 Embedded Computing in Engineering Design Lab 1 Implementing a Simon Says Game In the late 1970s and early 1980s, one of the first and most popular electronic games was Simon by Milton Bradley.

More information

Section 0.3 The Order of Operations

Section 0.3 The Order of Operations Section 0.3 The Contents: Evaluating an Expression Grouping Symbols OPERATIONS The Distributive Property Answers Focus Exercises Let s be reminded of those operations seen thus far in the course: Operation

More information

CORTEX Microcontroller and Joystick User Guide

CORTEX Microcontroller and Joystick User Guide This is a User Guide for using the VEX CORTEX Microcontroller and VEX Joystick. Refer to the VEX Wiki (http://www.vexforum.com/wiki/index.php/vex_cortex_microcontroller) for updates to this document. 1.

More information

Lecture Programming in C++ PART 1. By Assistant Professor Dr. Ali Kattan

Lecture Programming in C++ PART 1. By Assistant Professor Dr. Ali Kattan Lecture 08-1 Programming in C++ PART 1 By Assistant Professor Dr. Ali Kattan 1 The Conditional Operator The conditional operator is similar to the if..else statement but has a shorter format. This is useful

More information

Lesson 6A Loops. By John B. Owen All rights reserved 2011, revised 2014

Lesson 6A Loops. By John B. Owen All rights reserved 2011, revised 2014 Lesson 6A Loops By John B. Owen All rights reserved 2011, revised 2014 Topic List Objectives Loop structure 4 parts Three loop styles Example of a while loop Example of a do while loop Comparison while

More information

Introduction to Programming with JES

Introduction to Programming with JES Introduction to Programming with JES Titus Winters & Josef Spjut October 6, 2005 1 Introduction First off, welcome to UCR, and congratulations on becoming a Computer Engineering major. Excellent choice.

More information

3. Simple Types, Variables, and Constants

3. Simple Types, Variables, and Constants 3. Simple Types, Variables, and Constants This section of the lectures will look at simple containers in which you can storing single values in the programming language C++. You might find it interesting

More information

Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 23 Introduction to Arduino- II Hi. Now, we will continue

More information

Coding Workshop. Learning to Program with an Arduino. Lecture Notes. Programming Introduction Values Assignment Arithmetic.

Coding Workshop. Learning to Program with an Arduino. Lecture Notes. Programming Introduction Values Assignment Arithmetic. Coding Workshop Learning to Program with an Arduino Lecture Notes Table of Contents Programming ntroduction Values Assignment Arithmetic Control Tests f Blocks For Blocks Functions Arduino Main Functions

More information

The Big Python Guide

The Big Python Guide The Big Python Guide Big Python Guide - Page 1 Contents Input, Output and Variables........ 3 Selection (if...then)......... 4 Iteration (for loops)......... 5 Iteration (while loops)........ 6 String

More information

G. Tardiani RoboCup Rescue. EV3 Workshop Part 1 Introduction to RobotC

G. Tardiani RoboCup Rescue. EV3 Workshop Part 1 Introduction to RobotC RoboCup Rescue EV3 Workshop Part 1 Introduction to RobotC Why use RobotC? RobotC is a more traditional text based programming language The more compact coding editor allows for large programs to be easily

More information

SPARTAN ROBOTICS FRC 971

SPARTAN ROBOTICS FRC 971 SPARTAN ROBOTICS FRC 971 Controls Documentation 2015 Design Goals Create a reliable and effective system for controlling and debugging robot code that provides greater flexibility and higher performance

More information

VEX Robot Remote Control Set-Up

VEX Robot Remote Control Set-Up VEX Robot Remote Control Set-Up Note: Before proceeding with the VEXnet joystick setup on the following pages, complete these steps: 1) Open the RobotC program 2) Select File > Open Sample Program 3) Select

More information

ENGR 40M Project 3c: Switch debouncing

ENGR 40M Project 3c: Switch debouncing ENGR 40M Project 3c: Switch debouncing For due dates, see the overview handout 1 Introduction This week, you will build on the previous two labs and program the Arduino to respond to an input from the

More information

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed

More information

EV3 Programming Workshop for FLL Coaches

EV3 Programming Workshop for FLL Coaches EV3 Programming Workshop for FLL Coaches Tony Ayad 2017 Outline This workshop is intended for FLL coaches who are interested in learning about Mindstorms EV3 programming language. Programming EV3 Controller

More information

1.2 Adding Integers. Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line

1.2 Adding Integers. Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line 1.2 Adding Integers Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line Finding Sums Mentally The Commutative Property Finding Sums using And Patterns and Rules of Adding Signed

More information

K Force The Kristin Robotics Team Introductory Programming Tutorial 2014 For use with the teams squarebot training robots.

K Force The Kristin Robotics Team Introductory Programming Tutorial 2014 For use with the teams squarebot training robots. K Force The Kristin Robotics Team Introductory Programming Tutorial 2014 For use with the teams squarebot training robots. K Force Squarebot Programming Course - 2014 Robot moves forward for two seconds

More information

NAME EET 2259 Lab 3 The Boolean Data Type

NAME EET 2259 Lab 3 The Boolean Data Type NAME EET 2259 Lab 3 The Boolean Data Type OBJECTIVES - Understand the differences between numeric data and Boolean data. -Write programs using LabVIEW s Boolean controls and indicators, Boolean constants,

More information

MAT 003 Brian Killough s Instructor Notes Saint Leo University

MAT 003 Brian Killough s Instructor Notes Saint Leo University MAT 003 Brian Killough s Instructor Notes Saint Leo University Success in online courses requires self-motivation and discipline. It is anticipated that students will read the textbook and complete sample

More information

Signed umbers. Sign/Magnitude otation

Signed umbers. Sign/Magnitude otation Signed umbers So far we have discussed unsigned number representations. In particular, we have looked at the binary number system and shorthand methods in representing binary codes. With m binary digits,

More information

Getting started with simulating data in R: some helpful functions and how to use them Ariel Muldoon August 28, 2018

Getting started with simulating data in R: some helpful functions and how to use them Ariel Muldoon August 28, 2018 Getting started with simulating data in R: some helpful functions and how to use them Ariel Muldoon August 28, 2018 Contents Overview 2 Generating random numbers 2 rnorm() to generate random numbers from

More information

C++ Reference NYU Digital Electronics Lab Fall 2016

C++ Reference NYU Digital Electronics Lab Fall 2016 C++ Reference NYU Digital Electronics Lab Fall 2016 Updated on August 24, 2016 This document outlines important information about the C++ programming language as it relates to NYU s Digital Electronics

More information

MS4SSA Robotics Module:

MS4SSA Robotics Module: MS4SSA Robotics Module: Programming and Sensors Brad Miller and Kim Hollan What are we doing today? Talk about why to program robots Learn about basic RobotC programming Learn how to make the robot move

More information

HUB-ee BMD-S Arduino Proto Shield V1.0

HUB-ee BMD-S Arduino Proto Shield V1.0 HUB-ee BMD-S Arduino Proto Shield V1.0 User guide and assembly instructions Document Version 1.0 Introduction 2 Schematic 3 Quick user guide 4 Assembly 5 1) DIP Switches 5 2) Micro-MaTch Connector Headers

More information

Table of Laplace Transforms

Table of Laplace Transforms Table of Laplace Transforms 1 1 2 3 4, p > -1 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Heaviside Function 27 28. Dirac Delta Function 29 30. 31 32. 1 33 34. 35 36. 37 Laplace Transforms

More information

Coordinate System Techniques

Coordinate System Techniques Coordinate System Techniques In this lesson, we ll show some advanced implications of what can be done with coordinate systems. For the most part, this lesson applies to machining centers. But there are

More information

C++ Data Types. 1 Simple C++ Data Types 2. 3 Numeric Types Integers (whole numbers) Decimal Numbers... 5

C++ Data Types. 1 Simple C++ Data Types 2. 3 Numeric Types Integers (whole numbers) Decimal Numbers... 5 C++ Data Types Contents 1 Simple C++ Data Types 2 2 Quick Note About Representations 3 3 Numeric Types 4 3.1 Integers (whole numbers)............................................ 4 3.2 Decimal Numbers.................................................

More information

What Every Programmer Should Know About Floating-Point Arithmetic

What Every Programmer Should Know About Floating-Point Arithmetic What Every Programmer Should Know About Floating-Point Arithmetic Last updated: October 15, 2015 Contents 1 Why don t my numbers add up? 3 2 Basic Answers 3 2.1 Why don t my numbers, like 0.1 + 0.2 add

More information

Pong in Unity a basic Intro

Pong in Unity a basic Intro This tutorial recreates the classic game Pong, for those unfamiliar with the game, shame on you what have you been doing, living under a rock?! Go google it. Go on. For those that now know the game, this

More information

Some Extra Information on Graph Search

Some Extra Information on Graph Search Some Extra Information on Graph Search David Kempe December 5, 203 We have given basic definitions of graphs earlier in class, and talked about how to implement them. We had also already mentioned paths,

More information

AN INTRODUCTION PROGRAMMING. Simon Long

AN INTRODUCTION PROGRAMMING. Simon Long AN INTRODUCTION & GUI TO PROGRAMMING Simon Long 2 3 First published in 2019 by Raspberry Pi Trading Ltd, Maurice Wilkes Building, St. John's Innovation Park, Cowley Road, Cambridge, CB4 0DS Publishing

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

Variables and Functions. ROBOTC Software

Variables and Functions. ROBOTC Software Variables and Functions ROBOTC Software Variables A variable is a space in your robots memory where data can be stored, including whole numbers, decimal numbers, and words Variable names follow the same

More information

logic table of contents: squarebot logic subsystem 7.1 parts & assembly concepts to understand 7 subsystems interfaces 7 logic subsystem inventory 7

logic table of contents: squarebot logic subsystem 7.1 parts & assembly concepts to understand 7 subsystems interfaces 7 logic subsystem inventory 7 logic table of contents: squarebot logic subsystem 7.1 parts & assembly concepts to understand 7 subsystems interfaces 7 logic subsystem inventory 7 7 1 The Vex Micro Controller coordinates the flow of

More information

Robotics Jumpstart Training II. EasyC: Software & Firmware Updates

Robotics Jumpstart Training II. EasyC: Software & Firmware Updates Robotics Jumpstart Training II EasyC: Software & Firmware Updates Objectives: Learn how to update EasyC Current Version: 4.2.1.9 Learn how to update Firmware VEX Joystick (Controller) VEX Microcontroller

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Introduction This handout briefly outlines most of the basic uses and functions of Excel that we will be using in this course. Although Excel may be used for performing statistical

More information

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I BASIC COMPUTATION x public static void main(string [] args) Fundamentals of Computer Science I Outline Using Eclipse Data Types Variables Primitive and Class Data Types Expressions Declaration Assignment

More information

TWO PLAYER REACTION GAME

TWO PLAYER REACTION GAME LESSON 18 TWO PLAYER REACTION GAME OBJECTIVE For your final project for this level for the course, create a game in Python that will test your reaction time versus another player. MATERIALS This lesson

More information

hp calculators HP 50g Algebraic and RPN Operating Modes Calculation Modes A simple example - the area of a piece of carpet Setting the mode

hp calculators HP 50g Algebraic and RPN Operating Modes Calculation Modes A simple example - the area of a piece of carpet Setting the mode Calculation Modes A simple example - the area of a piece of carpet Setting the mode Algebraic and RPN modes and the stack The command line Example a more complicated expression Example which stepladder?

More information

Dual 10A RC Relay MK2

Dual 10A RC Relay MK2 Dual 10A RC Relay MK2 Stockist:- Scale Warship 5 Beechwood Avenue New Milton Hants BH25 5NB 07855 941117 john@scalewarship.com 1 INTRODUCTION This unit allows the signal from a standard radio control receiver

More information

Computer Programming. Basic Control Flow - Loops. Adapted from C++ for Everyone and Big C++ by Cay Horstmann, John Wiley & Sons

Computer Programming. Basic Control Flow - Loops. Adapted from C++ for Everyone and Big C++ by Cay Horstmann, John Wiley & Sons Computer Programming Basic Control Flow - Loops Adapted from C++ for Everyone and Big C++ by Cay Horstmann, John Wiley & Sons Objectives To learn about the three types of loops: while for do To avoid infinite

More information

CS 142 Style Guide Grading and Details

CS 142 Style Guide Grading and Details CS 142 Style Guide Grading and Details In the English language, there are many different ways to convey a message or idea: some ways are acceptable, whereas others are not. Similarly, there are acceptable

More information

CS102: Variables and Expressions

CS102: Variables and Expressions CS102: Variables and Expressions The topic of variables is one of the most important in C or any other high-level programming language. We will start with a simple example: int x; printf("the value of

More information

Troubleshooting ROBOTC with Cortex

Troubleshooting ROBOTC with Cortex This guide is to designed to be used by a student or teacher as a reference for help troubleshooting ROBOTC software issues. Troubleshooting Topics Computer will not Recognize the VEX Cortex Not able to

More information

Grade 6 Math Circles November 6 & Relations, Functions, and Morphisms

Grade 6 Math Circles November 6 & Relations, Functions, and Morphisms Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Relations Let s talk about relations! Grade 6 Math Circles November 6 & 7 2018 Relations, Functions, and

More information

EEN118 LAB FOUR. h = v t ½ g t 2

EEN118 LAB FOUR. h = v t ½ g t 2 EEN118 LAB FOUR In this lab you will be performing a simulation of a physical system, shooting a projectile from a cannon and working out where it will land. Although this is not a very complicated physical

More information

Binary, Hexadecimal and Octal number system

Binary, Hexadecimal and Octal number system Binary, Hexadecimal and Octal number system Binary, hexadecimal, and octal refer to different number systems. The one that we typically use is called decimal. These number systems refer to the number of

More information

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES Chapter 1 : Examples of commonly used formulas - Office Support A collection of useful Excel formulas for sums and counts, dates and times, text manipularion, conditional formatting, percentages, Excel

More information

Unit 4: Multiplication

Unit 4: Multiplication Math Fundamentals for Statistics I (Math 52) Unit 4: Multiplication By Scott Fallstrom and Brent Pickett The How and Whys Guys This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike

More information

Annotation Annotation or block comments Provide high-level description and documentation of section of code More detail than simple comments

Annotation Annotation or block comments Provide high-level description and documentation of section of code More detail than simple comments Variables, Data Types, and More Introduction In this lesson will introduce and study C annotation and comments C variables Identifiers C data types First thoughts on good coding style Declarations vs.

More information

Introduction to Programming. Writing an Arduino Program

Introduction to Programming. Writing an Arduino Program Introduction to Programming Writing an Arduino Program What is an Arduino? It s an open-source electronics prototyping platform. Say, what!? Let s Define It Word By Word Open-source: Resources that can

More information

Graphing Interface Overview

Graphing Interface Overview Graphing Interface Overview Note: This document is a reference for using JFree Charts. JFree Charts is m-power s legacy graphing solution, and has been deprecated. JFree Charts have been replace with Fusion

More information

Excel Basics: Working with Spreadsheets

Excel Basics: Working with Spreadsheets Excel Basics: Working with Spreadsheets E 890 / 1 Unravel the Mysteries of Cells, Rows, Ranges, Formulas and More Spreadsheets are all about numbers: they help us keep track of figures and make calculations.

More information

COSC 2P91. Bringing it all together... Week 4b. Brock University. Brock University (Week 4b) Bringing it all together... 1 / 22

COSC 2P91. Bringing it all together... Week 4b. Brock University. Brock University (Week 4b) Bringing it all together... 1 / 22 COSC 2P91 Bringing it all together... Week 4b Brock University Brock University (Week 4b) Bringing it all together... 1 / 22 A note on practicality and program design... Writing a single, monolithic source

More information

SPRITES Moving Two At the Same Using Game State

SPRITES Moving Two At the Same Using Game State If you recall our collision detection lesson, you ll likely remember that you couldn t move both sprites at the same time unless you hit a movement key for each at exactly the same time. Why was that?

More information

If you note any errors, typos, etc. with this manual or our software libraries, let us know at

If you note any errors, typos, etc. with this manual or our software libraries, let us know at Oregon State University Robotics Club ORK 2011 Programming Guide Version 1.0 Updated: 10/28/2011 Note: Check back for more revisions and updates soon! If you note any errors, typos, etc. with this manual

More information

Reading on the Accumulation Buffer: Motion Blur, Anti-Aliasing, and Depth of Field

Reading on the Accumulation Buffer: Motion Blur, Anti-Aliasing, and Depth of Field Reading on the Accumulation Buffer: Motion Blur, Anti-Aliasing, and Depth of Field 1 The Accumulation Buffer There are a number of effects that can be achieved if you can draw a scene more than once. You

More information

Create Open Interface Scripts: Using the Create Without an XBC

Create Open Interface Scripts: Using the Create Without an XBC Create Open Interface Scripts: Using the Create Without an XBC Jeremy Rand Norman High School jeremy@asofok.org Create Open Interface Scripts: Using the Create Without an XBC 1 Introduction When the irobot

More information

Chapter 1 Operations With Numbers

Chapter 1 Operations With Numbers Chapter 1 Operations With Numbers Part I Negative Numbers You may already know what negative numbers are, but even if you don t, then you have probably seen them several times over the past few days. If

More information

Animations involving numbers

Animations involving numbers 136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

More information

Memory Addressing, Binary, and Hexadecimal Review

Memory Addressing, Binary, and Hexadecimal Review C++ By A EXAMPLE Memory Addressing, Binary, and Hexadecimal Review You do not have to understand the concepts in this appendix to become well-versed in C++. You can master C++, however, only if you spend

More information

Colin Harman and Jonathan Kim

Colin Harman and Jonathan Kim Colin Harman and Jonathan Kim 2-6-10 Getting RobotC 1. Go to robotc.net/robofest 2. Enter coach information including Robofestteam ID 3. The coach will get an email with a link to download RobotC(90-day

More information

Electronics Workshop. Jessie Liu

Electronics Workshop. Jessie Liu Electronics Workshop Jessie Liu 1 Return Kit Servos Servo Extensions Controller Analog USB/Tether Serial WiFi key (2) (2) Digital i/o Servo Power Adaptor AAA Battery Charger motors/ servos (4) Servo Mounting

More information

AN INTRODUCTION TO CIRCUIT BENDING By Tom Bugs

AN INTRODUCTION TO CIRCUIT BENDING By Tom Bugs AN INTRODUCTION TO CIRCUIT BENDING By Tom Bugs (tom@knowledgeofbugs.co.uk) SAFETY 1st 1 Electricity wants to zap you, so beware. Circuit Bending should only be attempted on devices running off batteries.

More information

LESSON 2 VARIABLES, OPERATORS, EXPRESSIONS, AND USER INPUT

LESSON 2 VARIABLES, OPERATORS, EXPRESSIONS, AND USER INPUT LESSON VARIABLES, OPERATORS, EXPRESSIONS, AND USER INPUT PROF. JOHN P. BAUGH PROFJPBAUGH@GMAIL.COM PROFJPBAUGH.COM CONTENTS INTRODUCTION... Assumptions.... Variables and Data Types..... Numeric Data Types:

More information

UV Mapping to avoid texture flaws and enable proper shading

UV Mapping to avoid texture flaws and enable proper shading UV Mapping to avoid texture flaws and enable proper shading Foreword: Throughout this tutorial I am going to be using Maya s built in UV Mapping utility, which I am going to base my projections on individual

More information

two using your LensbAby

two using your LensbAby two Using Your Lensbaby 28 Lensbaby Exposure and the Lensbaby When you attach your Lensbaby to your camera for the first time, there are a few settings to review so that you can start taking photos as

More information

Word: Print Address Labels Using Mail Merge

Word: Print Address Labels Using Mail Merge Word: Print Address Labels Using Mail Merge No Typing! The Quick and Easy Way to Print Sheets of Address Labels Here at PC Knowledge for Seniors we re often asked how to print sticky address labels in

More information

The Perils of Floating Point

The Perils of Floating Point The Perils of Floating Point by Bruce M. Bush Copyright (c) 1996 Lahey Computer Systems, Inc. Permission to copy is granted with acknowledgement of the source. Many great engineering and scientific advances

More information

ORB Education Quality Teaching Resources

ORB Education Quality Teaching Resources JavaScript is one of the programming languages that make things happen in a web page. It is a fantastic way for students to get to grips with some of the basics of programming, whilst opening the door

More information

Numerical Precision. Or, why my numbers aren t numbering right. 1 of 15

Numerical Precision. Or, why my numbers aren t numbering right. 1 of 15 Numerical Precision Or, why my numbers aren t numbering right 1 of 15 What s the deal? Maybe you ve seen this #include int main() { float val = 3.6f; printf( %.20f \n, val); Print a float with

More information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information