SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
THE IOT ACADEMY
IO Pins
Image from Theory and Practice of Tangible User Interfaces at UC Berkley
In-class Exercise 1: Digital IO
 Use a push-button to turn ON/Off LED
Topic 3: Analog Input
 Think about music stored on a CD---an analog
signal captured on digital media
 Sample rate
 Word length
Arduino Analog Input
 Resolution: the number of
different voltage levels (i.e.,
states) used to discretize an
input signal
 Resolution values range from
256 states (8 bits) to
4,294,967,296 states (32 bits)
 The Arduino uses 1024 states
(10 bits)
 Smallest measurable voltage
change is 5V/1024 or 4.8 mV
 Maximum sample rate is
10,000 times a second
How does ADC work?
Topic 3: Analog Output
 Can a digital devise produce analog output?
• Analog output can be simulated using pulse width
modulation (PWM)
Image from Theory and Practice of Tangible User Interfaces at UC Berkley
Pulse Width Modulation
• Can’t use digital pins to
directly supply say 2.5V, but
can pulse the output on and
off really fast to produce the
same effect
• The on-off pulsing happens so
quickly, the connected output
device “sees” the result as a
reduction in the voltage
Image from Theory and Practice ofTangibleUserInterfaces atUC Berkley
PWM Duty Cycle
Fixed cycle length; constant
number of cycles/sec
Image credit:Tod Kurt
output voltage = (on_time / cycle_time) * 5V
PMW Pins
• Command:
analogWrite(pin,value)
• value is duty cycle:
between 0 and 255
• Examples:
analogWrite(9, 128)
for a 50% duty cycle
analogWrite(11, 64)
for a 25% duty cycle
Image from Theory and Practice ofTangibleUserInterfaces atUC Berkley
In-class Exercise 2: Analog IO
A light theremin
Part 1:
Theremin
an electronic musical
instrument in which the tone
is generated by two high-
frequency oscillators and
the pitch controlled by the
movement of the
performer's hand towards
and away from the circuit.
In-class Exercise 2: Analog IO
 Add a 330 ohm resistor and an LED to pin 9
 Using the analogWrite() command, set the
intensity of the LED as a function of the valueof
prReading
Part 2: Add an LED
Topic 4: Serial Communication
Image from http://www.ladyada.net/learn/arduino/lesson4.html
Serial Communication
• Compiling turns your program into
binary data (ones and zeros)
• Uploading sends the bits through
USB cable to the Arduino
• The two LEDs near the USB
connector blink when data is
transmitted
• RX blinks when the Arduino is
receiving data
• TX blinks when the Arduino is
transmitting data
Open the Serial Monitor and Upload the
Program
Some Commands
• Serial.begin()
- e.g., Serial.begin(9600)
• Serial.print() or Serial.println()
- e.g., Serial.print(value)
• Serial.read()
• Serial.available()
• Serial.write()
• Serial.parseInt()
• Example Program
Serial-to-USBchip---whatdoes it do?
Image from Theory and Practice of Tangible User Interfaces at UC Berkley
The LilyPad and Fio Arduino require an external USB to
TTY connector, such as an FTDI “cable”.
In the Arduino Leonardo a single microcontroller runs the
Arduino programs and handles the USB connection.
Two different communication
protocols
Serial (TTL):
Image from http://www.fiz-ix.com/2013/02/introduction-to-arduino-serial-communication/
USB Protocol
In-class Exercise 3: Serial Communication
Modify your program from in-class exercise 2-part 2 to control
the intensity of the LED attached to pin 9 based on keyboard
input.
Use the Serial.parseInt() method to read numeric keyboard
input as an integer.
An input of 9 should produce full intensity and an input of 0
should turn the LED off.
The IoT Academy IoT training Arduino Part 4 Arduino interfaces
The IoT Academy IoT training Arduino Part 4 Arduino interfaces

Contenu connexe

Tendances

To measure the intensity of light using LDR sensor by calibrating voltage wit...
To measure the intensity of light using LDR sensor by calibrating voltage wit...To measure the intensity of light using LDR sensor by calibrating voltage wit...
To measure the intensity of light using LDR sensor by calibrating voltage wit...Ankita Tiwari
 
