Programming the Arduino

Size: px
Start display at page:

Download "Programming the Arduino"

Transcription

1 Summer University 2015: Programming the Arduino Alexander Neidhardt (FESG) SU-Arduino-Prog-Page1 Programming the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming the Arduino in C: more - Programming style SU-Arduino-Prog-Page2 1

2 The hardware SU-Arduino-Prog-Page3 Programming the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming the Arduino in C: more - Programming style SU-Arduino-Prog-Page4 2

3 Programming environment Download from: SU-Arduino-Prog-Page5 Programming the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming the Arduino in C: more - Programming style SU-Arduino-Prog-Page6 3

4 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 SU-Arduino-Prog-Page7 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 SU-Arduino-Prog-Page8 4

5 Binary world, programming from Assembler to C Programming paradigm of the problem oriented computer language 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 SU-Arduino-Prog-Page9 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 SU-Arduino-Prog-Page10 5

6 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 SU-Arduino-Prog-Page11 Programming the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming the Arduino in C: more - Programming style SU-Arduino-Prog-Page12 6

7 Our first program: Blink (LED) SU-Arduino-Prog-Page13 Memory Elements short, int, long, float, double, char, structures, Variables Arrays (e.g. int Ar[5];) Indexes start with 0!!! Pointers SU-Arduino-Prog-Page14 7

8 = 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 SU-Arduino-Prog-Page15 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 SU-Arduino-Prog-Page16 8

9 Pointer: Pointer: int *a = &a; <&a> Memory element: int a = 5; 5 Memory: Address of a Location of element in Memory (address) SU-Arduino-Prog-Page17 Functions Function definition int Add (int a, int b) { return a+b; } Function call X = Add (5, 6); => X=11 SU-Arduino-Prog-Page18 9

10 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: +=, -=,, [, ], ->, *, SU-Arduino-Prog-Page19 Comments // This is a comment /* This is also a comment */ SU-Arduino-Prog-Page20 10

11 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 ); // Write with new line } AB AB AB SU-Arduino-Prog-Page21 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;... } SU-Arduino-Prog-Page22 11

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

13 External modules (Libraries) Copy modules to here Use module with #include < > SU-Arduino-Prog-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. SU-Arduino-Prog-Page26 13

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

15 Motordriver for DC-motors: basic functionality Motor armature Commutator Carbon brush Rotation direction GND SU-Arduino-Prog-Page29 Motordriver for DC-motors: basic functionality (with driver IC L293 D) Motor armature Commutator Carbon brush SU-Arduino-Prog-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 SU-Arduino-Prog-Page31 Motordriver for DC-motors: Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0 #3 #1 #4 #2 SU-Arduino-Prog-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); MotorLeft.run(RELEASE); // Move forward for (int i=0;i<500;i++) { MotorRight.run(FORWARD); MotorRight.run(RELEASE); } // Move forward for (int i=0;i<500;i++) { MotorRight.run(BACKWARD); MotorRight.run(RELEASE); } setup() loop() SU-Arduino-Prog-Page33 Motordriver for step-motors (steppers): basic functionality Inductor 1 Inductor 2 2x resistance SU-Arduino-Prog-Page34 17

18 Motordriver for step-motors (steppers): RN-Stepp297 Power Clock pulse for steps 5V GND Rotation direction SU-Arduino-Prog-Page35 Motordriver for step-motors (steppers): RN-Stepp297 +5V or 0V Rotation direction Clock pulse for steps (PWM) 5V GND SU-Arduino-Prog-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() SU-Arduino-Prog-Page37 Motordriver for step-motors (steppers): Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0 #2 #1 SU-Arduino-Prog-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(60, 2); // set the speed StepperLeft.setSpeed(100); StepperLeft.release(); setup() // Move forward StepperLeft.step(1, FORWARD, SINGLE); StepperLeft.release(); // Move backward StepperLeft.step(1, BACKWARD, SINGLE); StepperLeft.release(); loop() SU-Arduino-Prog-Page39 Low Cost Ultra Sonic Range Finder 5V GND Trigger pulse and signal SU-Arduino-Prog-Page40 20

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

22 Robot Compass Modul GND Signal (PWM) 5V PWM-signal 0.1 msec == 1 degree SU-Arduino-Prog-Page43 Programming the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming the Arduino in C: more - Programming style SU-Arduino-Prog-Page44 22

