Lecture 7: Programming for the Arduino

Size: px
Start display at page:

Download "Lecture 7: Programming for the Arduino"

Transcription

1 Lecture 7: Programming for the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming C for the Arduino: more - Programming style Lect7-Page1 The hardware Lect7-Page2 1

2 Lecture 7: Programming for the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming C for the Arduino: more - Programming style Lect7-Page3 Programming environment Download software and driver from: (MAC OSX FTDI-Driver: Lect7-Page4 2

3 Lecture 7: Programming for the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming C for the Arduino: more - Programming style Lect7-Page5 Binary world, programming from Assembler to C Programmable, mechanical calculation machines (19th/early 20th cent. AD) Falcon (1728) Joseph-Marie Jacquard (1805) -> punchcard looms for work steps (program) Origins at China and also developed by the mathematician Leibniz (17th century AD) Positional numeral system which represents each number just with 2 symbols, 0 and 1 These values can be represented by voltage levels in electronic circuits For human use very inefficient but with electronic circuits it is possible to create very efficient arithmetic and logic units (ALUs) for the basic operations addition, subtraction, multiplication and division See: Rembold, Ulrich et. al.: Einführung in die Informatik für Naturwissenschaftler und Ingenieure. Hanser München Wien 1991 See: Download See: See: Rembold, Ulrich et. al.: Einführung in die Informatik für Naturwissenschaftler und Ingenieure. Hanser München Wien V Lect7-Page6 3

4 Binary world, programming from Assembler to C The machine instructions Assembler mnemonic: add ax, 1000 (short Assembler ) Assembler conversion Machine code (80x86): Operation code for add to accumulator high byte low byte Binary representation of number 1000 See: Download Lect7-Page7 Binary world, programming from Assembler to C Programming paradigm of the problem oriented computer language C++/C Procedural programming with structured programming as subset Code is splitted into several, reusable sections called procedures or functions with own scopes, which can be called at given code positions Logical procedure units are combined to modules Jumps (like goto) are not allowed E.g. C Case sensitive See: Download Lect7-Page8 4

5 Binary world, programming from Assembler to C From source code to machine instructions Source code in a specific computer language Assembler mnemonic (short Assembler ) Compiler translation and optimisation conversion Assembler/Disassembler Machine code (e.g. 80x86, ) The process of compilation is unidirectional. There are several representations of a solution for a specific task in problemoriented languages which results in the same representation in machine code. On the other hand the optimisation is not ideal, so that the knowledge about the results after comiplation can improve the runtime of a program. See: Download Lect7-Page9 Binary world, programming from Assembler to C Phase Programming Creation Compiler Source codes Source codes Preprocessor/ Compilation Object codes Library codes Linking Executables Runtime Load Executables Executable libraries Upload via USB Lect7-Page10 5

6 Lecture 7: Programming for the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming C for the Arduino: more - Programming style Lect7-Page11 Our first program: Blink (LED) Lect7-Page12 6

7 Memory Elements int, long, float, double, char, structures, Variables Arrays (e.g. int Ar[5];) Indexes start with 0!!! Pointers Lect7-Page13 = 1 Byte bin 0 * 2 0 = 0 * 1 = 0 dec 1 * 2 1 = 1 * 2 = 2 dec 0 * 2 2 = 0 * 4 = 0 dec 0 * 2 3 = 0 * 8 = 0 dec 1 * 2 4 = 0 * 16 = 16 dec 1 * 2 5 = 0 * 32 = 32 dec 0 * 2 6 = 0 * 64 = 0 dec 1 * 2 7 = 0 * 128 = 128 dec = 178 dec Lect7-Page14 7

8 Function has no return value true or false 1 byte character Same as byte (see byte ) 1 byte integer with a value from 0 to byte integer with a value from to byte unsigned integer with a value from 0 to Same as unsigned int (see unsigned int ) 4 byte integer with a value from to byte integer with a value from 0 to byte floating point (6 decimal digits precision) 4 byte floating point (15 decimal digits precision) e.g. char carray[128]; similar to array of any type C++ string object Array of any type See: Download Lect7-Page15 Pointer: Pointer: int *a = &a; <&a> Memory element: int a = 5; 5 Memory: Address of a Location of element in Memory (address) Lect7-Page16 8

9 Functions Functiondefinition int Add (int a, int b) { return a+b; } Functioncall X = Add (5, 6); => X=11 Lect7-Page17 Operators Standard operator: Assign =, Plus +, Minus -, Multiplication *, Division /, Modulo-Div. %, AND && (Bit-AND &) OR (Bit-OR ) NOT! Additional operators: Add one, subtract one: ++,--, (e.g. i++; is i=i+1) and a lot of others: +=, -=,, [, ], ->, *, Lect7-Page18 9

10 Comments // This is a comment /* This is also a comment */ Lect7-Page19 Interaction with users Serial write void setup() { // initialize serial communication: Serial.begin(9600); } void loop() { Serial.print( On ); // Write without new line Serial.println( Off ); // Wite with new line } AB AB AB Lect7-Page20 10

11 Application workflow Conditions if (iindex < 10) { Serial.print( A ); } else { Serial.print( B ); } Conditions switch (iindex) { case 1: Serial.print( A ); break; case 2: Serial.print( B ); break;... } Lect7-Page21 Realizing a state machine using switch condition int istate; void setup () { istate = 0; } calibration move void loop () { switch (istate) { case 0: //calibration istate = 1; break; case 1: // move just forward as long // as wall closer than 10 cm istate = 2; break; case 2:... } } Lect7-Page22 11

12 Application workflow Loops int i = 0; while (i < 10) { Serial.print(i); i = i +1; } Loops int i; for (i = 1; i < 10; i++) { Serial.print(i); } Lect7-Page23 Digital Pins Output Input Lect7-Page24 12

13 External modules (Libraries) Copy library modules to here Use module with #include < > Download from: Lect7-Page25 MAC OS X: If you are using Mac OS X, the libraries folder is hidden in the Arduino application: Right-click on Arduino.app, "Show package content", then put the library folder in "Contents/Resources/Java/hardware/libraries". Include the library using the menu in the IDE, or type #include <AFMotor.h> You are now ready to use the library. Lect7-Page26 13

14 Lecture 7: Programming for the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming C for the Arduino: more - Programming style Lect7-Page27 Motordriver for DC-motors: basic functionality Motor armature Commutator Carbon brush Lect7-Page28 14

15 Motordriver for DC-motors: basic functionality Motor armature Commutator Carbon brush Rotation direction GND Lect7-Page29 Motordriver for DC-motors: basic functionality (with driver IC L293 D) Motor armature Commutator Carbon brush Lect7-Page30 15

16 Motordriver for DC-motors: basic functionality (with driver IC L293 D) Rotation direction and On/Off +/- rotate forward -/+ rotate backward +/+ or -/- stop Enable = speed (PWM) GND Lect7-Page31 Motordriver for DC-motors: Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0 #3 #1 #4 #2 Lect7-Page32 16

17 Motordriver for DC-motors: Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0 // Use Adafruit module #include <AFMotor.h> // create motor #2, 64KHz pwm AF_DCMotor MotorRight(2, MOTOR12_64KHZ); // set the speed MotorRight.setSpeed(50); // Move forward for (int i=0;i<500;i++) { MotorRight.run(FORWARD); } MotorRight.run(RELEASE); // switch off // similar BACKWARD // MotorRight.run(BACKWARD); setup() loop() Lect7-Page33 Motordriver for step-motors (steppers): basic functionality Inductor 1 Inductor 2 2x resistance Lect7-Page34 17

18 Motordriver for step-motors (steppers): RN-Stepp297 Power Clock pulse for steps 5V GND Rotation direction Lect7-Page35 Motordriver for step-motors (steppers): RN-Stepp297 +5V or 0V Rotation direction Clock pulse for steps (PWM) 5V GND Lect7-Page36 18

19 Motordriver for step-motors (steppers): RN-Stepp297 - programming // Use stepper module #include <Stepper.h> // Create stepper class variable Stepper StepperLeft (steps, pin_direction, pin_clockpulse); e.g. StepperLeft (200, 8, 9) StepperRight (200, 7, 10) // set the speed of the motor to 200 RPMs StepperLeft.setSpeed(200); setup() // Move one step forward StepperLeft.step(1); // Move one step backward StepperLeft.step(-1); loop() Lect7-Page37 Motordriver for step-motors (steppers): Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0 #2 #1 Lect7-Page38 19

20 Motordriver for step-motors (steppers): Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0 // Use Adafruit module #include <AFMotor.h> // create motor stepper #2 with 48 steps AF_Stepper StepperLeft(48, 2); // set the speed StepperLeft.setSpeed(60); StepperLeft.release(); setup() // Move forward StepperLeft.step(1, FORWARD, SINGLE); // Move backward StepperLeft.step(1, BACKWARD, SINGLE); loop() Lect7-Page39 Low Cost Ultra Sonic Range Finder 5V GND Trigger pulse and signal Lect7-Page40 20

21 Low Cost Ultra Sonic Range Finder Range = usec/58=cm or usec/148=inches. Lect7-Page41 Low Cost Ultra Sonic Range Finder e.g. int ipingpin = 13; Range = usec/58=cm or usec/148=inches. Lect7-Page42 21

22 Robot Compass Modul GND Signal (PWM) 5V PWM-signal 0.1 msec == 1 degree e.g. int icompasspin = 11; Lect7-Page43 Lecture 7: Programming for the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming C for the Arduino: more - Programming style Lect7-Page44 22

23 Programming style See: Download Lect7-Page45 Programming style Try to write readable and efficient code: - Add comments to explain the code - Use understandable (variable, function) names - Structure the code into logical units - Initialize variables - Search for existing code first - Lect7-Page46 23

24 And for help look at: Programming style Lect7-Page47 The goal! 30cm X 30cm Stop the robot: while (1==1) {} Thank you Lect7-Page48 24

Programming the Arduino

Programming the Arduino Summer University 2015: Programming the Arduino Alexander Neidhardt (FESG) [email protected] SU-Arduino-Prog-Page1 Programming the Arduino - The hardware - The programming environment - Binary world,

More information

The programming language C. sws1 1

The programming language C. sws1 1 The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan

More information

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

More information

Arduino Motor Shield (L298) Manual

Arduino Motor Shield (L298) Manual Arduino Motor Shield (L298) Manual This DFRobot L298 DC motor driver shield uses LG high power H-bridge driver Chip L298P, which is able to drive DC motor, two-phase or four phase stepper motor with a

More information

Servo Info and Centering

Servo Info and Centering Info and Centering A servo is a mechanical motorized device that can be instructed to move the output shaft attached to a servo wheel or arm to a specified position. Inside the servo box is a DC motor

More information

DS1307 Real Time Clock Breakout Board Kit

DS1307 Real Time Clock Breakout Board Kit DS1307 Real Time Clock Breakout Board Kit Created by Tyler Cooper Last updated on 2015-10-15 11:00:14 AM EDT Guide Contents Guide Contents Overview What is an RTC? Parts List Assembly Arduino Library Wiring

More information

Arduino Lesson 5. The Serial Monitor

Arduino Lesson 5. The Serial Monitor Arduino Lesson 5. The Serial Monitor Created by Simon Monk Last updated on 2013-06-22 08:00:27 PM EDT Guide Contents Guide Contents Overview The Serial Monitor Arduino Code Other Things to Do 2 3 4 7 10

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

Lab 6 Introduction to Serial and Wireless Communication

Lab 6 Introduction to Serial and Wireless Communication University of Pennsylvania Department of Electrical and Systems Engineering ESE 111 Intro to Elec/Comp/Sys Engineering Lab 6 Introduction to Serial and Wireless Communication Introduction: Up to this point,

More information

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Microcontroller Programming Beginning with Arduino. Charlie Mooney Microcontroller Programming Beginning with Arduino Charlie Mooney Microcontrollers Tiny, self contained computers in an IC Often contain peripherals Different packages availible Vast array of size and

More information

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands C Programming for Embedded Microcontrollers Warwick A. Smith Elektor International Media BV Postbus 11 6114ZG Susteren The Netherlands 3 the Table of Contents Introduction 11 Target Audience 11 What is

More information

Basic Pulse Width Modulation

Basic Pulse Width Modulation EAS 199 Fall 211 Basic Pulse Width Modulation Gerald Recktenwald v: September 16, 211 [email protected] 1 Basic PWM Properties Pulse Width Modulation or PWM is a technique for supplying electrical power

More information

Arduino Lesson 16. Stepper Motors

Arduino Lesson 16. Stepper Motors Arduino Lesson 16. Stepper Motors Created by Simon Monk Last updated on 2013-11-22 07:45:14 AM EST Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout Arduino Code Stepper Motors Other

More information

GM862 Arduino Shield

GM862 Arduino Shield User s Manual GM862 Arduino Shield Rev. 1.3 MCI-MA-0063 MCI Electronics Luis Thayer Ojeda 0115. Of. 402 Santiago, Chile Tel. +56 2 3339579 [email protected] MCI Ltda. Luis Thayer Ojeda 0115. Of. 402 Santiago,

More information

How To Control A Car With A Thermostat

How To Control A Car With A Thermostat :» : :.:35152, 2013 2 5 1: 6 1.1 6 1.2 7 1.3 7 1.4 7 1.5 8 1.6 8 1.7 10 1.8 11 1.9 11 2: 14 2.1 14 2.2 14 2.2.1 14 2.2.2 16 2.2.3 19 2.2.4 20 2.2.5 21 2.2.6 Reed Relay 23 2.2.7 LCD 2x16 5VDC 23 2.2.8 RGB

More information

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM week 02 Digital Input and Output RGB LEDs fade with PWM 1 Microcontrollers Output Transducers actuators (e.g., motors, buzzers) Arduino Input Transducers sensors (e.g., switches, levers, sliders, etc.)

More information

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller Overview The objective of this lab is to introduce ourselves to the Arduino interrupt capabilities and to use

More information

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C 1 An essential part of any embedded system design Programming 2 Programming in Assembly or HLL Processor and memory-sensitive

More information

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage Outline 1 Computer Architecture hardware components programming environments 2 Getting Started with Python installing Python executing Python code 3 Number Systems decimal and binary notations running

More information

Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at www.me.umn.edu/courses/me2011/arduino/

Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at www.me.umn.edu/courses/me2011/arduino/ Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at www.me.umn.edu/courses/me2011/arduino/ 1 Introduction 1.1 Overview The Arduino microcontroller is an

More information

2011, The McGraw-Hill Companies, Inc. Chapter 3

2011, The McGraw-Hill Companies, Inc. Chapter 3 Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through

More information

Data Storage: Each time you create a variable in memory, a certain amount of memory is allocated for that variable based on its data type (or class).

Data Storage: Each time you create a variable in memory, a certain amount of memory is allocated for that variable based on its data type (or class). Data Storage: Computers are made of many small parts, including transistors, capacitors, resistors, magnetic materials, etc. Somehow they have to store information in these materials both temporarily (RAM,

More information

MeshBee Open Source ZigBee RF Module CookBook

MeshBee Open Source ZigBee RF Module CookBook MeshBee Open Source ZigBee RF Module CookBook 2014 Seeed Technology Inc. www.seeedstudio.com 1 Doc Version Date Author Remark v0.1 2014/05/07 Created 2 Table of contents Table of contents Chapter 1: Getting

More information

C++ Programming Language

C++ Programming Language C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract

More information

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Using Arduino Microcontrollers to Sense DC Motor Speed and Position ECE480 Design Team 3 Using Arduino Microcontrollers to Sense DC Motor Speed and Position Tom Manner April 4, 2011 page 1 of 7 Table of Contents 1. Introduction ----------------------------------------------------------

More information

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3 MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3 CMPS03 Magnetic Compass. Voltage : 5v only required Current : 20mA Typ. Resolution : 0.1 Degree Accuracy : 3-4 degrees approx. after calibration Output

More information

CPU Organization and Assembly Language

CPU Organization and Assembly Language COS 140 Foundations of Computer Science School of Computing and Information Science University of Maine October 2, 2015 Outline 1 2 3 4 5 6 7 8 Homework and announcements Reading: Chapter 12 Homework:

More information

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board Abstract This application note is a tutorial of how to use an Arduino UNO microcontroller to

More information

Arduino-Based Dataloggers: Hardware and Software David R. Brooks Institute for Earth Science Research and Education V 1.2, June, 2015 2014, 2015

Arduino-Based Dataloggers: Hardware and Software David R. Brooks Institute for Earth Science Research and Education V 1.2, June, 2015 2014, 2015 Arduino-Based Dataloggers: Hardware and Software David R. Brooks Institute for Earth Science Research and Education V 1.2, June, 2015 2014, 2015 An introduction to Arduino microcontrollers and their programming

More information

How To Write Portable Programs In C

How To Write Portable Programs In C Writing Portable Programs COS 217 1 Goals of Today s Class Writing portable programs in C Sources of heterogeneity Data types, evaluation order, byte order, char set, Reading period and final exam Important

More information

Freescale Semiconductor, I

Freescale Semiconductor, I nc. Application Note 6/2002 8-Bit Software Development Kit By Jiri Ryba Introduction 8-Bit SDK Overview This application note describes the features and advantages of the 8-bit SDK (software development

More information

Installing Java (Windows) and Writing your First Program

Installing Java (Windows) and Writing your First Program Appendix Installing Java (Windows) and Writing your First Program We will be running Java from the command line and writing Java code in Notepad++ (or similar). The first step is to ensure you have installed

More information

Arduino Internet Connectivity: Maintenance Manual Julian Ryan Draft No. 7 April 24, 2015

Arduino Internet Connectivity: Maintenance Manual Julian Ryan Draft No. 7 April 24, 2015 Arduino Internet Connectivity: Maintenance Manual Julian Ryan Draft No. 7 April 24, 2015 CEN 4935 Senior Software Engineering Project Instructor: Dr. Janusz Zalewski Software Engineering Program Florida

More information

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER Pierre A. von Kaenel Mathematics and Computer Science Department Skidmore College Saratoga Springs, NY 12866 (518) 580-5292 [email protected] ABSTRACT This paper

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

Electronic Brick of Current Sensor

Electronic Brick of Current Sensor Electronic Brick of Current Sensor Overview What is an electronic brick? An electronic brick is an electronic module which can be assembled like Lego bricks simply by plugging in and pulling out. Compared

More information

Pololu DRV8835 Dual Motor Driver Shield for Arduino

Pololu DRV8835 Dual Motor Driver Shield for Arduino Pololu DRV8835 Dual Motor Driver Shield for Arduino Pololu DRV8835 Dual Motor Driver Shield for Arduino, bottom view with dimensions. Overview This motor driver shield and its corresponding Arduino library

More information

FTC 2015-2016 Android Based Control System

FTC 2015-2016 Android Based Control System FTC 2015-2016 Android Based Control System Agenda Control System Overview Phone Setup Generating the Robot configuration file Software Overview Autonomous vs Tele-op templates Motor/servo control Sensor

More information

Chapter 7D The Java Virtual Machine

Chapter 7D The Java Virtual Machine This sub chapter discusses another architecture, that of the JVM (Java Virtual Machine). In general, a VM (Virtual Machine) is a hypothetical machine (implemented in either hardware or software) that directly

More information

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,

More information

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205] Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205] Users Manual Robokits India [email protected] http://www.robokitsworld.com Page 1 Bluetooth + USB 16 Servo Controller is used to control up to

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information

How to program a Zumo Robot with Simulink

How to program a Zumo Robot with Simulink How to program a Zumo Robot with Simulink Created by Anuja Apte Last updated on 2015-03-13 11:15:06 AM EDT Guide Contents Guide Contents Overview Hardware Software List of Software components: Simulink

More information

Arduino Lesson 13. DC Motors. Created by Simon Monk

Arduino Lesson 13. DC Motors. Created by Simon Monk Arduino Lesson 13. DC Motors Created by Simon Monk Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout Arduino Code Transistors Other Things to Do 2 3 4 4 4 6 7 9 11 Adafruit Industries

More information

The Answer to the 14 Most Frequently Asked Modbus Questions

The Answer to the 14 Most Frequently Asked Modbus Questions Modbus Frequently Asked Questions WP-34-REV0-0609-1/7 The Answer to the 14 Most Frequently Asked Modbus Questions Exactly what is Modbus? Modbus is an open serial communications protocol widely used in

More information

Arduino Lesson 1. Blink

Arduino Lesson 1. Blink Arduino Lesson 1. Blink Created by Simon Monk Last updated on 2015-01-15 09:45:38 PM EST Guide Contents Guide Contents Overview Parts Part Qty The 'L' LED Loading the 'Blink' Example Saving a Copy of 'Blink'

More information

S7-1200 and STEP 7 Basic V10.5

S7-1200 and STEP 7 Basic V10.5 S7-1200 and STEP 7 Basic V10.5 S7-200 vs. S7-1200 Expandability S7-200 S7-1200 max. 7 Modules max. 3 Modules (CM) max. 8 Modules (SM) Page 2 Advantages of S7-1200, compared to S7-200 I/O Internal periphery

More information

DELLORTO. Instructions Manual. Deuss Service Tool For ECS System ECU. Dell Orto Deuss Service Tool instruction manual Page 1 of 11.

DELLORTO. Instructions Manual. Deuss Service Tool For ECS System ECU. Dell Orto Deuss Service Tool instruction manual Page 1 of 11. DELLORTO Deuss Service Tool For ECS System ECU Instructions Manual Dell Orto Deuss Service Tool instruction manual Page 1 of 11 Revision History Level Date Author Change Description and section(s) affected

More information

#include <Gamer.h> Gamer gamer; void setup() { gamer.begin(); } void loop() {

#include <Gamer.h> Gamer gamer; void setup() { gamer.begin(); } void loop() { #include Gamer gamer; void setup() { gamer.begin(); void loop() { Gamer Keywords Inputs Board Pin Out Library Instead of trying to find out which input is plugged into which pin, you can use

More information

Software Manual RS232 Laser Merge Module. Document # SU-256521-09 Rev A

Software Manual RS232 Laser Merge Module. Document # SU-256521-09 Rev A Laser Merge Module Document # SU-256521-09 Rev A The information presented in this document is proprietary to Spectral Applied Research Inc. and cannot be used for any purpose other than that for which

More information

Programmable Logic Controllers Definition. Programmable Logic Controllers History

Programmable Logic Controllers Definition. Programmable Logic Controllers History Definition A digitally operated electronic apparatus which uses a programmable memory for the internal storage of instructions for implementing specific functions such as logic, sequencing, timing, counting,

More information

Table 1 Comparison of DC, Uni-Polar and Bi-polar Stepper Motors

Table 1 Comparison of DC, Uni-Polar and Bi-polar Stepper Motors Electronics Exercise 3: Uni-Polar Stepper Motor Controller / Driver Mechatronics Instructional Laboratory Woodruff School of Mechanical Engineering Georgia Institute of Technology Lab Director: I. Charles

More information

3 SOFTWARE AND PROGRAMMING LANGUAGES

3 SOFTWARE AND PROGRAMMING LANGUAGES 3 SOFTWARE AND PROGRAMMING LANGUAGES 3.1 INTRODUCTION In the previous lesson we discussed about the different parts and configurations of computer. It has been mentioned that programs or instructions have

More information

Pemrograman Dasar. Basic Elements Of Java

Pemrograman Dasar. Basic Elements Of Java Pemrograman Dasar Basic Elements Of Java Compiling and Running a Java Application 2 Portable Java Application 3 Java Platform Platform: hardware or software environment in which a program runs. Oracle

More information

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc. SKP16C62P Tutorial 1 Software Development Process using HEW Renesas Technology America Inc. 1 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW (Highperformance

More information

ZX-NUNCHUK (#8000339)

ZX-NUNCHUK (#8000339) ZX-NUNCHUK documentation 1 ZX-NUNCHUK (#8000339) Wii-Nunchuk interface board 1. Features l Interface with Wii Nunchuk remote control directly. Modification the remote control is not required. l Two-wire

More information

PowerBox PBX 180. Installation and Users Guide

PowerBox PBX 180. Installation and Users Guide PowerBox PBX 180 Installation and Users Guide Firmware and Tool Version 060 7/14/2015 Table of Contents Table of Contents 1 Introduction... 4 2 Hardware... 6 3 Software Installation... 7 3.1 Software Installation

More information

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015 Modern Robotics, Inc Core Device Discovery Utility Modern Robotics Inc, 2015 Version 1.0.1 October 27, 2015 Core Device Discovery Application Guide The Core Device Discovery utility allows you to retrieve

More information

IR Communication a learn.sparkfun.com tutorial

IR Communication a learn.sparkfun.com tutorial IR Communication a learn.sparkfun.com tutorial Available online at: http://sfe.io/t33 Contents Getting Started IR Communication Basics Hardware Setup Receiving IR Example Transmitting IR Example Resources

More information

Object Oriented Software Design

Object Oriented Software Design Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 28, 2010 G. Lipari (Scuola Superiore Sant Anna) Introduction

More information

INTRODUCTION TO SERIAL ARM

INTRODUCTION TO SERIAL ARM INTRODUCTION TO SERIAL ARM A robot manipulator consists of links connected by joints. The links of the manipulator can be considered to form a kinematic chain. The business end of the kinematic chain of

More information

Candle Plant process automation based on ABB 800xA Distributed Control Systems

Candle Plant process automation based on ABB 800xA Distributed Control Systems Candle Plant process automation based on ABB 800xA Distributed Control Systems Yousef Iskandarani and Karina Nohammer Department of Engineering University of Agder Jon Lilletuns vei 9, 4879 Grimstad Norway

More information

RB-See-211. Seeedstudio Grove 6-15V, 2A Dual I2C Motor Driver. Grove - I2C Motor Driver. Introduction

RB-See-211. Seeedstudio Grove 6-15V, 2A Dual I2C Motor Driver. Grove - I2C Motor Driver. Introduction RB-See-211 Seeedstudio Grove 6-15V, 2A Dual I2C Motor Driver Grove - I2C Motor Driver Introduction The Twig I2C motor driver is a new addition to the TWIG series with the same easy-to-use interface. Its

More information

Faculty of Engineering Student Number:

Faculty of Engineering Student Number: Philadelphia University Student Name: Faculty of Engineering Student Number: Dept. of Computer Engineering Final Exam, First Semester: 2012/2013 Course Title: Microprocessors Date: 17/01//2013 Course No:

More information

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction Standard 2: Technology and Society Interaction Technology and Ethics Analyze legal technology issues and formulate solutions and strategies that foster responsible technology usage. 1. Practice responsible

More information

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs AN033101-0412 Abstract This describes how to interface the Dallas 1-Wire bus with Zilog s Z8F1680 Series of MCUs as master devices. The Z8F0880,

More information

Application Note: AN00141 xcore-xa - Application Development

Application Note: AN00141 xcore-xa - Application Development Application Note: AN00141 xcore-xa - Application Development This application note shows how to create a simple example which targets the XMOS xcore-xa device and demonstrates how to build and run this

More information

An Introduction to MPLAB Integrated Development Environment

An Introduction to MPLAB Integrated Development Environment An Introduction to MPLAB Integrated Development Environment 2004 Microchip Technology Incorporated An introduction to MPLAB Integrated Development Environment Slide 1 This seminar is an introduction to

More information

Arduino Lesson 14. Servo Motors

Arduino Lesson 14. Servo Motors Arduino Lesson 14. Servo Motors Created by Simon Monk Last updated on 2013-06-11 08:16:06 PM EDT Guide Contents Guide Contents Overview Parts Part Qty The Breadboard Layout for 'Sweep' If the Servo Misbehaves

More information

Crazy Alarm Clock L A K S H M I M E Y Y A P P A N J A M E S K A Y E W I L L I A M D I E H L C O N G C H E N

Crazy Alarm Clock L A K S H M I M E Y Y A P P A N J A M E S K A Y E W I L L I A M D I E H L C O N G C H E N Crazy Alarm Clock L A K S H M I M E Y Y A P P A N J A M E S K A Y E W I L L I A M D I E H L C O N G C H E N Overview Problem: Some people hit snooze excessively every morning rather than getting out of

More information

Board also Supports MicroBridge

Board also Supports MicroBridge This product is ATmega2560 based Freeduino-Mega with USB Host Interface to Communicate with Android Powered Devices* like Android Phone or Tab using Android Open Accessory API and Development Kit (ADK)

More information

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide Sensors LCD Real Time Clock/ Calendar DC Motors Buzzer LED dimming Relay control I2C-FLEXEL PS2 Keyboards Servo Motors IR Remote Control

More information

Object Oriented Software Design

Object Oriented Software Design Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 14, 2011 G. Lipari (Scuola Superiore Sant Anna) Introduction

More information

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs Welcome to this tutorial on Microchip s MPLAB Starter Kit for dspic Digital Signal Controllers, or DSCs. The starter kit is an all-in-one

More information

Number Representation

Number Representation Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data

More information

Tutorial for MPLAB Starter Kit for PIC18F

Tutorial for MPLAB Starter Kit for PIC18F Tutorial for MPLAB Starter Kit for PIC18F 2006 Microchip Technology Incorporated. All Rights Reserved. WebSeminar Title Slide 1 Welcome to the tutorial for the MPLAB Starter Kit for PIC18F. My name is

More information

Ultrasonic Distance Measurement Module

Ultrasonic Distance Measurement Module Ultrasonic Distance Measurement Module General Description Distance measurement sensor is a low cost full functionality solution for distance measurement applications. The module is based on the measurement

More information

Modbus Communications for PanelView Terminals

Modbus Communications for PanelView Terminals User Guide Modbus Communications for PanelView Terminals Introduction This document describes how to connect and configure communications for the Modbus versions of the PanelView terminals. This document

More information

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks UNIVERSITY OF KERALA First Degree Programme in Computer Applications Model Question Paper Semester I Course Code- CP 1121 Introduction to Computer Science TIME : 3 hrs Maximum Mark: 80 SECTION A [Very

More information

DNA Data and Program Representation. Alexandre David 1.2.05 [email protected]

DNA Data and Program Representation. Alexandre David 1.2.05 adavid@cs.aau.dk DNA Data and Program Representation Alexandre David 1.2.05 [email protected] Introduction Very important to understand how data is represented. operations limits precision Digital logic built on 2-valued

More information

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications Joshua Ellul [email protected] Overview Brief introduction to Body Sensor Networks BSN Hardware

More information

Transmitter Interface Program

Transmitter Interface Program Transmitter Interface Program Operational Manual Version 3.0.4 1 Overview The transmitter interface software allows you to adjust configuration settings of your Max solid state transmitters. The following

More information

CanSat Program. Stensat Group LLC

CanSat Program. Stensat Group LLC CanSat Program Stensat Group LLC Legal Stuff Stensat Group LLC assumes no responsibility and/or liability for the use of the kit and documentation. There is a 90 day warranty for the Lander kit against

More information

Serial Communications

Serial Communications April 2014 7 Serial Communications Objectives - To be familiar with the USART (RS-232) protocol. - To be able to transfer data from PIC-PC, PC-PIC and PIC-PIC. - To test serial communications with virtual

More information

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) [email protected] http://www.mzahran.com

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com CSCI-UA.0201-003 Computer Systems Organization Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) [email protected] http://www.mzahran.com Some slides adapted (and slightly modified)

More information

Habanero Extreme Scale Software Research Project

Habanero Extreme Scale Software Research Project Habanero Extreme Scale Software Research Project Comp215: Java Method Dispatch Zoran Budimlić (Rice University) Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead

More information

Selecting and Implementing H-Bridges in DC Motor Control. Daniel Phan A37005649

Selecting and Implementing H-Bridges in DC Motor Control. Daniel Phan A37005649 Selecting and Implementing H-Bridges in DC Motor Control Daniel Phan A37005649 ECE 480 Design Team 3 Spring 2011 Abstract DC motors can be used in a number of applications that require automated movements.

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming I (#494) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Lecture N -1- PHYS 3330. Microcontrollers

Lecture N -1- PHYS 3330. Microcontrollers Lecture N -1- PHYS 3330 Microcontrollers If you need more than a handful of logic gates to accomplish the task at hand, you likely should use a microcontroller instead of discrete logic gates 1. Microcontrollers

More information

Lumousoft Visual Programming Language and its IDE

Lumousoft Visual Programming Language and its IDE Lumousoft Visual Programming Language and its IDE Xianliang Lu Lumousoft Inc. Waterloo Ontario Canada Abstract - This paper presents a new high-level graphical programming language and its IDE (Integration

More information

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University [email protected]

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University gerry@pdx.edu Basic DC Motor Circuits Living with the Lab Gerald Recktenwald Portland State University [email protected] DC Motor Learning Objectives Explain the role of a snubber diode Describe how PWM controls DC motor

More information

2014 HSC Software Design and Development Marking Guidelines

2014 HSC Software Design and Development Marking Guidelines 014 HSC Software Design and Development Marking Guidelines Section I Multiple-choice Answer Key Question Answer 1 B A A 4 D 5 A 6 D 7 A 8 B 9 C 10 D 11 B 1 B 1 A 14 A 15 B 16 D 17 C 18 C 19 D 0 D 1 Section

More information

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: [email protected] Alfonso Ortega: alfonso.ortega@uam.

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam. Compilers Spring term Mick O Donnell: [email protected] Alfonso Ortega: [email protected] Lecture 1 to Compilers 1 Topic 1: What is a Compiler? 3 What is a Compiler? A compiler is a computer

More information

TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO

TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO some pre requirements by :-Lohit Jain *First of all download arduino software from www.arduino.cc *download software serial

More information

Basic DC Motor Circuits

Basic DC Motor Circuits Basic DC Motor Circuits Living with the Lab Gerald Recktenwald Portland State University [email protected] DC Motor Learning Objectives Explain the role of a snubber diode Describe how PWM controls DC motor

More information

Example Connection between USB Host and Android

Example Connection between USB Host and Android Example connection between USB Host and Android Example Connection between USB Host and Android This example illustrates the connection between Board ETMEGA2560-ADK and Android through Port USB Host. In

More information

DEPARTMENT OF ELECTRONICS ENGINEERING

DEPARTMENT OF ELECTRONICS ENGINEERING UNIVERSITY OF MUMBAI A PROJECT REPORT ON Home Security Alarm System Using Arduino SUBMITTED BY- Suman Pandit Shakyanand Kamble Vinit Vasudevan (13103A0011) (13103A0012) (13103A0018) UNDER THE GUIDANCE

More information

Embedded Systems Design Course Applying the mbed microcontroller

Embedded Systems Design Course Applying the mbed microcontroller Embedded Systems Design Course Applying the mbed microcontroller Serial communications with SPI These course notes are written by R.Toulson (Anglia Ruskin University) and T.Wilmshurst (University of Derby).

More information

EE 472 Lab 2 (Group) Scheduling, Digital I/O, Analog Input, and Pulse Generation University of Washington - Department of Electrical Engineering

EE 472 Lab 2 (Group) Scheduling, Digital I/O, Analog Input, and Pulse Generation University of Washington - Department of Electrical Engineering EE 472 Lab 2 (Group) Scheduling, Digital I/O, Analog Input, and Pulse Generation University of Washington - Department of Electrical Engineering Introduction: In this lab, you will develop a simple kernel

More information