Analogue and digital systems
Analogue and digital systemsAnalogue and digital systems
Analogue and digital systemsEdmund Merren
 
An Introduction to Electroencephalography
An Introduction to ElectroencephalographyAn Introduction to Electroencephalography
An Introduction to ElectroencephalographyJoshua Baker
 
Analogue to digital conversion
Analogue to digital conversionAnalogue to digital conversion
Analogue to digital conversionsimonandisa
 
Arduino slides
Arduino slidesArduino slides
Arduino slidessdcharle
 
53211820
5321182053211820
53211820noob100
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriGaurav Pandey
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixelssdcharle
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Ankita Tiwari
 
To count number of external events using LabVIEW
To count number of external events using LabVIEWTo count number of external events using LabVIEW
To count number of external events using LabVIEWAnkita Tiwari
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshopatuline
 
Raspberry pi tutorial #3
Raspberry pi tutorial #3Raspberry pi tutorial #3
Raspberry pi tutorial #3동호 손
 

Tendances (20)

To measure the intensity of light using LDR sensor by calibrating voltage wit...
To measure the intensity of light using LDR sensor by calibrating voltage wit...To measure the intensity of light using LDR sensor by calibrating voltage wit...
To measure the intensity of light using LDR sensor by calibrating voltage wit...
 
Analogue and digital systems
Analogue and digital systemsAnalogue and digital systems
Analogue and digital systems
 
An Introduction to Electroencephalography
An Introduction to ElectroencephalographyAn Introduction to Electroencephalography
An Introduction to Electroencephalography
 
Basic Sensors
Basic Sensors Basic Sensors
Basic Sensors
 
Arduino course
Arduino courseArduino course
Arduino course
 
Adc & dac
Adc & dacAdc & dac
Adc & dac
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 
Lec 5
Lec 5Lec 5
Lec 5
 
Analogue to digital conversion
Analogue to digital conversionAnalogue to digital conversion
Analogue to digital conversion
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
53211820
5321182053211820
53211820
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.
 
To count number of external events using LabVIEW
To count number of external events using LabVIEWTo count number of external events using LabVIEW
To count number of external events using LabVIEW
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Ardui no
Ardui no Ardui no
Ardui no
 
Arduino
ArduinoArduino
Arduino
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
Raspberry pi tutorial #3
Raspberry pi tutorial #3Raspberry pi tutorial #3
Raspberry pi tutorial #3
 

Similaire à The IoT Academy IoT training Arduino Part 4 Arduino interfaces

Fundamentals of programming Arduino-Wk2.ppt
Fundamentals of programming Arduino-Wk2.pptFundamentals of programming Arduino-Wk2.ppt
Fundamentals of programming Arduino-Wk2.pptansariparveen06
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming FamiliarizationAmit Kumer Podder
 
arduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdfarduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdfAbdErrezakChahoub
 
10 11_gen_revision_notes_term_3
10  11_gen_revision_notes_term_310  11_gen_revision_notes_term_3
10 11_gen_revision_notes_term_3CDI Aljeer
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduinoavikdhupar
 
Analog to Digital Conversion Using Microcontroller Education Boards
Analog to Digital Conversion Using Microcontroller Education BoardsAnalog to Digital Conversion Using Microcontroller Education Boards
Analog to Digital Conversion Using Microcontroller Education BoardsKyle VanDruten
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptxHebaEng
 
ArduinoSectionI-slides.ppt
ArduinoSectionI-slides.pptArduinoSectionI-slides.ppt
ArduinoSectionI-slides.pptLam Hung
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino MajdyShamasneh
 
Introduction to Arduino Webinar
Introduction to Arduino WebinarIntroduction to Arduino Webinar
Introduction to Arduino WebinarFragiskos Fourlas
 
Getting started with arduino workshop
Getting started with arduino workshopGetting started with arduino workshop
Getting started with arduino workshopSudar Muthu
 
Arduino frequency counter
Arduino frequency counterArduino frequency counter
Arduino frequency counternasyith_hananur
 
SKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfSKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfKadiriIbrahim2
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfssusere5db05
 