23 Programming style See: Download SU-Arduino-Prog-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 - SU-Arduino-Prog-Page46 23

24 And for help look at: Programming style SU-Arduino-Prog-Page47 Data Analysis Course SU-Arduino-Prog-Page48 24

25 The competition... 30cm X 30cm Stop the robot: while (1==1) {} SU-Arduino-Prog-Page49 Thank you SU-Arduino-Prog-Page50 25

Lecture 7: Programming for the Arduino

Lecture 7: Programming for the Arduino 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

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 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

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

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

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

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 gerry@me.pdx.edu 1 Basic PWM Properties Pulse Width Modulation or PWM is a technique for supplying electrical power

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

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

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

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

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

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

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

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

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

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 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

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 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

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

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

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

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 info@olimex.cl MCI Ltda. Luis Thayer Ojeda 0115. Of. 402 Santiago,

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

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

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

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

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR AND MICROCOMPUTER BASICS Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit

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

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 pvonk@skidmore.edu ABSTRACT This paper

More information

AN601 I2C 2.8 Communication Protocol. SM130 SM130 - Mini APPLICATION NOTE

AN601 I2C 2.8 Communication Protocol. SM130 SM130 - Mini APPLICATION NOTE AN601 I2C 2.8 Communication Protocol SM130 SM130 - Mini APPLICATION NOTE 2 1. INTRODUCTION This application note explains I2C communication protocol with SM130 or SM130-Mini Mifare module based on the

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

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

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority) Boolean Expressions, Conditions, Loops, and Enumerations Relational Operators == // true if two values are equivalent!= // true if two values are not equivalent < // true if left value is less than the

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

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

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

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 info@robokits.co.in http://www.robokitsworld.com Page 1 Bluetooth + USB 16 Servo Controller is used to control up to

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

Introduction to Java

Introduction to Java Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high

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

150127-Microprocessor & Assembly Language

150127-Microprocessor & Assembly Language Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an

More information

Work with Arduino Hardware

Work with Arduino Hardware 1 Work with Arduino Hardware Install Support for Arduino Hardware on page 1-2 Open Block Libraries for Arduino Hardware on page 1-9 Run Model on Arduino Hardware on page 1-12 Tune and Monitor Models Running

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

Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void

Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void 1. Explain C tokens Tokens are basic building blocks of a C program. A token is the smallest element of a C program that is meaningful to the compiler. The C compiler recognizes the following kinds of

More information

Arduino Lesson 0. Getting Started

Arduino Lesson 0. Getting Started Arduino Lesson 0. Getting Started Created by Simon Monk Last updated on 204-05-22 2:5:0 PM EDT Guide Contents Guide Contents Overview Parts Part Qty Breadboard Installing Arduino (Windows) Installing Arduino

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

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

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

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

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

1 Classical Universal Computer 3

1 Classical Universal Computer 3 Chapter 6: Machine Language and Assembler Christian Jacob 1 Classical Universal Computer 3 1.1 Von Neumann Architecture 3 1.2 CPU and RAM 5 1.3 Arithmetic Logical Unit (ALU) 6 1.4 Arithmetic Logical Unit

More information

8051 MICROCONTROLLER COURSE

8051 MICROCONTROLLER COURSE 8051 MICROCONTROLLER COURSE Objective: 1. Familiarization with different types of Microcontroller 2. To know 8051 microcontroller in detail 3. Programming and Interfacing 8051 microcontroller Prerequisites:

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

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

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

RS-485 Protocol Manual

RS-485 Protocol Manual RS-485 Protocol Manual Revision: 1.0 January 11, 2000 RS-485 Protocol Guidelines and Description Page i Table of Contents 1.0 COMMUNICATIONS BUS OVERVIEW... 1 2.0 DESIGN GUIDELINES... 1 2.1 Hardware Design

More information

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008 An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008 Computer Science the study of algorithms, including Their formal and mathematical properties Their hardware realizations

More information

E-Blocks Easy Internet Bundle

E-Blocks Easy Internet Bundle Page 1 Cover Page Page 2 Flowcode Installing Flowcode Instruction for installing Flowcode can be found inside the installation booklet located inside the Flowcode DVD case. Before starting with the course

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

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

1 Abstract Data Types Information Hiding

