Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Programming Language Chin-Shiuh Shieh ( 謝欽旭 ) Department.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 2 Simple C Programs.
Air Force Institute of Technology Electrical and Computer Engineering
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
How to use Arduino By: Andrew Hoffmaster.
Pemrograman Dasar - Data Types1 OPERATOR. Pemrograman Dasar - Data Types2 Arithmetic operator  + - * /  / operator denotes integer division if both.
Introduction to Arduino Programming January MER-421:Mechatronic System Design.
IntroductionIntroduction  Computer program: an ordered sequence of statements whose objective is to accomplish a task.  Programming: process of planning.
Primitive Variable types Basic types –char (single character or ASCII integer value) –int (integer) –short (not longer than int) –long (longer than int)
C Programming Basics Lecture 5 Engineering H192 Winter 2005 Lecture 05
Admin Office hours 2:45-3:15 today due to department meeting if you change addresses during the semester, please unsubscribe the old one from the.
Analog and Digital Measurements living with the lab 14 digital input / output pins 6 analog input pins © 2011 LWTL faculty team.
Autumn, 2013C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Communication - Serial Chin-Shiuh Shieh ( 謝欽旭 ) Department.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Autumn, 2013C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Display Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Audio Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering.
Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Sensors III Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic.
Intro to C++ for Robotics Made for ALARM. Computer System Hardware – cpu, memory, i/o Software – OS, drivers.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Digital Input/Output Chin-Shiuh Shieh ( 謝欽旭 ) Department of.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Analog Input/Output Chin-Shiuh Shieh ( 謝欽旭 ) Department of.
Simple Data Types and Statements. Namespaces namespace MyNamespace { // …. { MyNamespace::func1() using namespace OtherNamespace; Comments: // /* xxxx.
1 Advanced Programming IF. 2 Control Structures Program of control –Program performs one statement then goes to next line Sequential execution –Different.
Windows Programming, C.-S. Shieh, KUAS EC, Chapter 3 Operators and Expressions.
C++ Programming: Basic Elements of C++.
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
C++ Basics Tutorial 6 Operators. What are going to see today? Assignment operator(=) Arithmetic operators(+,-,*,/,%) Compound assignment(+=,-=,*=……..)
Dennis Ritchie 1972 AT & T Bell laboratories (American Telephone and Telegraph) USA 1www.gowreeswar.com.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
COMPUTER PROGRAMMING. variable What is variable? a portion of memory to store a determined value. Each variable needs an identifier that distinguishes.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics.
Department of Electrical and Computer Engineering Introduction to C++: Primitive Data Types, Libraries and Operations By Hector M Lugo-Cordero August 27,
Code The Arduino Environment.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics Lecture 5.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Development Environment Chin-Shiuh Shieh ( 謝欽旭 ) Department.
智慧電子應用設計導論(1/3) Arduino MEGA 2560
Autumn, 2013C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Actuator Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic.
Microcontrollers, Microcomputers, and Microprocessors
Lecture 15: Course Review BJ Furman ME 30 16MAY2011.
Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Sensors I Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic.
2: Basics Basics Programming C# © 2003 DevelopMentor, Inc. 12/1/2003.
Department of Electronic & Electrical Engineering Expressions operators operands precedence associativity types.
1 nd Semester Module2 C# Basic Concept Thanawin Rakthanmanon Computer Engineering Department Kasetsart University, Bangkok.
ECE 103 Engineering Programming Chapter 4 Operators Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material developed.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Communication - Serial Chin-Shiuh Shieh ( 謝欽旭 ) Department.
Java Basics. Tokens: 1.Keywords int test12 = 10, i; int TEst12 = 20; Int keyword is used to declare integer variables All Key words are lower case java.
Department of Electronic & Electrical Engineering Lecture 3 IO reading and writing variables scanf printf format strings "%d %c %f" Expressions operators.
Chad’s C++ Tutorial Demo Outline. 1. What is C++? C++ is an object-oriented programming (OOP) language that is viewed by many as the best language for.
Embedded systems and sensors 1 Part 2 Interaction technology Lennart Herlaar.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Development Environment Chin-Shiuh Shieh ( 謝欽旭 ) Department.
Introduction to Programming the Arduino Dr Gaw 3/21/14.
ECE 103 Engineering Programming Chapter 4 Operators Herbert G. Mayer, PSU Status 6/10/2016 Initial content copied verbatim from ECE 103 material developed.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Data types Data types Basic types
Arduino & its hardware interfacing
INSPIRING CREATIVE AND INNOVATIVE MINDS
Lecture 2-2: Arduino Programming
C Short Overview Lembit Jürimägi.
Operators and Expressions
Operators and Expressions
Character Set The character set of C represents alphabet, digit or any symbol used to represent information. Types Character Set Uppercase Alphabets A,
פרטים נוספים בסילבוס של הקורס
Basics of ‘C’.
Chapter 3 Operators and Expressions
Programming Language C Language.
智慧電子應用設計導論(1/3) Arduino
CSCI1600: Embedded and Real Time Software
Arduino程式範例.
Presentation transcript:

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Programming Language Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering National Kaohsiung University of Applied Sciences, Taiwan

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan2 Arduino Programming Language Arduino – Tutorials – Arduino - Reference – Arduino – Libraries –

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan3 Structure setup() loop()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan4 Structure - Control Structures if if...else for switch case while do... while break continue return goto

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan5 Structure - Further Syntax ; (semicolon) {} (curly braces) // (single line comment) /* */ (multi-line comment) #define #include

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan6 Structure - Arithmetic Operators = (assignment operator) + (addition) - (subtraction) * (multiplication) / (division) % (modulo)

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan7 Structure - Comparison Operators == (equal to) != (not equal to) < (less than) > (greater than) <= (less than or equal to) >= (greater than or equal to)

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan8 Structure - Boolean Operators && (and) || (or) ! (not)

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan9 Structure - Pointer Access Operators * dereference operator & reference operator

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan10 Structure - Bitwise Operators & (bitwise and) | (bitwise or) ^ (bitwise xor) ~ (bitwise not) << (bitshift left) >> (bitshift right)

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan11 Structure - Compound Operators ++ (increment) -- (decrement) += (compound addition) -= (compound subtraction) *= (compound multiplication) /= (compound division) &= (compound bitwise and) |= (compound bitwise or)

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan12 Variables - Constants HIGH | LOW INPUT | OUTPUT| INPUT_PULLUP true | false integer constants floating point constants

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan13 Variables - Data Types void boolean char unsigned char byte int unsigned int word long unsigned long float double string - char array String - object array

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan14 Variables - Conversion char() byte() int() word() long() float()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan15 Variables - Variable Scope & Qualifiers variable scope static volatile const

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan16 Variables - Utilities sizeof()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan17 Functions - Digital I/O pinMode() digitalWrite() digitalRead()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan18 Functions - Analog I/O analogReference() analogRead() analogWrite() - PWM

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan19 Functions - Advanced I/O tone() noTone() shiftOut() shiftIn() pulseIn() pulseIn(2,HIGH);

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan20 Functions - Time millis() micros() delay() delayMicroseconds()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan21 Functions - Math min() max() abs() constrain() map() pow() sqrt()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan22 Functions - Trigonometry sin() cos() tan()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan23 Functions - Random Numbers randomSeed() random()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan24 Functions - Bits and Bytes lowByte() highByte() bitRead() bitWrite() bitSet() bitClear() bit()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan25 Functions - External Interrupts attachInterrupt() detachInterrupt()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan26 Functions - Interrupts interrupts() noInterrupts()

Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan27 Functions - Communication Serial Stream