Similaire à The IoT Academy IoT training Arduino Part 4 Arduino interfaces (20)

Fundamentals of programming Arduino-Wk2.ppt
Fundamentals of programming Arduino-Wk2.pptFundamentals of programming Arduino-Wk2.ppt
Fundamentals of programming Arduino-Wk2.ppt
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
 
arduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdfarduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdf
 
10 11_gen_revision_notes_term_3
10  11_gen_revision_notes_term_310  11_gen_revision_notes_term_3
10 11_gen_revision_notes_term_3
 
IOT beginnners
IOT beginnnersIOT beginnners
IOT beginnners
 
IOT beginnners
IOT beginnnersIOT beginnners
IOT beginnners
 
Intro_to_Arduino_-_v30.pptx
Intro_to_Arduino_-_v30.pptxIntro_to_Arduino_-_v30.pptx
Intro_to_Arduino_-_v30.pptx
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
IOT Week 20.pptx
IOT Week 20.pptxIOT Week 20.pptx
IOT Week 20.pptx
 
Analog to Digital Conversion Using Microcontroller Education Boards
Analog to Digital Conversion Using Microcontroller Education BoardsAnalog to Digital Conversion Using Microcontroller Education Boards
Analog to Digital Conversion Using Microcontroller Education Boards
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 
ArduinoSectionI-slides.ppt
ArduinoSectionI-slides.pptArduinoSectionI-slides.ppt
ArduinoSectionI-slides.ppt
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino
 
Neno Project.docx
Neno Project.docxNeno Project.docx
Neno Project.docx
 
Introduction to Arduino Webinar
Introduction to Arduino WebinarIntroduction to Arduino Webinar
Introduction to Arduino Webinar
 
Getting started with arduino workshop
Getting started with arduino workshopGetting started with arduino workshop
Getting started with arduino workshop
 
Arduino frequency counter
Arduino frequency counterArduino frequency counter
Arduino frequency counter
 
B1_25Jan21.pptx
B1_25Jan21.pptxB1_25Jan21.pptx
B1_25Jan21.pptx
 
SKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfSKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdf
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 

Plus de The IOT Academy

Embedded Systems Programming
Embedded Systems ProgrammingEmbedded Systems Programming
Embedded Systems ProgrammingThe IOT Academy
 
Introduction to Digital Marketing Certification Course.pdf
Introduction to Digital Marketing Certification Course.pdfIntroduction to Digital Marketing Certification Course.pdf
Introduction to Digital Marketing Certification Course.pdfThe IOT Academy
 
Google SEO 2023: Complete SEO Guide
Google SEO 2023: Complete SEO GuideGoogle SEO 2023: Complete SEO Guide
Google SEO 2023: Complete SEO GuideThe IOT Academy
 
Embedded C The IoT Academy
Embedded C The IoT AcademyEmbedded C The IoT Academy
Embedded C The IoT AcademyThe IOT Academy
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming LanguageThe IOT Academy
 
MachineLlearning introduction
MachineLlearning introductionMachineLlearning introduction
MachineLlearning introductionThe IOT Academy
 
IoT Node-Red Presentation
IoT  Node-Red PresentationIoT  Node-Red Presentation
IoT Node-Red PresentationThe IOT Academy
 
IoT Introduction Architecture and Applications
IoT Introduction Architecture and ApplicationsIoT Introduction Architecture and Applications
IoT Introduction Architecture and ApplicationsThe IOT Academy
 
UCT IoT Deployment and Challenges
UCT IoT Deployment and ChallengesUCT IoT Deployment and Challenges
UCT IoT Deployment and ChallengesThe IOT Academy
 
UCT Electrical Vehicle Infrastructure
UCT Electrical Vehicle InfrastructureUCT Electrical Vehicle Infrastructure
UCT Electrical Vehicle InfrastructureThe IOT Academy
 
Fdp uct industry4.0_talk
Fdp uct industry4.0_talkFdp uct industry4.0_talk
Fdp uct industry4.0_talkThe IOT Academy
 
Success ladder to the Corporate world
Success ladder to the Corporate worldSuccess ladder to the Corporate world
Success ladder to the Corporate worldThe IOT Academy
 
