Variable Manipulator Driver. Installation and Usage Guide. Revision: 1.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Size: px
Start display at page:

Download "Variable Manipulator Driver. Installation and Usage Guide. Revision: 1.0 Date: Monday, July 10, 2017 Authors: Alan Chow"

Transcription

1 Variable Manipulator Driver Installation and Usage Guide Revision: 1.0 Date: Monday, July 10, 2017 Authors: Alan Chow

2 Contents Overview... 3 Usage Scenarios... 3 Features... 3 Change Log... 4 Driver Installation... 4 Adding the driver to your project... 5 Adding multiple variables to a string... 6 Performing mathematical equations... 7 Math Function and Operators... 8 math.abs... 8 math.acos, math.asin... 8 math.atan... 9 math.ceil, math.floor... 9 math.cos, math.sin, math.tan... 9 math.deg, math.rad math.exp, math.log math.min, math.max math.modf math.sqrt math.random, math.pi How to use variables Licencing Summary STEP 1 - Creating your project on drivercentral STEP 2 Purchase driver licence STEP 3 Install and activate the drivercentral cloud driver STEP 4 Install Chowmain driver Page 2

3 Overview The Chowmain Variable Manipulator driver for Control4 provides variable manipulation capabilities for use in Control4 programming. This can be used to add multiple variables to a string or to perform mathematical equations using variables. This makes Control4 programming more flexible. Usage Scenarios This driver can be used for several different scenarios. Some examples are as below but the limit is really your imagination. Showing text and 1 or more variables on the announcement agent (rather than just text or just the variable value). Adding multiple variables together or performing math on the variable. Formatting numbers into values that are more human friendly (eg percentages or fractions) for use in notifications, s or announcements Features Add 1 or more variables into a string (can be any variable including string, numbers, Boolean or device). Perform pretty much any form of math you want including complicated formulas. o Page 3

4 Change Log Version # JUL-2014 Initial Release Driver Installation 1. The driver you have downloaded will be in a zip file. Double click on this file to open it in your preferred zip program (WinZip, WinRar, etc.). 2. Extract the c4i file to the My Documents\Control4\Drivers directory. If you are using Windows 7 or 8 this will be extracted to the Libraries\Documents\Control4\Drivers directory. 3. You are now ready to add and configure the driver via the Composer Pro software. Page 4

5 Adding the driver to your project IMPORTANT Before undertaking the installation of the driver please follow the licencing steps outlined at the end of this document. 1. Launch the Composer Pro application and connect to your project 2. In the System Design page select the Search tab on the right hand side. 3. Type in Variable Manipulator in the search field 4. Double click on the Variable Manipulator driver to add it to your project 5. Highlight the Variable Manipulator driver on the left hand side. 6. Congratulations you have setup the Variable Manipulator driver. Now you re ready to perform some programming. Page 5

6 Adding multiple variables to a string 1. Click on the Programming Tab 2. Select the event you want to get an from. 3. Under Device Actions select the Variable Manipulator driver 4. Under the Variable Manipulator select radio button next to Device Specific Command 5. In the dropdown box select the Create String. 6. It will prompt you to type out the string you want. Note to add variables to the string you need to do so in the PARAM{XXX,YYY} format. For more information on this please see the section in this document labelled How to use Variables. 7. Drag and drop the green arrow onto the script section. 8. Congratulations you have combined variables into a string. To verify it has been done please see the driver properties or use the SNMP agent. Page 6

7 Performing mathematical equations 1. Click on the Programming Tab 2. Select the event you want to get an from. 3. Under Device Actions select the Variable Manipulator driver 4. Under the Variable Manipulator select radio button next to Device Specific Command 5. In the dropdown box select the Calculate Equation. 6. It will prompt you to type out the equation you want. Note to add variables to the string you need to do so in the PARAM{XXX,YYY} format. For more information on this please see the section in this document labelled How to use Variables. For more information about math functions and operators please see the section labelled Math Function and Operators 7. Drag and drop the green arrow onto the script section. 8. Congratulations you have performed an equation. To verify it has been done please see the driver properties or use the SNMP agent. Page 7

