Microcontroller basics

Slides:



Advertisements
Similar presentations
Lecture 1 – Arduino Basics
Advertisements

Lab7: Introduction to Arduino
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.
Embedded Sumo 1T4 – 1T5 UTRA.
Chromebook Inservice. Agenda Meet the Chromebook’s Hardware Features Google Accounts Wireless Network Connectivity and Login Procedures Initial screen.
Chapter 8 Create an App and Publish to the iPad. Apps are programs that run on the iPad. App is short for application. Exploring Apps and iPad Publishing.
Intel Galileo Gen 2 & Grove Seeed Starter Kit Gen 1
Getting your Arduino to Work: Microsoft Windows 1.Install Arduino programming environment 2.Install Arduino Uno driver 3.Make sure you can download a program.
Jeff Branson Education Outreach Coordinator Derek Runberg Curriculum Curator
Khaled A. Al-Utaibi  What is Arduino?  Arduino Boards  Arduino Shields  Arduino Uno Hardware.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
KEISER UNIVERSITY GRADUATE SCHOOL FACULTY LIBRARY HELP GUIDE A Q&A TUTORIAL TO ACCESS LIBRARY RESOURCES.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Parallax 4x20 LCD (part number 27979) with Arduino Duemilanove
Arduino John Marcoux Christopher Lesch Thomas Dodge Unless otherwise noted, all information and pictures came from:
Arduino Part 1 Topics: Microcontrollers Programming Basics: structure and variables Digital Output Analog to Digital Conversion.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Introduction to. What is Office 365 Office 365 is the same Office you already know and use every day. Office 365 is powered by “the cloud” which is a.
RC CAR CONTROLLER BASED ON INTEL GALILEO SOC PLATFORM Nadav Shiloach Sagi Sabag Supervisor: Idan Shmuel Spring 2014 One Semester Project PROJECT’S ENDING.
Chromebook Inservice. Agenda Meet the Chromebook’s Hardware Features Google Accounts and Password Changes Wireless Network Connectivity and Login Procedures.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Introduction to the Arduino
Chromebook Basics:. Chromebook Components: Memory Card Slot 3.0 USB Port USB Port HDMI Port Power Port (Charging) Head Phone Jack SD Card Slot.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Code The Arduino Environment.
Programming the Geiger Counter Board 1. Arduino Files Go to and download the latest Arduino.
Getting Started With the Arduino Uno
Connected Hardware for Software Engineers 101 Pance Cavkovski, Netcetera.
IoT: Windows 10 & Raspberry Pi By: Mitchel Sellers.
Microcontrollers, Microcomputers, and Microprocessors
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
AAPT workshop W03 July 26, 2014 Saint Cloud State University, MN, USA
Embedded systems and sensors 1 Part 2 Interaction technology Lennart Herlaar.
11111 Apollo Internet Monitoring Tutorial Apollo Solar, Inc. 23 F. J. Clarke Circle Bethel, CT (203)
Microcontroller basics Embedded systems for mortals.
Arduino Microcontroller Technical Details : Arduino (UNO R3) micro-controller ATmega 328 CPU (“industry-standard” micro-controller CPU) ?? MHz clock speed.
Microcontrollers JULES CALELLA. Microcontrollers vs Microprocessors  Microprocessors – do not contain RAM, ROM, I/O  Microcontrollers – The whole package.
Microcontroller basics Embedded systems for mortals.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
Lecture 9: Introduction to Arduino Topics: Arduino Fundamentals, Bean Date: Mar 22, 2016.
PROGRAMMING USING PYTHON LANGUAGE ASSIGNMENT 1. INSTALLATION OF RASPBERRY NOOB First prepare the SD card provided in the kit by loading an Operating System.
A microcontroller-based system for multi sensor monitoring and messaging via GSM network Bachelor thesis Angelakis Vaios Supervisor:Kazarlis S.
Make Your iPad Work for You Session 2 Brian McCarty.
Intro to Arduino Basic Arduino John Wolf (WolfDenElectronics.com)
Pulse-Width Modulation: Simulating variable DC output
ME 120: Arduino Programming Arduino Programming Part 1 ME 120 Mechanical and Materials Engineering Portland State University
Using a SparkFun™ serial LCD with an Arduino
Having fun with code, using Arduino in a middle school CS classroom
Arduino.
PhoneGap, Processing.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Dr. Kyung Eun Park Summer 2017
Val Manes Department of Math & Computer Science
Microcontroller basics
Microcontroller basics
Lab 1: Arduino Basics Topics: Arduino Fundamentals, First Circuit
Arduino Part 1 Topics: Microcontrollers Programming Basics
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.
Collaboration with Google Docs
Building an Internet of Things Device
Arduino : Introduction & Programming
Arduino Board.
Arduino म्हणजे काय?.
Arduino and Grove LET’S START.
Model Blimp Design Competition Programming Workshop by Youth College (International) / VTC May
HOME AUTOMATION SYSTEM BLUETOOTH BASED.  INTRODUCTION  PROBLEM STATEMENT  OBJECTIVES  BLOCK DIAGRAM  CIRCUIT DIAGRAM  METHODOLOGY  APPLICATIONS.
Presentation transcript:

Microcontroller basics Embedded systems for mortals

Lesson 5 What is IoT? Prototyping electronics for IoT How to connect? IoT with Blynk and ESP8266

Internet of Things ”IoT is a network of physical objects with embedded electronics that collect and share data”

