UCD ElecSoc Robotics Club 2017/2018

Slides:



Advertisements
Similar presentations
Lab7: Introduction to Arduino
Advertisements

Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Embedded Sumo 1T4 – 1T5 UTRA.
Intro to Arduino with LilyPad Make a MakerSpace, Artisan’s Asylum Linz Craig, Chris Taylor, Mike Hord & Joel Bartlett.
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Introduction.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Embedded Programming and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Arduino Part 1 Topics: Microcontrollers Programming Basics: structure and variables Digital Output Analog to Digital Conversion.
Week 10 Today 1.Homework presentations and critique. 2.Review digital and analog inputs. 3.DIY - jumpers, soldering etc.
Microprocessors Tutorial 1: Arduino Basics
Introduction to the Arduino
Microprocessors Tutorial 1: Arduino Basics
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
Microcontrollers, Microcomputers, and Microprocessors
Arduino The Internet of Things: Using the Arduino to Teach Coding.
Robotics Grant Agreement No LLP UK-LEONARDO-LMP Project acronym: CLEM Project title: Cloud services for E-Learning in Mechatronics Technology.
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Arduino Programming. THE ARDUINO IS A MICROCONTROLLER – A LOW COST, LOW PERFORMANCE COMPUTER.
Hacking on Arduino George Patterson
Prototyping with Microcontrollers and Sensors. Overview Objective Background Information Problem Statement Materials Procedure Assignment Closing.
Harpeth Hall Jan 2016 Introduction to Arduino Prepared for Harpeth Hall Winterim January 2016.
Having fun with code, using Arduino in a middle school CS classroom
Arduino - Introduction
Arduino.
Embedded Systems Intro to the Arduino
Getting Started: Building & Programming
Prototyping with Microcontrollers and Sensors
Val Manes Department of Math & Computer Science
Microcontroller basics
Microprocessors Tutorial 1: Arduino Basics
Arduino Programming Part II
UTA010 : Engineering Design – II
An Arduino Workshop A Microcontroller.
Welcome to Arduino A Microcontroller.
Arduino Development for Beginners
Arduino Part 1 Topics: Microcontrollers Programming Basics
INC 161 , CPE 100 Computer Programming
Arduino - Introduction
Control the color and brightness of an RGB LED with a Potentiometer
Introduction to Arduino Microcontrollers
How to avoid catching things on fire.
Introduction to Arduinos
Roller Coaster Design Project
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
Programming, Serial and Virtual Prototyping
What is Arduino? By James Tedder.
Intro to the Arduino Topics: The Arduino Digital IO
Arduino 101 Credit(s):
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
Arduino : Introduction & Programming
Programming 2: The Arduino IDE & First Sketches
Arduino Part 4 Let there be more light.
CTY SAR FCPS Shawn Lupoli, Elliot Tan
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Aeroponic Engineering and Vertical Farming
Lab #1: Getting Started.
Arduino Uno circuit basics
Introduction to Arduino
Introduction to Arduinos
Introduction to arduino
Introduction to Arduino IDE and Software
Interrupts.
Presentation transcript:

UCD ElecSoc Robotics Club 2017/2018 Arduino 101 UCD ElecSoc Robotics Club 2017/2018

What is Arduino? 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018 In short, Arduino/Genuino boards are essentially programmable microcontrollers. They are used for a wide variety of functions such as prototyping, robotics and personal projects. Arduino is an open source electronics prototyping platform, meaning the software can be distributed and altered without any restrictions. These tutorials have been designed to teach the basics of Arduino/Genuino to absolute beginners and give every member a chance to learn how to code and build cool projects with the help of the Robotics Officers. 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Arduino/Genuino Uno Layout Arduino Anatomy Arduino/Genuino Uno Layout 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

External Ports & Reset: Reset button: Resets the ATmega microcontroller USB port: Used to upload sketches, powering your Arduino/Genuino and communicating with your sketch (via Serial.println()) Power Connector: Accepts voltages between 7-12V. 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Analogue & Voltage Pins: Voltage pins: Use these pins to provide power and ground to your circuit Atmega Microcontroller: The heart of your Arduino/Genuino Uno Analogue in: Use these pins with the analogRead() function to read analogue input. 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Digital Pins: 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018 Pin 13 LED: The only actuator built-in to your Arduino/Genuino Uno. It’s a handy target for a basic blink sketch, but also very useful for debugging. Digital pins: Use these pins to read/control digital input and output. Use the functions digitalRead() and digitalWrite() with all pins, and analogWrite() with pins that have the ~ symbol beside them. 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Digital and Analogue Pins Digital pins can only read two states: When there is voltage on, the pin is HIGH In the absence of voltage, the pin is LOW On the other hand, analogue pins contain a value between 0-1023, which maps to a range from 0 volts to 5 volts. Digital and analogue pins can act as both inputs and outputs, depending how you code them. 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Building Circuits Basic Principles 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

New to Circuits? 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018 If you have absolutely no experience building circuits, please talk to a Robotics Officer and ask them to explain the following principles: Voltage, current, resistance Series and parallel circuits Reading circuit diagrams 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Reading Circuit Diagrams: Important Symbols Resistor Switch Voltage Source Ground/Earth LED 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Using a Breadboard 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018 A Robotics Officer will perform a short demonstration on how to build circuits using a breadboard for all beginners. For those of you who are more familiar with breadboards, please see the diagram on the left as a reminder of the connections on the breadboards available in the UCD Electronics Lab 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Coding An introduction 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Variables Data Types 0. Arduino 101 A variable is an item of data used to store a particular value To use a variable, you must declare its data type Data Types The two data types you will use when declaring variables are: int – used for integer variables (whole numbers) float – used for non-integar variables (any number containing a decimal point) 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

UCD ElecSoc Robotics Club 2017/2018 Every Arduino sketch has two main functions: setup() – runs only once (after each reset). Used to initialise variables, pin modes and libraries. loop() – runs continuously after the setup() has completed. Used for your main code. When creating variables, declare them before the setup() function, as shown. To assign a value to a variable later in the code, simply use the = sign. Example: variable = 5. 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Other Important Functions pinMode() – used to configure pins to be input or output pins digitalWrite() – used to turn on and off the digital pins digitalRead() – used to check the voltage level of digital pins analogWrite() - used to turn on and off the analogue pins analogRead() – used to check the voltage level of analogue pins Serial.begin() – opens a connection between the Arduino/Genuino and the computer so you can see the input values on you screen Serial.print() – sends information from the Arduin0/Genuino to the connected computer 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Coding Practice 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018 Each of the project tutorials will demonstrate and explain how to use the relevant functions appropriately, but here are a few basic coding practices to remember: Every line of code must end in a semicolon (;) Use meaningful names for variables Use indentation to keep code organised and legible Use comments to explain complex parts of code To comment, start the line of code with “//” Avoid excessive variables, functions, statements etc 0. Arduino 101 UCD ElecSoc Robotics Club 2017/2018

Let’s Go!