Arduino UMBC IEEE Sekar Kulandaivel

Slides:



Advertisements
Similar presentations
ARDUINO CLUB What we’re really doing. BASICS The setup() and loop() functions.
Advertisements

ARDUINO FRAMEWORK.
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Panasonic EVE-KC2F2024B 24 pulses per revolution 6mm diameter flattened output shaft output type: quadrature (incremental) minimum life: 15,000 rotations.
Digital & Analog Inputs. Review Fundamental parts of an Arduino program are … Setting output types using pinMode. Declaring variables Can write a digital.
Introduction to Arduino Programming January MER-421:Mechatronic System Design.
Introduction to Sensor Technology Week Four Adam Taylor
Analog and Digital Measurements living with the lab 14 digital input / output pins 6 analog input pins © 2011 LWTL faculty team.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
DataInputFrom Digital PinsUsing an On/OFF button to control an LEDFrom Analog Pins Reading light intensity using a photocell and turning an LED on and.
Basic Circuits – Lab 2 Arduino and Sensors
Tele-presence – Connecting Two Processing Platforms via Internet Controlling the Screen based on Distant User Input ServerClient 1.
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Code The Arduino Environment.
Serial Communication. mouseX from computer to arduino processing sends a single byte of data arduino reads each byte arduino uses value to set light brightness.
Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
Welcome to Processing Who does not have access to digital camera?
Lecture 9: Introduction to Arduino Topics: Arduino Fundamentals, Bean Date: Mar 22, 2016.
ME 120: Arduino Programming Arduino Programming Part II ME 120 Mechanical and Materials Engineering Portland State University
LAB1 TYWU. Devices Dip Switch (4 Switches) Triple Output LED (RGB) –Common Cathode.
Arduino + Bluetooth TYWu. Connection Arduino + Bluetooth Module.
Pulse Width Modulation Instructor Dr Matthew Khi Yi Kyaw.
ME 120: Photoresistors and Arduino Programming Arduino Programming Case Study: Photoresistor Measurements ME 120 Mechanical and Materials Engineering Portland.
Hacking on Arduino George Patterson
Harpeth Hall Jan 2016 Introduction to Arduino Prepared for Harpeth Hall Winterim January 2016.
Application of Programming: Scratch & Arduino
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Wireless Cue Light Project
Arduino & its hardware interfacing
Arduino Programming Part II
Cascade switching of an LED
Tele-presence – Connecting Two Processing Platforms via Internet
European Robotic LABoratory
Lab 1: Arduino Basics Topics: Arduino Fundamentals, First Circuit
Arduino Part 1 Topics: Microcontrollers Programming Basics
INC 161 , CPE 100 Computer Programming
3.0 ARDUINO WORKSHOP PRESENTATION FOR STUDENTS IN 4º DEGREE OF COMPULSORY SECONDARY EDUCATION 3.0.
Lecture 2-2: Arduino Programming
Control the color and brightness of an RGB LED with a Potentiometer
3.2 Serial Communication Part 2
3.1 Serial Communication Part 1
How to avoid catching things on fire.
Analog Input through POT
Introduction to Arduinos
Topics: Analog/Digital Read Relay control 7 segment control Buzzer
What is an Arduino ? Open Source electronic prototyping platform based on flexible easy to use hardware and software.
IoT Programming the Particle Photon.
1 Code
Using Photoresistors with an Arduino
analog and digital measurements
Arduino : Introduction & Programming
Programming 2: The Arduino IDE & First Sketches
Arduino Practice: Photoresistors, PWM, Potentiometers, Motors
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino UMBC IEEE Sekar Kulandaivel
Setting up a basic program with Arduino
CSCI1600: Embedded and Real Time Software
Arduino at UMBC Sekar Kulandaivel Week 4: LCD & Serial
Introduction to Arduinos
Model Blimp Design Competition Programming Workshop by Youth College (International) / VTC May
Arduino程式範例.
Arduino UMBC IEEE Sekar Kulandaivel Week 3: Motor Control w/ H-Bridges
Presentation transcript:

Arduino Microcontroller Workshop UMBC Institute of Electrical and Electronics Engineers Arduino UMBC IEEE Sekar Kulandaivel sekark1@umbc.edu Week 2: Communication with Processing Technical Skills Series Presentation April 10th, 2014

Processing Download: https://processing.org/download/?processing Why Processing? Visual feedback Alternative method of communication Opens doors for a variety of projects

Important Arduino Functions int val, time; void setup() { … } void loop() { … } Serial.begin(9600); Serial.print(“Hello”); Serial.println(val); delay(1000); pinMode(8, INPUT); pinMode(9, OUTPUT); val = digitalRead(8); digitalWrite(9, out); val = analogRead(A0); analogWrite(9, out); time = millis(); map(var, testLow, testHigh, mapLow, mapHigh);

const int piezoPin = A4; const int photoPin = A5; int incoming, piezoValue, photoValue; void setup() { Serial.begin(9600); while (!Serial) { // do nothing } establishContact();

void loop() { if (Serial. available() > 0) { incoming = Serial void loop() { if (Serial.available() > 0) { incoming = Serial.read(); piezoValue = analogRead(piezoPin) / 4; delay(10); photoValue = analogRead(photoPin) / 4; Serial.write(piezoValue); Serial.write(photoValue); } void establishContact() { while (Serial.available() <= 0) { Serial.print('X'); delay(300);

import processing. serial import processing.serial.*; Serial port; int bgcolor, fgcolor; int[] serialInput = new int[2]; int serialCount = 0; int xpos, ypos, size; boolean contact = false; void setup() { size(400, 400); noStroke(); xpos = 200; ypos = 200; size = 20; String arduino = Serial.list()[0]; port = new Serial(this, arduino, 9600); }

void draw() { background(bgcolor); fill(fgcolor); ellipse(xpos, ypos, size, size); }

void serialEvent(Serial port) { int incoming = port void serialEvent(Serial port) { int incoming = port.read(); if (contact == false) { if (incoming == 'X') { port.clear(); contact = true; port.write('X'); } } else { serialInput[serialCount] = incoming; serialCount++; if (serialCount > 1) { size = 100 + serialInput[0]; fgcolor = serialInput[1]; println(size + "\t" + fgcolor); serialCount = 0;

Piezoelectric Sensor Analog Resistors: 1MΩ

Photoresistor and Potentiometer

Goals for Today Create a photoresistor array. Create a virtual RGB LED. Create a program that responds to sound. Any more ideas?