The iot academy_lpwan_lora
The iot academy_lpwan_loraThe iot academy_lpwan_lora
The iot academy_lpwan_loraThe IOT Academy
 
The iot academy_embeddedsystems_training_circuitdesignpart3
The iot academy_embeddedsystems_training_circuitdesignpart3The iot academy_embeddedsystems_training_circuitdesignpart3
The iot academy_embeddedsystems_training_circuitdesignpart3The IOT Academy
 
The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2The IOT Academy
 
The iot academy_embeddedsystems_training_basicelectronicspart1
The iot academy_embeddedsystems_training_basicelectronicspart1The iot academy_embeddedsystems_training_basicelectronicspart1
The iot academy_embeddedsystems_training_basicelectronicspart1The IOT Academy
 
The iotacademy industry4.0_talk_slideshare
The iotacademy industry4.0_talk_slideshareThe iotacademy industry4.0_talk_slideshare
The iotacademy industry4.0_talk_slideshareThe IOT Academy
 
The iot acdemy_awstraining_part4_aws_lab
The iot acdemy_awstraining_part4_aws_labThe iot acdemy_awstraining_part4_aws_lab
The iot acdemy_awstraining_part4_aws_labThe IOT Academy
 

Plus de The IOT Academy (20)

Embedded Systems Programming
Embedded Systems ProgrammingEmbedded Systems Programming
Embedded Systems Programming
 
Introduction to Digital Marketing Certification Course.pdf
Introduction to Digital Marketing Certification Course.pdfIntroduction to Digital Marketing Certification Course.pdf
Introduction to Digital Marketing Certification Course.pdf
 
Google SEO 2023: Complete SEO Guide
Google SEO 2023: Complete SEO GuideGoogle SEO 2023: Complete SEO Guide
Google SEO 2023: Complete SEO Guide
 
Embedded C The IoT Academy
Embedded C The IoT AcademyEmbedded C The IoT Academy
Embedded C The IoT Academy
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
MachineLlearning introduction
MachineLlearning introductionMachineLlearning introduction
MachineLlearning introduction
 
IoT Node-Red Presentation
IoT  Node-Red PresentationIoT  Node-Red Presentation
IoT Node-Red Presentation
 
IoT Introduction Architecture and Applications
IoT Introduction Architecture and ApplicationsIoT Introduction Architecture and Applications
IoT Introduction Architecture and Applications
 
UCT IoT Deployment and Challenges
UCT IoT Deployment and ChallengesUCT IoT Deployment and Challenges
UCT IoT Deployment and Challenges
 
UCT Electrical Vehicle Infrastructure
UCT Electrical Vehicle InfrastructureUCT Electrical Vehicle Infrastructure
UCT Electrical Vehicle Infrastructure
 
Uct 5G Autonomous Cars
Uct 5G Autonomous CarsUct 5G Autonomous Cars
Uct 5G Autonomous Cars
 
Fdp uct industry4.0_talk
Fdp uct industry4.0_talkFdp uct industry4.0_talk
Fdp uct industry4.0_talk
 
Success ladder to the Corporate world
Success ladder to the Corporate worldSuccess ladder to the Corporate world
Success ladder to the Corporate world
 
The iot academy_lpwan_lora
The iot academy_lpwan_loraThe iot academy_lpwan_lora
The iot academy_lpwan_lora
 
The iot academy_embeddedsystems_training_circuitdesignpart3
The iot academy_embeddedsystems_training_circuitdesignpart3The iot academy_embeddedsystems_training_circuitdesignpart3
The iot academy_embeddedsystems_training_circuitdesignpart3
 
The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2
 
The iot academy_embeddedsystems_training_basicelectronicspart1
The iot academy_embeddedsystems_training_basicelectronicspart1The iot academy_embeddedsystems_training_basicelectronicspart1
The iot academy_embeddedsystems_training_basicelectronicspart1
 
The iot academy_lpwan
The iot academy_lpwanThe iot academy_lpwan
The iot academy_lpwan
 