1 Abstract Data Types Information Hiding 1 1 Abstract Data Types Information Hiding 1.1 Data Types Data types are an integral part of every programming language. ANSI-C has int, double and char to name just a few. Programmers are rarely content

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

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

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca

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

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

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

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

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

Sending Data from a computer to a microcontroller using a UART (Universal Asynchronous Receiver/Transmitter)

Sending Data from a computer to a microcontroller using a UART (Universal Asynchronous Receiver/Transmitter) Sending Data from a computer to a microcontroller using a UART (Universal Asynchronous Receiver/Transmitter) Eric Bell 04/05/2013 Abstract: Serial communication is the main method used for communication

More information

(Refer Slide Time: 00:01:16 min)

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

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

Phys4051: C Lecture 2 & 3. Comment Statements. C Data Types. Functions (Review) Comment Statements Variables & Operators Branching Instructions

Phys4051: C Lecture 2 & 3. Comment Statements. C Data Types. Functions (Review) Comment Statements Variables & Operators Branching Instructions Phys4051: C Lecture 2 & 3 Functions (Review) Comment Statements Variables & Operators Branching Instructions Comment Statements! Method 1: /* */! Method 2: // /* Single Line */ //Single Line /* This comment

More information

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T) Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating

More information

DC Motor Driver 24V 20A [RKI-1340]

DC Motor Driver 24V 20A [RKI-1340] DC Motor Driver 24V 20A [RKI-1340] Users Manual Robokits India info@robokits.co.in http://www.robokitsworld.com Page 1 Add raw power and simple connectivity to your robotics applications with this 24V

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

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

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

Set up and Blink - Simulink with Arduino

Set up and Blink - Simulink with Arduino Set up and Blink - Simulink with Arduino Created by Anuja Apte Last updated on 2015-01-28 06:45:11 PM EST Guide Contents Guide Contents Overview Parts and Software Build the circuit Set up compiler support

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

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 Oct 4, 2013, p 1 Name: CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 1. (max 18) 4. (max 16) 2. (max 12) 5. (max 12) 3. (max 24) 6. (max 18) Total: (max 100)

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

MACHINE ARCHITECTURE & LANGUAGE

MACHINE ARCHITECTURE & LANGUAGE in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based

More information

Stacks. Linear data structures

Stacks. Linear data structures Stacks Linear data structures Collection of components that can be arranged as a straight line Data structure grows or shrinks as we add or remove objects ADTs provide an abstract layer for various operations

More information

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows: LCD 1602 Shield Description: Arduino LCD 1602 adopts 2 lines with 16 characters LCD, with contrast regulating knob, backlight optional switch, and with 4 directional push-buttons, 1 choice button and1

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

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es 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: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.es Lecture 1 to Compilers 1 Topic 1: What is a Compiler? 3 What is a Compiler? A compiler is a computer

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

SYSTEM 45. C R H Electronics Design

SYSTEM 45. C R H Electronics Design SYSTEM 45 C R H Electronics Design SYSTEM 45 All in one modular 4 axis CNC drive board By C R Harding Specifications Main PCB & Input PCB Available with up to 4 Axis X, Y, Z, & A outputs. Independent 25

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

Lab Experience 17. Programming Language Translation

Lab Experience 17. Programming Language Translation Lab Experience 17 Programming Language Translation Objectives Gain insight into the translation process for converting one virtual machine to another See the process by which an assembler translates assembly

More information

Event counters in NOVA

Event counters in NOVA Case study: how to use the event counters in NOVA? 1 Event counter support NOVA Technical Note 22 Event counters in NOVA Most of the measurement commands, like CV staircase or Record signals (> 1 ms) provide

More information

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V1.0. 20 th November 2012. L6470 Stepper Motor Shield

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V1.0. 20 th November 2012. L6470 Stepper Motor Shield Arduino Dual L6470 Stepper Motor Shield Data Sheet Adaptive Design ltd V1.0 20 th November 2012 Adaptive Design ltd. Page 1 General Description The Arduino stepper motor shield is based on L6470 microstepping

More information

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver Electronics Exercise 2: The 555 Timer and its Applications Mechatronics Instructional Laboratory Woodruff School of Mechanical Engineering Georgia Institute of Technology Lab Director: I. Charles Ume,

More information

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,

More information