8 Math Function and Operators Control4 offers basic Mathematic operations on variables in the programming tab. This is limited to setting a value, randomizing a value, incrementing or decrementing values and setting to the value of another variable. The Calculate Equation action in the driver allows you to type out your mathematical formula to manipulate the value of one or more variables that allow for more complex and useful math. This is useful for conversion of numbers, formatting of numbers and for various mathematical formulas you may require. The driver supports the usual arithmetic operators: the binary `+ (addition), `- (subtraction), `* (multiplication), `/ (division), and the unary `- (negation). All of them operate on real numbers. It also supports a more advanced math library which is detailed below. math.abs Return the absolute, or non-negative value, of a given value. > = math.abs(-100) 100 > = math.abs(25.67) > = math.abs(0) 0 math.acos, math.asin Return the inverse cosine and sine in radians of the given value. > = math.acos(1) 0 > = math.acos(0) > = math.asin(0) 0 > = math.asin(1) Page 8

9 math.atan Return the inverse tangent in radians. We can do this by supplying y/x ourselves or we can pass y and x to math.atan to do this for us. > c, s = math.cos(0.8), math.sin(0.8) > = math.atan(s/c) 0.8 > = math.atan(s,c) 0.8 Using two arguments should usually be preferred, particularly when converting rectangular co-ordinates to polar coordinates. It will use the sign of both arguments to place the result into the correct quadrant, and also produces correct values when one of its arguments is 0 or very close to 0. > = math.atan(1, 0), math.atan(-1, 0), math.atan(0, 1), math.atan(0, -1) math.ceil, math.floor Return the integer no greater than or no less than the given value (even for negatives). > = math.floor(0.5) 0 > = math.ceil(0.5) 1 > = math.floor(-0.5) -1 > = math.ceil(-0.5) -0 math.cos, math.sin, math.tan Return the cosine, sine and tangent value for a given value in radians. > = math.cos(math.pi / 4) > = math.sin(0.123) > = math.tan(5/4) > = math.tan(.77) Page 9

10 math.deg, math.rad Convert from radians to degrees and vice versa. > = math.deg(math.pi) 180 > = math.deg(math.pi / 2) 90 > = math.rad(180) > = math.rad(1) math.exp, math.log math.exp(myval) returns e (the base of natural logarithms) raised to the power myval. math.log() returns the inverse of this. math.exp(1) returns e. > = math.exp(0) 1 > = math.exp(1) > = math.exp(27) > = math.log( ) > = math.log(3) math.min, math.max Return the minimum or maximum value from a variable length list of arguments. > = math.min(1,2) 1 > = math.min(1.2, 7, 3) 1.2 > = math.min(1.2, -7, 3) -7 > = math.max(1.2, -7, 3) 3 > = math.max(1.2, 7, 3) 7 Page 10

11 math.modf Return the integral and fractional parts of the given number. > = math.modf(5) 5 0 > = math.modf(5.3) > = math.modf(-5.3) If you want the modulus (remainder), look for the modulo % operator instead.[2] math.sqrt Return the square root of a given number. Only non-negative arguments are allowed. > = math.sqrt(100) 10 > = math.sqrt(1234) > = math.sqrt(-7) -1.#IND Page 11

12 math.random, math.random() generates pseudo-random numbers uniformly distributed. Supplying argument alters its behaviour: math.random() with no arguments generates a real number between 0 and 1. math.random(upper) generates integer numbers between 1 and upper. math.random(lower, upper) generates integer numbers between lower and upper. > = math.random() > = math.random() > = math.random(100) 20 > = math.random(100) 81 > = math.random(70,80) 76 > = math.random(70,80) 75 upper and lower must be integer. In other case Lua casts upper into an integer, sometimes giving math.floor(upper) and others math.ceil(upper), with unexpected results (the same for lower). math.pi This is a part of the constant Pi. > = math.pi Page 12

13 How to use variables 1. In the programming tab create an action with the variable you want to get. 2. Right click and click on Copy 3. Open a text editor (notepad is available on all versions of windows) and paste the copied content. 4. Take note of the DeviceID and the owneriditem numbers (the above example is and 71) 5. Follow the steps in the section of the document labelled Sending an . To use the parameter type in PARAM{x,y} where x is the DeviceID and Y is the owneriditem (variable id). EG. The current lighting level is PARAM{100001,71} percent. Page 13

14 Licencing Chowmain drivers require a valid licence to use the driver. Drivers can be purchased from our distributor drivercentral however all Chowmain drivers come with a 7 day trial. We recommend that prior to purchasing a driver that you test the driver out to ensure that it will work with your hardware and will meet your requirements. The licencing procedure is broken down into 4 steps. A summary of the steps are below along however we have also provided detailed steps if the summary is not sufficient. Summary 1. Create your project on the drivercentral.io website (This will generate a specific token which you will use in the next step) 2. Download, install and activate the drivercentral cloud driver in your project (Only once per project. Use the token generated in step 1) 3. (Optional) To try a driver, simply download it and install it in your project 4. To purchase a driver: a. On drivercentral, purchase a license and register it to your project b. If the driver is not already installed in your project, download it and install it c. If necessary, use the cloud driver s Action: Check Drivers to force licence download to the project. STEP 1 - Creating your project on drivercentral 1. Visit 2. Log into your driver Central dealer account. 3. Visit the Project Portal 4. Click on Create Project Page 14

15 5. It will prompt you for a project name. Type in a meaningful name for your customer s project 6. Click on Create Project 7. Click on the project we just created to expand the project 8. Take note of the Project Token as this will be used in STEP 3 when we install the drivercentral cloud driver. Page 15

16 STEP 2 Purchase driver licence 1. Visit and find the product/driver you want to purchase a licence for. 2. Click on the Add to Cart button 3. Click on the Shopping Cart icon in the top right corner and click on View cart 4. Confirm that your order is correct and click on Proceed to checkout 5. Follow the prompts and click on Sib,ot,u Prder 6. This will take you to PayPal for payment. 7. Pay via PayPal. It will automatically return to the marketplace when confirmed. 8. You will now be at a page where you can see your purchased licence. Page 16

17 9. From here assign the licence to the project we created or if you did not follow that step create a new project STEP 3 Install and activate the drivercentral cloud driver NOTE: Only one instance of the drivercentral cloud driver installed per project. Do not install additional cloud drivers. 1. Visit 2. Log into your driver Central dealer account. 3. Visit the Project Portal 4. Click on Download Cloud Driver 5. Copy the C4Z driver to My Documents\Control4\Drivers directory. 6. Add the driver to your project. Page 17

18 7. Click on the driver to view it s properties 8. Type in the project token we took note of in STEP Click on the Actions tab 10. Click on Check Drivers STEP 4 Install Chowmain driver 1. Install the Chowmain driver 2. You will notice that the Activation Status reflects a Licence Activated state. 3. Any driver that does not have a purchased licence will have a trial licence activated via the marketplace. Note that there is no way to reactivate the trial so please use wisely. 4. If you do not then press the Check Drivers action in the drivercentral Cloud driver again. Page 18

Experience Button Suite. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Experience Button Suite. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Experience Button Suite Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 3 Features... 3 Change Log... 5 Important Notice... 5 Driver Installation...

More information

RF11 R Smart Guard Remote 11 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

RF11 R Smart Guard Remote 11 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow RF11 R Smart Guard Remote 11 Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 3 Change Log... 4 Driver Installation...

More information

Generic Lighting Dimmer Driver (IR) Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Generic Lighting Dimmer Driver (IR) Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Generic Lighting Dimmer Driver (IR) Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 2 Change Log... 3 Important Notice... 3

More information

SMTP Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

SMTP  Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow SMTP Email Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 3 Usage Scenarios... 3 Features... 4 Change Log... 5 Disclaimer... 5 Driver

More information

Sainsmart imatic v2 Driver Installation and Usage Guide

Sainsmart imatic v2 Driver Installation and Usage Guide Sainsmart imatic v2 Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 2 Change Log... 3 SainSmart imatic V2 Device Setup...

More information

Sainsmart NCS1 Driver Installation and Usage Guide

Sainsmart NCS1 Driver Installation and Usage Guide Sainsmart NCS1 Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 2 Change Log... 3 SainSmart NCS1 Device Setup... 3 Driver

More information

ControlByWeb X-320 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

ControlByWeb X-320 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow ControlByWeb X-320 Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 3 Important Notice... 4 Driver Installation... 4 Adding

More information

Big Ass Solutions Haiku Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Big Ass Solutions Haiku Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Big Ass Solutions Haiku Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 3 Driver Installation... 3 Adding the driver

More information

Relay to Light Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Relay to Light Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Relay to Light Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 2 Change Log... 3 Important Notice... 3 Driver Installation...

More information

Pushsafer Notification Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Pushsafer Notification Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Pushsafer Notification Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Usage Scenarios... 3 Features... 4 Change Log... 5 Disclaimer...

More information

Pakedge Intelligent PDU Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Pakedge Intelligent PDU Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Pakedge Intelligent PDU Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 3 Change Log... 4 Important Notice... 4 Driver

More information

TP-Link LBXXX Driver. Installation and Usage Guide. Revision: 1.0 Date: Thursday, May 17, 2018 Authors: Alan Chow

TP-Link LBXXX Driver. Installation and Usage Guide. Revision: 1.0 Date: Thursday, May 17, 2018 Authors: Alan Chow TP-Link LBXXX Driver Installation and Usage Guide Revision: 1.0 Date: Thursday, May 17, 2018 Authors: Alan Chow Contents Overview... 2 Features... 3 Automatic Discovery... 3 Self Healing on IP Address

More information

Holiday Driver. Installation and Usage Guide. Revision: 1.0 Date: Wednesday, October 25, 2017 Authors: Alan Chow

Holiday Driver. Installation and Usage Guide. Revision: 1.0 Date: Wednesday, October 25, 2017 Authors: Alan Chow Holiday Driver Installation and Usage Guide Revision: 1.0 Date: Wednesday, October 25, 2017 Authors: Alan Chow Contents Overview... 2 Features... 3 Use Cases... 3 Change Log... 4 Disclaimer... 4 Driver

More information

Vivotek IP Camera Driver. Installation and Usage Guide. Revision: 1.0 Date: Monday, November 06, 2017 Authors: Alan Chow

Vivotek IP Camera Driver. Installation and Usage Guide. Revision: 1.0 Date: Monday, November 06, 2017 Authors: Alan Chow Vivotek IP Camera Driver Installation and Usage Guide Revision: 1.0 Date: Monday, November 06, 2017 Authors: Alan Chow Contents Overview... 2 Features... 3 Change Log... 3 Purchase & Support... 3 Developer

More information

Plex Media Server Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Plex Media Server Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Plex Media Server Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 3 Features... 3 Why use Plex Media Server?... 4 Process in a nutshell...

More information

Generic Security System Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Generic Security System Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Generic Security System Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Use Case Scenarios... 3 Features... 3 Security Panel Requirements...

More information

Microsoft Surface Hub Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, October 23, 2017 Authors: Alan Chow

Microsoft Surface Hub Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, October 23, 2017 Authors: Alan Chow Microsoft Surface Hub Driver Installation and Usage Guide Revision: 3.0 Date: Monday, October 23, 2017 Authors: Alan Chow Contents Overview... 3 Features... 3 FAQ... 4 Change Log... 5 Developer Information...

More information

Sky New Zealand Channels Driver. Installation and Usage Guide. Revision: 3.0 Date: Thursday, November 15, 2018 Authors: Alan Chow

Sky New Zealand Channels Driver. Installation and Usage Guide. Revision: 3.0 Date: Thursday, November 15, 2018 Authors: Alan Chow Sky New Zealand Channels Driver Installation and Usage Guide Revision: 3.0 Date: Thursday, November 15, 2018 Authors: Alan Chow Contents Overview... 2 Features... 3 FAQ... 3 Change Log... 4 Developer Information...

More information

Daikin SkyFi Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Daikin SkyFi Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Daikin SkyFi Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 3 Change Log... 3 Disclaimer... 3 SkyFi Controller Compatiblity...

More information

TP-Link HS1XX Driver. Installation and Usage Guide. Revision: 1.0 Date: Tuesday, February 06, 2018 Authors: Alan Chow

TP-Link HS1XX Driver. Installation and Usage Guide. Revision: 1.0 Date: Tuesday, February 06, 2018 Authors: Alan Chow TP-Link HS1XX Driver Installation and Usage Guide Revision: 1.0 Date: Tuesday, February 06, 2018 Authors: Alan Chow Contents Overview... 2 Features... 3 Change Log... 3 HS1XX Device Setup... 3 Driver Installation...

More information

Video Storm IRUSB Driver. Installation and Usage Guide. Revision: 1.1 Date: Tuesday, February 27, 2018 Authors: Alan Chow

Video Storm IRUSB Driver. Installation and Usage Guide. Revision: 1.1 Date: Tuesday, February 27, 2018 Authors: Alan Chow Video Storm IRUSB Driver Installation and Usage Guide Revision: 1.1 Date: Tuesday, February 27, 2018 Authors: Alan Chow Contents Overview... 3 Features... 3 Change Log... 5 Important Notice... 5 Driver

More information

Belkin WeMo Switch Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Belkin WeMo Switch Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Belkin WeMo Switch Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 2 Features... 3 Change Log... 3 Important Notice... 4 Driver Installation...

More information

Plex Home Theater Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Plex Home Theater Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Plex Home Theater Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 3 Features... 3 Change Log... 4 Important Notice... 4 Driver Installation...

More information

Orvibo WiWo S20 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Orvibo WiWo S20 Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Orvibo WiWo S20 Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 3 FAQ... 4 Features... 3 Change Log... 5 Important Notice... 5 Driver

More information

Saturn Mini CT (SS9000/SS9007) Product and Driver Installation Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Gareth Sanders, Alan Chow

Saturn Mini CT (SS9000/SS9007) Product and Driver Installation Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Gareth Sanders, Alan Chow Saturn Mini CT (SS9000/SS9007) Product and Driver Installation Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Gareth Sanders, Alan Chow Contents Overview... 3 Section 1: Device Installation...

More information

IFTTT Maker Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

IFTTT Maker Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow IFTTT Maker Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 3 Examples... 4 Outbound Examples (Control4 > IFTTT)... 4 Inbound Examples

More information

12. Numbers. Java. Summer 2008 Instructor: Dr. Masoud Yaghini

12. Numbers. Java. Summer 2008 Instructor: Dr. Masoud Yaghini 12. Numbers Java Summer 2008 Instructor: Dr. Masoud Yaghini Outline Numeric Type Conversions Math Class References Numeric Type Conversions Numeric Data Types (Review) Numeric Type Conversions Consider

More information

Generic IR Thermostat driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow & Sam Edwards

Generic IR Thermostat driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow & Sam Edwards Generic IR Thermostat driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow & Sam Edwards Contents Solution Overview.... 3 Section 1: Hardware Installation procedure....

More information

CS110: PROGRAMMING LANGUAGE I

CS110: PROGRAMMING LANGUAGE I CS110: PROGRAMMING LANGUAGE I Computer Science Department Lecture 8: Methods Lecture Contents: 2 Introduction Program modules in java Defining Methods Calling Methods Scope of local variables Passing Parameters

More information

JAVASCRIPT BASICS. JavaScript Math Functions. The Math functions helps you to perform mathematical tasks

JAVASCRIPT BASICS. JavaScript Math Functions. The Math functions helps you to perform mathematical tasks JavaScript Math Functions Functions The Math functions helps you to perform mathematical tasks in a very way and lot of inbuilt mathematical functions which makes the programmers life easier. Typical example

More information

This is an example configuration for this hack with comments explaining how it works.

This is an example configuration for this hack with comments explaining how it works. About Custom Files Synopsis This hack adds the ability to override files in the base game, load additional files with other files, redirect files, occlude files and dynamically build or redirect files

More information

Logitech G-series Lua API V3.02. Overview and Reference Logitech

Logitech G-series Lua API V3.02. Overview and Reference Logitech Logitech G-series Lua API V3.02 Overview and Reference 2006-2009 Logitech Contents Contents... 2 Overview... 3 Reference... 4 Standard Lua 5.1 Libraries... 34 Appendix A... 35 Overview The G-series Lua

More information

Downloaded from Chapter 2. Functions

Downloaded from   Chapter 2. Functions Chapter 2 Functions After studying this lesson, students will be able to: Understand and apply the concept of module programming Write functions Identify and invoke appropriate predefined functions Create

More information

Calculations, Formatting and Conversions

Calculations, Formatting and Conversions Chapter 5 Calculations, Formatting and Conversions What is in This Chapter? In this chapter we discuss how to do basic math calculations as well as use some readily available Math functions in JAVA. We

More information

Chapter 5 Methods. Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved.

Chapter 5 Methods. Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved. Chapter 5 Methods 1 Opening Problem Find the sum of integers from 1 to 10, from 20 to 30, and from 35 to 45, respectively. 2 Problem int sum = 0; for (int i = 1; i

More information

! Widely available. ! Widely used. ! Variety of automatic checks for mistakes in programs. ! Embraces full set of modern abstractions. Caveat.

! Widely available. ! Widely used. ! Variety of automatic checks for mistakes in programs. ! Embraces full set of modern abstractions. Caveat. Why Java? Lecture 2: Intro to Java Java features.! Widely available.! Widely used.! Variety of automatic checks for mistakes in programs.! Embraces full set of modern abstractions. Caveat.! No perfect

More information

Chapter 3 : Computer Science. Class XI ( As per CBSE Board) Data Handling. Visit : python.mykvs.in for regular updates

Chapter 3 : Computer Science. Class XI ( As per CBSE Board) Data Handling. Visit : python.mykvs.in for regular updates Chapter 3 : Computer Science Class XI ( As per CBSE Board) Data Handling Introduction Most of the computer programming language support data type, variables,operator and expression like fundamentals.python

More information

9 Using Equation Networks

9 Using Equation Networks 9 Using Equation Networks In this chapter Introduction to Equation Networks 244 Equation format 247 Using register address lists 254 Setting up an enable contact 255 Equations displayed within the Network

More information

Various useful classes

Various useful classes Various useful classes String manipulation Mathematical functions Standard input / output File input / output Various system features Hashtable Useful graphical classes String manipulation a string is

More information

Kodi Lite Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow

Kodi Lite Driver. Installation and Usage Guide. Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Kodi Lite Driver Installation and Usage Guide Revision: 3.0 Date: Monday, July 10, 2017 Authors: Alan Chow Contents Overview... 3 Features... 4 FAQ... 5 Change Log... 6 Purchase & Support... 8 Developer

More information

IFTTT Maker Driver. White Good Appliance Examples. Revision: 1.0 Date: Monday, November 07, 2016 Authors: Alan Chow

IFTTT Maker Driver. White Good Appliance Examples. Revision: 1.0 Date: Monday, November 07, 2016 Authors: Alan Chow IFTTT Maker Driver White Good Appliance Examples Revision: 1.0 Date: Monday, November 07, 2016 Authors: Alan Chow Contents Overview... 2 Adding the Vacuum Experience Button... 3 Programming the Experience

More information

Operators. Java operators are classified into three categories:

Operators. Java operators are classified into three categories: Operators Operators are symbols that perform arithmetic and logical operations on operands and provide a meaningful result. Operands are data values (variables or constants) which are involved in operations.

More information

To define methods, invoke methods, and pass arguments to a method ( ). To develop reusable code that is modular, easy-toread, easy-to-debug,

To define methods, invoke methods, and pass arguments to a method ( ). To develop reusable code that is modular, easy-toread, easy-to-debug, 1 To define methods, invoke methods, and pass arguments to a method ( 5.2-5.5). To develop reusable code that is modular, easy-toread, easy-to-debug, and easy-to-maintain. ( 5.6). To use method overloading

More information

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University CS5000: Foundations of Programming Mingon Kang, PhD Computer Science, Kennesaw State University Mathematical Functions Java provides many useful methods in the Math class for performing common mathematical

More information

Lecture 2: Intro to Java

Lecture 2: Intro to Java Why Java? Lecture 2: Intro to Java Java features. Widely available. Widely used. Variety of automatic checks for mistakes in programs. Embraces full set of modern abstractions. 2 Why Java? Why Java? Java

More information

Document Maker 1.0 User Guide

Document Maker 1.0 User Guide Document Maker 1.0 User Guide Copyright Copyright 2008-2013 BoostSolutions Co., Ltd. All rights reserved. All materials contained in this publication are protected by Copyright and no part of this publication

More information

Chapter 4 Mathematical Functions, Characters, and Strings

Chapter 4 Mathematical Functions, Characters, and Strings Chapter 4 Mathematical Functions, Characters, and Strings Liang, Introduction to Java Programming, Tenth Edition, Global Edition. Pearson Education Limited 2015 1 Motivations Suppose you need to estimate

More information

CSI31 Lecture 5. Topics: 3.1 Numeric Data Types 3.2 Using the Math Library 3.3 Accumulating Results: Factorial

CSI31 Lecture 5. Topics: 3.1 Numeric Data Types 3.2 Using the Math Library 3.3 Accumulating Results: Factorial CSI31 Lecture 5 Topics: 3.1 Numeric Data Types 3.2 Using the Math Library 3.3 Accumulating Results: Factorial 1 3.1 Numberic Data Types When computers were first developed, they were seen primarily as

More information

Mathematical Functions, Characters, and Strings. CSE 114, Computer Science 1 Stony Brook University

Mathematical Functions, Characters, and Strings. CSE 114, Computer Science 1 Stony Brook University Mathematical Functions, Characters, and Strings CSE 114, Computer Science 1 Stony Brook University http://www.cs.stonybrook.edu/~cse114 1 Static methods Remember the main method header? public static void

More information

Chapter 5 Methods / Functions

Chapter 5 Methods / Functions Chapter 5 Methods / Functions 1 Motivations A method is a construct for grouping statements together to perform a function. Using a method, you can write the code once for performing the function in a

More information

AP Computer Science. Return values, Math, and double. Copyright 2010 by Pearson Education

AP Computer Science. Return values, Math, and double. Copyright 2010 by Pearson Education AP Computer Science Return values, Math, and double Distance between points Write a method that given x and y coordinates for two points prints the distance between them If you can t do all of it, pseudocode?

More information

Week 2: Console I/O and Operators Arithmetic Operators. Integer Division. Arithmetic Operators. Gaddis: Chapter 3 (2.14,3.1-6,3.9-10,5.

Week 2: Console I/O and Operators Arithmetic Operators. Integer Division. Arithmetic Operators. Gaddis: Chapter 3 (2.14,3.1-6,3.9-10,5. Week 2: Console I/O and Operators Gaddis: Chapter 3 (2.14,3.1-6,3.9-10,5.1) CS 1428 Fall 2014 Jill Seaman 1 2.14 Arithmetic Operators An operator is a symbol that tells the computer to perform specific

More information

Introduction to Computer Science Unit 2. Notes

Introduction to Computer Science Unit 2. Notes Introduction to Computer Science Unit 2. Notes Name: Objectives: By the completion of this packet, students should be able to describe the difference between.java and.class files and the JVM. create and

More information

AP Computer Science A. Return values

AP Computer Science A. Return values AP Computer Science A Return values Distance between points Write a method that given x and y coordinates for two points prints the distance between them Pseudocode? Java's Math class Method name Math.abs(value)

More information

1.1 Your First Program! Naive ideal. Natural language instructions.

1.1 Your First Program! Naive ideal. Natural language instructions. Why Programming? Why programming? Need to tell computer what you want it to do. 1.1 Your First Program Naive ideal. Natural language instructions. Please simulate the motion of these heavenly bodies, subject

More information

CS 1110, LAB 2: FUNCTIONS AND ASSIGNMENTS

CS 1110, LAB 2: FUNCTIONS AND ASSIGNMENTS CS 1110, LAB 2: FUNCTIONS AND ASSIGNMENTS http://www.cs.cornell.edu/courses/cs1110/2017fa/labs/lab2/ First Name: Last Name: NetID: The purpose of this lab is to get you comfortable with using assignment

More information

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University Lesson #3 Variables, Operators, and Expressions Variables We already know the three main types of variables in C: int, char, and double. There is also the float type which is similar to double with only

More information

Goals for This Lecture:

Goals for This Lecture: Goals for This Lecture: Understand integer arithmetic Understand mixed-mode arithmetic Understand the hierarchy of arithmetic operations Introduce the use of intrinsic functions Real Arithmetic Valid expressions

More information

IFTTT Maker Driver. Microsoft Cortana Examples. Revision: 1.0 Date: Thursday, February 22, 2018 Authors: Alan Chow

IFTTT Maker Driver. Microsoft Cortana Examples. Revision: 1.0 Date: Thursday, February 22, 2018 Authors: Alan Chow IFTTT Maker Driver Microsoft Cortana Examples Revision: 1.0 Date: Thursday, February 22, 2018 Authors: Alan Chow Contents Overview... 2 Setting up Cortana on Windows 10 to always listen... 3 Programming

More information

A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN

A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN 978-0-13-216675-1 Chapter 7 Functions and Randomness 1 Predefined Functions recall: in

More information

A Balanced Introduction to Computer Science, 3/E

A Balanced Introduction to Computer Science, 3/E A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN 978-0-13-216675-1 Chapter 7 Functions and Randomness 1 Predefined Functions recall: in

More information

Chapter 5 Methods. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved.

Chapter 5 Methods. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. Chapter 5 Methods 1 Opening Problem Find the sum of integers from 1 to 10, from 20 to 30, and from 35 to 45, respectively. 2 Problem int sum = 0; for (int i = 1; i

More information

Chapter 5 Methods. Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved.

Chapter 5 Methods. Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved. Chapter 5 Methods rights reserved. 0132130807 1 Opening Problem Find the sum of integers from 1 to 10, from 20 to 30, and from 35 to 45, respectively. rights reserved. 0132130807 2 1 Problem int sum =

More information

1.1 Your First Program

1.1 Your First Program 1.1 Your First Program Introduction to Programming in Java: An Interdisciplinary Approach Robert Sedgewick and Kevin Wayne Copyright 2002 2010 5/20/2013 9:37:22 AM Why Programming? Why programming? Need

More information

Lecture 6: While Loops and the Math Class

Lecture 6: While Loops and the Math Class Lecture 6: While Loops and the Math Class Building Java Programs: A Back to Basic Approach by Stuart Reges and Marty Stepp Copyright (c) Pearson 2013. All rights reserved. while loops 2 Categories of loops

More information

CHAPTER 3: CORE PROGRAMMING ELEMENTS

CHAPTER 3: CORE PROGRAMMING ELEMENTS Variables CHAPTER 3: CORE PROGRAMMING ELEMENTS Introduction to Computer Science Using Ruby A variable is a single datum or an accumulation of data attached to a name The datum is (or data are) stored in

More information

Programming Training. Main Points: - Python Statements - Problems with selections.

Programming Training. Main Points: - Python Statements - Problems with selections. Programming Training Main Points: - Python Statements - Problems with selections. print() print(value1, value2, ) print( var =, var1) # prints the text var= followed by the value of var print( Here is

More information

COSC 236 Section 101 Computer Science 1 -- Prof. Michael A. Soderstrand

COSC 236 Section 101 Computer Science 1 -- Prof. Michael A. Soderstrand COSC 236 Section 101 Computer Science 1 -- Prof. Michael A. Soderstrand COSC 236 Web Site You will always find the course material at: http://www.class-notes.us From this site you can click on the COSC-236

More information

1.1 Your First Program

1.1 Your First Program Why Programming? Idealized computer. "Please simulate the motion of a system of N heavenly bodies, subject to Newton's laws of motion and gravity." 1.1 Your First Program Prepackaged software solutions.

More information

Chapter 5 Methods. Lecture notes for computer programming 1 Faculty of Engineering and Information Technology Prepared by: Iyad Albayouk

Chapter 5 Methods. Lecture notes for computer programming 1 Faculty of Engineering and Information Technology Prepared by: Iyad Albayouk Chapter 5 Methods Lecture notes for computer programming 1 Faculty of Engineering and Information Technology Prepared by: Iyad Albayouk ١ Introducing Methods A method is a collection of statements that

More information

Outline. Data and Operations. Data Types. Integral Types

Outline. Data and Operations. Data Types. Integral Types Outline Data and Operations Data Types Arithmetic Operations Strings Variables Declaration Statements Named Constant Assignment Statements Intrinsic (Built-in) Functions Data and Operations Data and Operations

More information

Mathematical Functions, Characters, and Strings. CSE 114, Computer Science 1 Stony Brook University

Mathematical Functions, Characters, and Strings. CSE 114, Computer Science 1 Stony Brook University Mathematical Functions, Characters, and Strings CSE 114, Computer Science 1 Stony Brook University http://www.cs.stonybrook.edu/~cse114 1 Static methods Remember the main method header? public static void

More information

FAQ No. 53. ihost: Logic Points. Roles and Privileges. Adding and removing logic points. Accessing and using the Logic Editor

FAQ No. 53. ihost: Logic Points. Roles and Privileges. Adding and removing logic points. Accessing and using the Logic Editor ihost: Logic Points In addition to displaying values reported by a unit, ihost supports adding additional logic points to a unit and calculating the value based on a custom logic expression. On calculation

More information

VBScript: Math Functions

VBScript: Math Functions C h a p t e r 3 VBScript: Math Functions In this chapter, you will learn how to use the following VBScript functions to World Class standards: 1. Writing Math Equations in VBScripts 2. Beginning a New

More information

Lecture 2: Intro to Java

Lecture 2: Intro to Java Why Programming? Lecture 2: Intro to Java Idealized computer. "Please simulate the motion of a system of N heavenly bodies, subject to Newton's laws of motion and gravity." Prepackaged software solutions.

More information

Introduction to Computer Science Unit 2. Notes

Introduction to Computer Science Unit 2. Notes Introduction to Computer Science Unit 2. Notes Name: Objectives: By the completion of this packet, students should be able to describe the difference between.java and.class files and the JVM. create and

More information

Grade 8 FSA Mathematics Practice Test Guide

Grade 8 FSA Mathematics Practice Test Guide Grade 8 FSA Mathematics Practice Test Guide This guide serves as a walkthrough of the Grade 8 Florida Standards Assessments (FSA) Mathematics practice test. By reviewing the steps listed below, you will

More information

Introduction to Computer Programming CSCI-UA 2. Review Midterm Exam 1

Introduction to Computer Programming CSCI-UA 2. Review Midterm Exam 1 Review Midterm Exam 1 Review Midterm Exam 1 Exam on Monday, October 7 Data Types and Variables = Data Types and Variables Basic Data Types Integers Floating Point Numbers Strings Data Types and Variables

More information

1.1 Your First Program

1.1 Your First Program Why Programming? 1.1 Your First Program Why programming? Need to tell computer what to do. Please simulate the motion of N heavenly bodies, subject to Newton s laws of motion and gravity. Prepackaged software

More information

Chapter 6 Methods. Dr. Hikmat Jaber

Chapter 6 Methods. Dr. Hikmat Jaber Chapter 6 Methods Dr. Hikmat Jaber 1 Opening Problem Find the sum of integers from 1 to 10, from 20 to 30, and from 35 to 45, respectively. 2 Problem int sum = 0; for (int i = 1; i

More information

1.1 Your First Program

1.1 Your First Program 1.1 Your First Program Introduction to Programming in Java: An Interdisciplinary Approach Robert Sedgewick and Kevin Wayne Copyright 2002 2010 1/29/11 6:37 AM! Why Programming? Why programming? Need to

More information

An Introduction to Python for KS4!

An Introduction to Python for KS4! An Introduction to Python for KS4 Python is a modern, typed language - quick to create programs and easily scalable from small, simple programs to those as complex as GoogleApps. IDLE is the editor that

More information

1.1 Your First Program

1.1 Your First Program Why Programming? 1.1 Your First Program Why programming? Need to tell computer what you want it to do. Naive ideal. Natural language instructions. Please simulate the motion of these heavenly bodies, subject

More information

Dr Richard Greenaway

Dr Richard Greenaway SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 2 Basic MATLAB Operation Dr Richard Greenaway 2 Basic MATLAB Operation 2.1 Overview 2.1.1 The Command Line In this Workshop you will learn how

More information

1.1 Your First Program

1.1 Your First Program 1.1 Your First Program 1 Why Programming? Why programming? Need to tell computer what you want it to do. Naive ideal. Natural language instructions. Please simulate the motion of these heavenly bodies,

More information

CS 102 Lab 3 Fall 2012

CS 102 Lab 3 Fall 2012 Name: The symbol marks programming exercises. Upon completion, always capture a screenshot and include it in your lab report. Email lab report to instructor at the end of the lab. Review of built-in functions

More information

StreamOne Cloud Marketplace. Order and Management Guide

StreamOne Cloud Marketplace. Order and Management Guide StreamOne Cloud Marketplace Order and Management Guide StreamOne Cloud Marketplace Order and Management Table of Contents Navigating to the StreamOne Cloud Marketplace Creating a Quote Converting a Quote

More information

Computational Physics

Computational Physics Computational Physics Python Programming Basics Prof. Paul Eugenio Department of Physics Florida State University Jan 17, 2019 http://hadron.physics.fsu.edu/~eugenio/comphy/ Announcements Exercise 0 due

More information

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators JAVA Standard Edition Java - Basic Operators Java provides a rich set of operators to manipulate variables.

More information

Building Java Programs

Building Java Programs Building Java Programs Chapter 3 Lecture 3-2: Return; doubles and casting reading: 3.2, 4.1 videos: Ch. 3 #2 Copyright 2009 by Pearson Education Finish Car example Lecture outline Returns Java Math library

More information

CSC 120 Computer Science for the Sciences. Week 1 Lecture 2. UofT St. George January 11, 2016

CSC 120 Computer Science for the Sciences. Week 1 Lecture 2. UofT St. George January 11, 2016 CSC 120 Computer Science for the Sciences Week 1 Lecture 2 UofT St. George January 11, 2016 Introduction to Python & Foundations of computer Programming Variables, DataTypes, Arithmetic Expressions Functions

More information

Expressions in JavaScript. Jerry Cain CS 106AJ October 2, 2017

Expressions in JavaScript. Jerry Cain CS 106AJ October 2, 2017 Expressions in JavaScript Jerry Cain CS 106AJ October 2, 2017 What is JavaScript? JavaScript was developed at the Netscape Communications Corporation in 1995, reportedly by a single programmer in just

More information

Building Java Programs

Building Java Programs Building Java Programs Chapter 3 Lecture 3-2: Return values, Math, and double reading: 3.2, 2.1-2.2 Copyright 2011 by Pearson Education 2 Method name Math.abs(value) Math.ceil(value) Math.floor(value)

More information

CW High School. Advanced Math A. 1.1 I can make connections between the algebraic equation or description for a function, its name, and its graph.

CW High School. Advanced Math A. 1.1 I can make connections between the algebraic equation or description for a function, its name, and its graph. 1. Functions and Math Models (10.00%) 1.1 I can make connections between the algebraic equation or description for a function, its name, and its graph. 4 Pro cient I can make connections between the algebraic

More information

Building Java Programs

Building Java Programs Building Java Programs Chapter 3 Return values, Math, and double reading: 3.2, 2.1-2.2 Copyright 2011 by Pearson Education 2 Java's Math class Method name Math.abs(value) Math.ceil(value) Math.floor(value)

More information

FSA Geometry EOC Practice Test Guide

FSA Geometry EOC Practice Test Guide FSA Geometry EOC Practice Test Guide This guide serves as a walkthrough of the Florida Standards Assessments (FSA) Geometry End-of- Course (EOC) practice test. By reviewing the steps listed below, you

More information

Advanced Object Concepts

Advanced Object Concepts Understanding Blocks Blocks - Appears within any class or method, the code between a pair of curly braces Outside block- The first block, begins immediately after the method declaration and ends at the

More information

Module 1: Types and Expressions

Module 1: Types and Expressions Module 1: Types and Expressions Ron K. Cytron * Department of Computer Science and Engineering * Washington University in Saint Louis Thanks to Alan Waldman for comments that improved these slides Prepared

More information

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1 Solving equations and inequalities graphically and algebraically 1. Plot points on the Cartesian coordinate plane. P.1 2. Represent data graphically using scatter plots, bar graphs, & line graphs. P.1

More information

Key Concept: all programs can be broken down to a combination of one of the six instructions Assignment Statements can create variables to represent

Key Concept: all programs can be broken down to a combination of one of the six instructions Assignment Statements can create variables to represent Programming 2 Key Concept: all programs can be broken down to a combination of one of the six instructions Assignment Statements can create variables to represent information Input can receive information

More information