https://vimeo.com/143709971

Components for IoT ESP8266 module NodeMCU 1.0 Arduino UNO wifi Shield OTA WeMos D1

ESP8266 module We are using this today Can be programmed by itself but usually connected to Arduino Price: 2 – 5 €

ESP8266 module pinout

NodeMCU 1.0 Built-in ESP8266, ”ESPduino” Works with Arduino IDE, not officially though 12 V regulator for input voltage Price: 5 – 10 € 13 GPIO, only one PWM and ADC (0-1 V) Pins work with 0 - 3,3 V! Good tutorial: http://www.makeuseof.com/tag/meet-arduino-killer-esp8266/

NodeMCU 1.0 Pinout

Arduino UNO wifi shield Nothing special Even the original as poor documentation Price Fake 10 € Original up to 70 €, can be cheaper Has micro SD card slot . . .

OTA WeMos D1 ESP8266 Embedded Works with Arduino IDE Price 10 € 11 Digital I/O pins 10 have PWM/Interrupt 1 Analog pin (max 3v3) 9 - 24 V input to power jack All pins use 0 – 3.3 V No experience of this yet There is also a miniversion which is good!

OTA WeMos D1 pinout Pin Function ESP-8266 Pin TX TXD TXD RX RXD RXD A0 Analog input, max 3.3V input A0 D0 IO GPIO16 D1 IO, SCL GPIO5 D2 IO, SDA GPIO4 D3 IO,Pull-up GPIO0 D4 IO,pull-up, BUILTIN_LED GPIO2 D5 IO, SCK GPIO14 D6 IO, MISO GPIO12 D7 IO, MOSI GPIO13 D8 IO,pull-down, SS GPIO15 G Gound GND 5V 5V - 3V3 3.3V 3.3V RST Reset RST *All IO have interrupt/pwm/I2C/one-wire supported(except D0)

Logic level converter Logic shifter 3v3 <-> 5 V if you want to use NodeMCU or OTA WeMoes D1 Price: Sparkfun 2,5 € Bi-directional, works both ways https://learn.sparkfun.com/tutorials/logic-levels

How to connect? Cloud NearBus? Ready made Blynk Server DIY?

Installing Blynk libraries http://www.blynk.cc/getting-started/ https://github.com/blynkkk/blynk-library/releases/tag/v0.3.1 Download the Blynk_v0.3.1.zip in the bottom of the page

Extracting libraries Extract the 4 folders inside the .zip to: C:\Program Files (x86)\Arduino\libraries Done!

Blynk for phone Download the app for your phone You will get a project code to your e-mail You need to copy paste it to your Arduino Code

How to connect Arduino?

Code for Arduino In the end of the presentation there is the code in text format

ESP8266 after Blynk Using the ESP8266 without an app like Blynk requires some coding skills, although lots of ready-made code can be found on the internet. You can connect with the module directly within its range or anywhere through internet. For internet connection you’ll need a website to which the module sends data or where you can send data to the module. A good basic example project can be found here http://allaboutee.com/2015/01/02/esp8266-arduino-led-control-from-webpage/ In this example you have a webpage with buttons that control LEDs connected to an Arduino with an ESP module. The module acts as a serial device, and you speak to it through AT commands. For example AT+CWLAP gives a list of the available access points (Wi-Fi networks). A list of commands can be found here: https://nurdspace.nl/ESP8266#AT_Commands

Resources • Google & Youtube - search for projects, solutions to occurring problems and data sheets for components • http://www.blynk.cc/ - Homepage of the Blynk software, getting started, community forums • http://www.esp8266.com/ - Everything on ESP8266, wiki • https://www.adafruit.com/ - Learning materials, guides, example projects, forums, store • https://github.com/ - Largest code host, lots of projects and sample code • http://allaboutee.com/ - good ESP8266 tutorials • https://nurdspace.nl/ESP8266/ - ESP8266 info and basic list of AT commands

#define BLYNK_PRINT Serial // Comment this out to disable prints and save space #include <ESP8266_SoftSer.h> #include <BlynkSimpleShieldEsp8266_SoftSer.h> #include <SimpleTimer.h> // Set ESP8266 Serial object #include <SoftwareSerial.h> SoftwareSerial EspSerial(2, 3); // RX, TX ESP8266 wifi(EspSerial); // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "your_auth_token"; float temp; int tempPin = 1; //analog pin 1 int reading; float voltage; SimpleTimer timer; void setup() { // Set console baud rate Serial.begin(9600); delay(10); // Set ESP8266 baud rate // 9600 is recommended for Software Serial EspSerial.begin(9600); Blynk.begin(auth, wifi, "ssid", "password"); // enter wifi name and password to it timer.setInterval(1000L, sendTemperature); }

// This function sends the value of "temp" every second to Virtual Pin (5). // In the app, Widget's reading frequency should be set to PUSH. This means // that you define how often to send data to Blynk App. This function is used (instead of // sending data in the loop function) to avoid over-loading the Blynk servers. void sendTemperature() { // You can send any value at any time. // Please don't send more that 10 values per second as this will cause a flood error. Blynk.virtualWrite(V5, temp); } void loop() Blynk.run(); // Initiates Blynk timer.run(); // Initiates SimpleTimer // This changes the analog pin reading to Celsius degrees, // which is then sent to Blynk in the SendTemperature function. reading = analogRead(tempPin); voltage = reading * 5; voltage /= 1024; temp = (voltage-0.5)*100;