Getting Started with Arduino

Total Page:16

File Type:pdf, Size:1020Kb

Getting Started with Arduino Getting Started with Arduino James Michener K9JM These slides are available at k9jm.com Why Arduino? It was designed as a teaching tool in Europe. The goal was to get the student up and running after the first day of class. Where one can start running real programs. This is your first day of class…. And your second day of class…. What we will do: Getting started with ● Arduino IDE ● Arduino Driver Install ● Visual Studio + Visual Micro Arduino Extension ● "Hello World" to a serial port / LCD ● Example on-line of an Arduino RF voltmeter Arduino Pros ● Up and running fast ● Wide variety of hardware choices with a common libraries and development platform ● Built in / Intergrated: USB, Serial, EEPROM, RAM, Flash, I2C, SDI, A/D, PWM ● Full gcc g++ language support ● Hundreds of prebuilt add on hardware ● LCD displays, touch screens, DDS, motor controllers, clocks, ethernet, WiFi, GSM Arduino Con Not good for big data / high speed applications. Support only for C and C++ programming language. (no Java, Ruby, Lisp, Fortran, Python...etc) Consider the Raspberry Pi, Beaglebone Black.... but you need to good at Unix Step One: Get a cup of coffee... especially if you're on DSL Estimated time to download and install everything is two hours. Download Arduino Software ● https://www.arduino.cc/en/Main/Software ● Gets everything.... ● Atmel gcc compilers ● Libraries ● Board Descriptions ● Arduino IDE ● Arduino Windows Drivers Download Arduino Software Hint: I always go for the "Windows ZIP file for non admin install". The reason is, I can control where on my machine to install it AND (most important) you can have multiple versions of Arduino installed at one time. This is important when they come out with a new release (about every month). Do you wish to donate? Expand the zip file The browser will save the zip file in it's 'download' directory. Unzip the folder into your 'home' directory (eg C:\Users\James ) This can be done by drag and dropping the folder Short coffee break Drag and Drop Folder from Zip Make a desktop shortcut In the new arduino directory, right click on arduino.exe and and click on 'create short cut' Move short cut to desktop ● Drag and drop the short cut to the desktop ● Rename the shortcut to Arduino-version# ● Hint: use F2 key for renaming a fime ● Hint: you can delete the downloaded zip file Double click on desktop icon Uncheck 'Always ask before opening this file' and hit Run Arduino IDE (Integrated Development Environment) Driver Install Note: Because you did not do an administrative install… Windows does not know where the Arduino drivers are located…. Plug in the USB cable connected to the Arduino and Windows will be unable to find the driver for this device. Windows Fails to find driver. Hit Close Open 'Computer Management' and look for an 'Unknown Device' Right click on unknown device and select "Update driver software" Then select Browse my computer for driver software Browse to the Arduino driver directory Say okay... and the driver is installed! Note the COM port number A better IDE Earlier this year, Microsoft released FOR FREE, a version of their Visual Studio development suite call Visual Studio Community. They also opened up how to create Visual Studio Community Download https://www.visualstudio.com/downloads/download-visual-studio-vs Install Visual Studio Community ● Either take a typical install, or custom, but make sure that C and C++ elements are installed! ● Installation can take up to an hour, so you might consider going for a walk. Take either Typical or Custom Minimum C++ and Extensibility Tools Click Install One hour later....Microsoft sign in Sign in or create a new account Just about there... Visual Micro Install Extension Open Visual Studio Community and in the menu select Tools, and Extensions and Updates. On the left click on 'Online' There are hundreds of extensions and pages of extensions! Note: the '1 2 3 4 5 >' at the bottom, this selects the pages. Find the “Arduino IDE for Visual Studio” Search for and select Arduino IDE Select and hit download VSIX runs Click okay... then click Restart Now Enter location of Arduino IDE then hit OK Added tool bars and menu items Congratulations! You are ready to go... more reading http://www.visualmicro.com/page/User-Guide.aspx https://www.arduino.cc/en/Guide/HomePage Hello World Example ● I used an I2C (TWI) LCD panel..less wires ● Wiring – Clock = Uno pin A5 Data = Uno pin A4 ● Using I2C LCD ... what is the I2C Address?? ● Warning I2C address is 7 bits and it may or may not be shifted left by one bit ● When in doubt 'sniff' it... Important to understand about AVR Arduinos (eg Uno, Mega) ● Processors have very limited RAM ● Uno has 2 kilobytes ● Mega has 8 kilobytes ● Not much space for a 'heap' ● Avoid using 'new' or 'malloc' ● Avoid using STL ● Avoid using RAM except as needed! C / C++ notes ● Atmel compilier supports C++11 ● Not all Arduino libraries support C++11 ● Compilier supports C++11 STL changes ● For AVR (Uno / Mega) avoid STL elements that use malloc and new ● Bottom line: Stick with C/C++ 98 Important to understand about AVR Arduinos (eg Uno, Mega) ● Processors use a 'Harvard Architecture' ● Different instructions to address data or SRAM ● Data in Program Memory must be moved to RAM Important to understand about AVR Arduinos (eg Uno, Mega) const char foo[] = "K9JM"; Serial.print("Hello World"); --- strings are in RAM! const char foo[] PROGMEM = "K9JM"; Serial.print(F("Hello World")); --- strings are in Program Memory Arduino SAM processors (eg Due) 32 bit flat address space 96K of RAM 512K of Flash program memory any 'const' is stored in Flash Due compilier will properly handel (F(" ")) and PROGMEM functions, but are not required. FYI ● Visual micro stores all objects and 'hex' files in a directory. Note: AppData is a hidden directory /Users/James/AppData/Local/V.Micro/Arduino/Build In case Visual Studio Express does not generate a desk top icon... Go to this directory and right click on devenv.exe and click on 'Create shortcut' .
Recommended publications
  • Intel® Galileo Software Package Version: 1.0.2 for Arduino IDE V1.5.3 Release Notes
    Intel® Galileo Software Package Version: 1.0.2 for Arduino IDE v1.5.3 Release Notes 23 June 2014 Order Number: 328686-006US Intel® Galileo Software Release Notes 1 Introduction This document describes extensions and deviations from the functionality described in the Intel® Galileo Board Getting Started Guide, available at: www.intel.com/support/go/galileo This software release supports the following hardware and software: • Intel® Galileo Customer Reference Board (CRB), Fab D with blue PCB • Intel® Galileo (Gen 2) Customer Reference Board (CRB), Gen 2 marking • Intel® Galileo software v1.0.2 for Arduino Integrated Development Environment (IDE) v1.5.3 Note: This release uses a special version of the Arduino IDE. The first thing you must do is download it from the Intel website below and update the SPI flash on the board. Features in this release are described in Section 1.4. Release 1.0.2 adds support for the 2nd generation Intel® Galileo board, also called Intel® Galileo Gen 2. In this document, for convenience: • Software and software package are used as generic terms for the IDE software that runs on both Intel® Galileo and Galileo (Gen 2) boards. • Board is used as a generic term when either Intel® Galileo or Galileo (Gen 2) boards can be used. If the instructions are board-specific, the exact model is identified. 1.1 Downloading the software release Download the latest Arduino IDE and firmware files here: https://communities.intel.com/community/makers/drivers This release contains multiple zip files, including: • Operating system-specific IDE packages, contain automatic SPI flash update: − Intel_Galileo_Arduino_SW_1.5.3_on_Linux32bit_v1.0.2.tgz (73.9 MB) − Intel_Galileo_Arduino_SW_1.5.3_on_Linux64bit_v1.0.2.tgz (75.2 MB) − Intel_Galileo_Arduino_SW_1.5.3_on_MacOSX_v1.0.2.zip (56.0 MB) − Intel_Galileo_Arduino_SW_1.5.3_on_Windows_v1.0.2.zip (106.9 MB) • (Mandatory for WiFi) Files for booting board from SD card.
    [Show full text]
  • Installation Pieter P
    Installation Pieter P Important:These are the installation instructions for developers, if you just want to use the library, please see these installation instructions for users. I strongly recommend using a Linux system for development. I'm using Ubuntu, so the installation instructions will focus mainly on this distribution, but it should work ne on others as well. If you're using Windows, my most sincere condolences. Installing the compiler, GNU Make, CMake and Git For development, I use GCC 11, because it's the latest version, and its error messages and warnings are better than previous versions. On Ubuntu, GCC 11 can be installed through the ppa:ubuntu-toolchain-r/test repository: $ sudo add-apt-repository ppa:ubuntu-toolchain-r/test $ sudo apt update $ sudo apt install gcc-11 g++-11 You'll also need GNU Make and CMake as a build system, and Git for version control. Now is also a good time to install GNU Wget, if you haven't already, it comes in handy later. $ sudo apt install make cmake git wget Installing the Arduino IDE, Teensy Core and ESP32 Core To compile sketches for Arduino, I'm using the Arduino IDE. The library focusses on some of the more powerful Arduino-compatible boards, such as PJRC's Teensy 3.x and Espressif's ESP32 platforms. To ensure that nothing breaks, tests are included for these boards specically, so you have to install the appropriate Arduino Cores. Arduino IDE If you're reading this document, you probably know how to install the Arduino IDE. Just in case, you can nd the installation instructions here.
    [Show full text]
  • For Windows Lesson 0 Setting up Development Environment.Pdf
    LESSON 0 sets up development environment -- arduino IDE But.. e...... what is arduino IDE......? 0 arduino IDE As an open source software,arduino IDE,basing on Processing IDE development is an integrated development environment officially launched by Arduino. In the next part,each movement of the vehicle is controlled by the program so it’s necessary to get the program installed and set up correctly. By using arduino IDE,You just write the program code in the IDE and upload it to the Arduino circuit board. The program will tell the Arduino circuit board what to do. so,Where can we download arduino IDE? the arduino IDE? STEP 1: Go to https://www.arduino.cc/en/Main/Software and you will see below page. The version available at this website is usually the latest version,and the actual version may be newer than the version in the picture. STEP2: Download the development software that is suited for the operating system of your computer. Take Windows as an example here. If you are macOS, please pull to the end. You can install it using the EXE installation package or the green package. The following is the exe implementation of the installation procedures. Press the char “Windows Installer” 1 STEP3: Press the button “JUST DOWNLOAD” to download the software. The download file: STEP4: These are available in the materials we provide, and the versions of our materials are the latest versions when this course was made. Choose "I Agree" to see the following interface. 2 Choose "Next" to see the following interface.
    [Show full text]
  • Introduction to Arduino Software Pdf
    Introduction to arduino software pdf Continue Arduino IDE is used to write computer code and upload that code to a physical board. Arduino IDE is very simple, and this simplicity is probably one of the main reasons why Arduino has become so popular. We can certainly say that compatibility with Arduino IDE is now one of the basic requirements for the new microcontroller board. Over the years, many useful features have been added to Arduino IDE, and now you can manage third-party libraries and tips from IDE, and still keep the ease of programming board. The main Arduino IDE window is shown below, with a simple example of Blink. You can get different versions of Arduino IDE from the Download page on Arduino's official website. You have to choose software that is compatible with your operating system (Windows, iOS or Linux). Once the file is downloaded, unpack the file to install Arduino IDE. Arduino Uno, Mega and Arduino Nano automatically draw energy from either, USB connection to your computer or external power. Launch ARduino IDE. Connect the Arduino board to your computer with a USB cable. Some LED power should be ON. Once the software starts, you have two options: you can create a new project or you can open an existing project example. To create a new project, select file → New. And then edit the file. To open an existing project example, select → example → Basics → (select an example from the list). For an explanation, we'll take one of the simplest examples called AnalogReadSerial. It reads the value from the analog A0 pin and prints it.
    [Show full text]
  • Arduino Ide Drivers & Links
    ARDUINO IDE DRIVERS & LINKS Arduino Links https://www.arduino.cc/en/Main/Software Screen Shot of Site Go to Above site Click on the appropriate Download Below in the Blue Box Note: Some Links may require you to Sign up/Log in There is No Cost. Download the Arduino IDE ARDUINO 1.8.8 The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and other open-source software. This software can be used with any Arduino board. Refer to the Getting Started page for Installation instructions. Windows Installer, for Windows XP and up Windows ZIP file for non admin install Windows app Requires Win 8.1 or 10 Mac OS X 10.8 Mountain Lion or newer Linux 32 bits Linux 64 bits Linux ARM Release Notes Source Code Checksums (sha512) Information including Links and Code (Software) Supplied or Referenced in this Document is supplied by MPJA inc. as a service to our customers and accuracy or usefulness is not guaranteed nor is it an Endorsement of any particular part, supplier or manufacturer. Use of information and suitability for any application is at users own discretion and user assumes all risk. All rights are retained by the respective Owners/Author(s) https://www.microsoft.com/en-us/p/arduino- ide/9nblggh4rsd8?ocid=badge&rtc=1&activetab=pivot:overviewtab Screen Shot Free Get Arduino IDE Arduino LLC Developer tools Description Arduino is an open-source electronics platform based on easy-to-use hardware and software.
    [Show full text]
  • Microcontroller Prototyping Platform with Expanded and Flexible Hardwired I/O Resources
    Quest Journals Journal of Electronics and Communication Engineering Research Volume 7 ~ Issue 6 (2021) pp: 01-08 ISSN(Online) : 2321-5941 www.questjournals.org Research Paper Microcontroller Prototyping Platform with expanded and flexible hardwired I/O resources. E.C. Anene1, Abubakar Musa Ibrahim2,Mahmood Abdulhameed1 1Department of Electrical and Electronics Engineering ATBU, Bauchi, Nigeria 2NCPRD/Energy Commision ATBU, Bauchi, Nigeria ABSTRACT Microcontroller Development platforms are indispensible tools for easy prototyping of microcontroller solutions to electronics projects with control applications. It eases design, simulations, testing and prototyping of standalone or embedded circuits in good times. Limitations of most if not all of these platforms include complexity of application, ease of use and cost. In this paper a platform that is intended to cut down the limitations by offering the inclusion of most common I/O devices on a single board is proposed. Costs and ease of use are to be minimized by featuring libraries that address most common requirements of each I/O resource and make it easy for the user to be able to change or adjust through software the flexible part of the application as needed. Simulations so far carried out showed functionality of the I/O resources. The necessary features to make the platform more flexible are to be added in writing the IDE code. Received 10 June, 2021; Revised: 22 June, 2021; Accepted 24 June, 2021 © The author(s) 2021. Published with open access at www.questjournals.org I. INTRODUCTION. A prototype is a first full size functional model of a product to be manufactured. It details the model to be replicated or learned from and serves to provide specifications for a real, working system rather than a theoretical one (Blackwell, 2015).The focus of theresearch into creating a prototyping platform is derived from the need to make a circuit board which is easy to use and extensiblewith little effort, cheap, and quick to realize.
    [Show full text]
  • Programming Interactivity.Pdf
    Download at Boykma.Com Programming Interactivity A Designer’s Guide to Processing, Arduino, and openFrameworks Joshua Noble Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Download at Boykma.Com Programming Interactivity by Joshua Noble Copyright © 2009 Joshua Noble. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Steve Weiss Indexer: Ellen Troutman Zaig Production Editor: Sumita Mukherji Cover Designer: Karen Montgomery Copyeditor: Kim Wimpsett Interior Designer: David Futato Proofreader: Sumita Mukherji Illustrator: Robert Romano Production Services: Newgen Printing History: July 2009: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Programming Interactivity, the image of guinea fowl, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. TM This book uses RepKover™, a durable and flexible lay-flat binding.
    [Show full text]
  • Arduino Workflow Computation + Construction Lab | College of Design, Iowa State University Arduino
    Arduino Workflow Computation + Construction Lab | College of Design, Iowa State University Arduino - Introduction - Open-source electronic platform. - Uses simple programming language to input commands, like instructions to turn on a LED light and turn it to an output using simple hardware pluged in to the Arduino Board. - The examples in this document show how a few ways Arduino can be used in Architecture and Design. Note: The content of this document has been acquired from Arduino.cc. For more information please visit https://www.arduino.cc/ Hardware Computer Arduino Board Sensors - For Input - To Process Input and Output - To Read Data or Ouput Data - Any form of computer will be needed to input - A range of Arduino Boards are available to - A wide variety of Arduino microcontrollers the required script to the Arduino. perform the required activities. and sensors are available to read input and Note: Range of tasks will vary according to the output data. capabilities of the Arduino Board. - Example: LED sensors (above). Software Arduino IDE - Programming Language - Input data and tell the Arduino what through easy-to-use code/ programming language and Arduino Development environment. Why Use Arduino? - Affordable - Arduino Boards are relatively more afforable than other microcontroller based platforms. - Cross-Platform - Runs on Windows, Mac OS and Linux. - Easy-to-use Software - Easy to learn for beginners, yet adaptable to advanced programmers. - Open Source Software - Open source properties makes the Arduino IDE software easily extensible by experienced programmers through C++ libraries. - Open Source Hardware - All Arduino boards are publised under Creative Commons license. Therefore any experienced circuit designer can make their own version of an Arduino module.
    [Show full text]
  • Create Interactive Art with Code
    foreword by nathan seidle, founder of sparkfun electronics Processing is a free, beginner-friendly programming • Create visualizations that change based on sound, language designed to help non-programmers create light, and temperature readings interactive art with code. With a little imagination and Processing as your create interactive art with code The SparkFun Guide to Processing, the first in the paintbrush, you’ll be on your way to coding your own SparkFun Electronics series, will show you how to gallery of digital art in no time! Put on your artist’s hat, craft digital artwork and even combine that artwork and begin your DIY journey by learning some basic with hardware so that it reacts to the world around programming and making your first masterpiece with you. Start with the basics of programming and The SparkFun Guide to Processing. animation as you draw colorful shapes and make A B O U T T H E A U T H O R them bounce around the screen. Then move on to a series of hands-on, step-by-step projects that Derek Runberg works in the Department of Education will show you how to: at SparkFun Electronics, where he develops educational materials for workshops and classrooms across the coun- • Make detailed pixel art and scale it to epic try. Before joining SparkFun, Runberg taught a middle proportions school technology course on Processing and Arduino. • Write a maze game and build a MaKey MaKey A B O U T SPARKFUN ELECTRONICS controller with fruit buttons SparkFun Electronics is an online retail store that sells • Play, record, and sample audio to create your electronic parts for DIY projects.
    [Show full text]
  • Installing the Arduino Ide with Ardublock
    Installing the Arduino IDE v1.6 May 2, 2014 INSTALLING THE ARDUINO IDE WITH ARDUBLOCK Hello TurtleBots students and mentors! The latest Arduino IDE is bundled with the BoEBot/TurtleBot libraries already installed, and the ArduBlock tool is now part of the Arduino IDE as well. To install the latest Arduino Integrated Development Environment (Arduino IDE): 1. Uninstall any Arduino IDE that you might have installed already; this will not remove any existing .ino or .abp programs you may have written. Step a: For Windows 7 or 8, press the Windows key and type "uninstall". Select "Uninstall a program" and select "Arduino" and “Uninstall”. Step b: For Windows XP, use the Control Panel module “Add or Remove Programs”. Select “Arduino” and “Remove”. Step c: Follow the prompts to completely uninstall the existing Arduino program. 2. Delete any ardublock-all.jar files you might have installed under your "My Documents\Arduino" folder. Step a: Open a file explorer. Step b: Navigate to "C:\Users\user\Documents\Arduino\tools\" where user is your user name on your computer. If you've moved your documents folder, it might be on the D: drive instead of C:. Step c: Delete the folder named "ArduBlockTool" and all subfolders below it. 3. Create a program folder for locally installed software. The suggested folder is "C:\Program Files Local". The file explorer should now look something like: Windows (C:) : Program Files Program Files (x86) <== on 64-bit Windows only Program Files Local : 4. Download the listed files from the DropBox "Arduino IDE" location to the "Program Files Local" folder created in the previous step: https://www.dropbox.com/sh/3xqy29yltsqa2dg/G3ncIqySEv/Arduino%20IDE Files: arduino-1_6.zip installation_notes.txt (if not already downloaded) 5.
    [Show full text]
  • Arduino IDE Instructions
    ShenZhen GETECH CO.,LTD GEEETECH Arduino IDE Instructions 一、Use of software 1. Users can download Arduino IDE from the official site. http://arduino.cc/en/Main/Software. There are many versions for different requirements. Here we suggest the latest one for its compatibility with more boards and it contains more library files. 2. Unzip the package, find out the Arduino directory file, and then double-click icon “arduino.exe”, as shown in 1-1: 1-1 3. Open the Arduino IDE, you can see the console panel as below (as shown 1-2): www.geeetech.com Tel: +86 755 2658 4110 Fax: +86 755 2658 4074 - 858 - 1 - ShenZhen GETECH CO.,LTD GEEETECH 1-2 4. Selecting the appropriate board type (as shown in 1-3). The principle of selection: 1) chooses according to the board type or board name. For example, board type: Arduino Duemilanove,CPU is Atmega328p, the user can choose these boards: Arduino Uno, Arduino Duemilanove, Arduino Duemilanove/Atmega32 etc. the wrong choice of board type will impede the download of program; therefore users should pay attention to the instructions on the board marked by manufactures when choosing board type. 2) Choose according to your own MCU model. www.geeetech.com Tel: +86 755 2658 4110 Fax: +86 755 2658 4074 - 858 - 2 - ShenZhen GETECH CO.,LTD GEEETECH 1-3 5. Choose the correct serial port (as shown in 1-4); the serial driver installation will be introduced in next section. If there is more than one COM port in the serial port list, you can hot plug the USB connected to the board to find out the correct one.
    [Show full text]
  • STUDENT IMAGE - STANDARD BASE Last Update: April 2019
    STUDENT IMAGE - STANDARD BASE Last Update: April 2019 Applications Description Publisher Category URL The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs Arduino IDE on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and Arduino code editor https://www.arduino.cc/en/Main/Software other open-source software. Audacity 2.2.2 Free, open source, cross-platform audio editing and recording software. Audacity Team audio editor https://www.audacityteam.org/ BASIC Stamp Windows Editor Parallax, Inc. code editor https://www.parallax.com/downloads/basic-stamp-editor-software-windows Windows-based editor software for the BASIC Stamp microcontrollers Automatically displays relevant information about a Windows computer on the desktop's background, BGInfo Microsoft management https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo such as the computer name, IP address The editor can be programmed to Arduino by combining blocks as Scratch. https://chrome.google.com/webstore/detail/blocklyduino- BlocklyDuino (Chrome Extension) code.makewitharduino.com code editor It will function as an external editor of Arduino of IDE. editor/ohncgafccgdbigbbikgkfbkiebahihmb?hl=en Brackets (1.11) A modern, open source text editor that understands web design, made with Javascript Brackets Project programming http://brackets.io/ Chrome Google Chrome is a freeware web browser developed by Google LLC Google LLC system https://www.google.com/chrome/ Arduino IDE in the Cloud. Codebender includes a Arduino web editor so you can code, store and https://chrome.google.com/webstore/detail/codebender- Codebender (Chrome connector app) Codebender.cc code editor manage your Arduino sketches on the cloud.
    [Show full text]