The iotacademy industry4.0_talk_slideshare
The iotacademy industry4.0_talk_slideshareThe iotacademy industry4.0_talk_slideshare
The iotacademy industry4.0_talk_slideshare
 
The iot acdemy_awstraining_part4_aws_lab
The iot acdemy_awstraining_part4_aws_labThe iot acdemy_awstraining_part4_aws_lab
The iot acdemy_awstraining_part4_aws_lab
 

Dernier

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 

Dernier (20)

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 

The IoT Academy IoT training Arduino Part 4 Arduino interfaces

  • 2. IO Pins Image from Theory and Practice of Tangible User Interfaces at UC Berkley
  • 3. In-class Exercise 1: Digital IO  Use a push-button to turn ON/Off LED
  • 4. Topic 3: Analog Input  Think about music stored on a CD---an analog signal captured on digital media  Sample rate  Word length
  • 5. Arduino Analog Input  Resolution: the number of different voltage levels (i.e., states) used to discretize an input signal  Resolution values range from 256 states (8 bits) to 4,294,967,296 states (32 bits)  The Arduino uses 1024 states (10 bits)  Smallest measurable voltage change is 5V/1024 or 4.8 mV  Maximum sample rate is 10,000 times a second
  • 6. How does ADC work?
  • 7. Topic 3: Analog Output  Can a digital devise produce analog output? • Analog output can be simulated using pulse width modulation (PWM) Image from Theory and Practice of Tangible User Interfaces at UC Berkley
  • 8. Pulse Width Modulation • Can’t use digital pins to directly supply say 2.5V, but can pulse the output on and off really fast to produce the same effect • The on-off pulsing happens so quickly, the connected output device “sees” the result as a reduction in the voltage Image from Theory and Practice ofTangibleUserInterfaces atUC Berkley
  • 9. PWM Duty Cycle Fixed cycle length; constant number of cycles/sec Image credit:Tod Kurt output voltage = (on_time / cycle_time) * 5V
  • 10. PMW Pins • Command: analogWrite(pin,value) • value is duty cycle: between 0 and 255 • Examples: analogWrite(9, 128) for a 50% duty cycle analogWrite(11, 64) for a 25% duty cycle Image from Theory and Practice ofTangibleUserInterfaces atUC Berkley
  • 11. In-class Exercise 2: Analog IO A light theremin Part 1: Theremin an electronic musical instrument in which the tone is generated by two high- frequency oscillators and the pitch controlled by the movement of the performer's hand towards and away from the circuit.
  • 12. In-class Exercise 2: Analog IO  Add a 330 ohm resistor and an LED to pin 9  Using the analogWrite() command, set the intensity of the LED as a function of the valueof prReading Part 2: Add an LED
  • 13. Topic 4: Serial Communication Image from http://www.ladyada.net/learn/arduino/lesson4.html
  • 14.
  • 15. Serial Communication • Compiling turns your program into binary data (ones and zeros) • Uploading sends the bits through USB cable to the Arduino • The two LEDs near the USB connector blink when data is transmitted • RX blinks when the Arduino is receiving data • TX blinks when the Arduino is transmitting data
  • 16. Open the Serial Monitor and Upload the Program
  • 17. Some Commands • Serial.begin() - e.g., Serial.begin(9600) • Serial.print() or Serial.println() - e.g., Serial.print(value) • Serial.read() • Serial.available() • Serial.write() • Serial.parseInt() • Example Program
  • 18. Serial-to-USBchip---whatdoes it do? Image from Theory and Practice of Tangible User Interfaces at UC Berkley The LilyPad and Fio Arduino require an external USB to TTY connector, such as an FTDI “cable”. In the Arduino Leonardo a single microcontroller runs the Arduino programs and handles the USB connection.
  • 19. Two different communication protocols Serial (TTL): Image from http://www.fiz-ix.com/2013/02/introduction-to-arduino-serial-communication/
  • 21. In-class Exercise 3: Serial Communication Modify your program from in-class exercise 2-part 2 to control the intensity of the LED attached to pin 9 based on keyboard input. Use the Serial.parseInt() method to read numeric keyboard input as an integer. An input of 9 should produce full intensity and an input of 0 should turn the LED off.