SlideShare une entreprise Scribd logo
1  sur  14
Omer Kilic | omer@tinkersoc.org
Interfacing? A B
Standard Computer Interfaces Wired USB Serial Port Parallel Port Firewire Ethernet And others… ,[object Object]
WiFi
Bluetooth
IrDA,[object Object]
RS232 – The Serial Port Asynchronous serial communications protocol No clock is sent - the receiver must provide the clock signal Data rate must be known by transmitter and receiver Arduino implements a ‘virtual’ serial port via USB http://arduino.cc/en/Reference/Serial
Voltage Levels Different devices may have different voltage levels Example: RS232 Voltage levels specified as +12/-12 volts in the standard Hooking these levels up to the micro will FRY it! Solution: Use a level converter
RS232 Level Converter
Virtual COM Ports Serial port via USB Applications think they are talking to a serial port, which is emulated by the drivers No need to have a physical serial port! Most new machines don’t have them anyway A LogicalChoice(tm) !
Example Project: Thermometer A temperature sensor is connected to an analog input on the Arduino Arduino periodically reports the temperature back to PC PC uses this data to plot graphs etc.
It’s an analog world… Digital – only has two values: on/off Analog – has many (infinite) values Computers don’t really do analog So they fake it, with quantization From Tod E. Kurt’s ‘Spooky Projects’ notes - http://todbot.com/blog/spookyarduino/
Thermometer: Arduino Code intsensorPin = 0;	// the analog pin that the sensor is connected to void setup(){ Serial.begin(9600); } void loop(){ //getting the voltage reading from the temperature sensor int reading = analogRead(sensorPin);   // converting that reading to voltage, for 3.3v arduino use 3.3 float voltage = reading * 5.0 / 1024;  // print out the voltage Serial.print(voltage); Serial.println(" volts"); // now print out the temperature floattemperatureC = (voltage - 0.5) * 100;   // converting from 10 mV per degree with 500 mV offset  // to degrees ((voltage - 500mV) times 100) Serial.print(temperatureC); Serial.println(" degress C"); delay(1000);	// wait a second } From Ladyada’s TMP36 Tutorial -  http://www.ladyada.net/learn/sensors/tmp36.html
Thermometer: PC Side Read the incoming data every X seconds (cron) Collect and plot temperature graphs (rrdtool) Example: thermostat-graph http://www.anders.com/projects/thermostat-graph/ Not an Arduino project but easily hackable!

Contenu connexe

Tendances

Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
Ahmed Sakr
 
Presentation on History of Microcontroller(Updated - 2)
Presentation on History of Microcontroller(Updated - 2)Presentation on History of Microcontroller(Updated - 2)
Presentation on History of Microcontroller(Updated - 2)
ALPESH MARU
 
Proportional integral and derivative PID controller
Proportional integral and derivative PID controller Proportional integral and derivative PID controller
Proportional integral and derivative PID controller
Mostafa Ragab
 

Tendances (20)

Embedded system
Embedded systemEmbedded system
Embedded system
 
Embedded System Presentation
Embedded System PresentationEmbedded System Presentation
Embedded System Presentation
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
 
Sensors And Actuators
Sensors And ActuatorsSensors And Actuators
Sensors And Actuators
 
Home automation using IoT
Home automation using IoTHome automation using IoT
Home automation using IoT
 
Ardui no
Ardui no Ardui no
Ardui no
 
bio battery ppt
bio battery pptbio battery ppt
bio battery ppt
 
Arduino- Serial communication
Arduino-  Serial communicationArduino-  Serial communication
Arduino- Serial communication
 
Introduction to Raspberry PI
Introduction to Raspberry PIIntroduction to Raspberry PI
Introduction to Raspberry PI
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
Presentation on History of Microcontroller(Updated - 2)
Presentation on History of Microcontroller(Updated - 2)Presentation on History of Microcontroller(Updated - 2)
Presentation on History of Microcontroller(Updated - 2)
 
Digital voltmeter
Digital voltmeterDigital voltmeter
Digital voltmeter
 
Proportional integral and derivative PID controller
Proportional integral and derivative PID controller Proportional integral and derivative PID controller
Proportional integral and derivative PID controller
 
PPT on INDUSTRIAL AUTOMATION, PLC, SCADA
 PPT on INDUSTRIAL AUTOMATION, PLC, SCADA PPT on INDUSTRIAL AUTOMATION, PLC, SCADA
PPT on INDUSTRIAL AUTOMATION, PLC, SCADA
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
Computational models
Computational modelsComputational models
Computational models
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Sns slide 1 2011
Sns slide 1 2011Sns slide 1 2011
Sns slide 1 2011
 

En vedette

RFID and IR Based Attendance System
RFID and IR Based Attendance SystemRFID and IR Based Attendance System
RFID and IR Based Attendance System
Atiq Shaikh
 
RFID attendance system
RFID attendance systemRFID attendance system
RFID attendance system
A.k. Goverdhan
 

En vedette (20)

Interfacing to lcd with arduino
Interfacing  to lcd with arduinoInterfacing  to lcd with arduino
Interfacing to lcd with arduino
 
Lcd with arduino uno
Lcd with arduino unoLcd with arduino uno
Lcd with arduino uno
 
Arduino uno lcd display 16x2
Arduino uno lcd display 16x2Arduino uno lcd display 16x2
Arduino uno lcd display 16x2
 
BlueMaemo - Bluetooth HID mouse & keyboard for Maemo
BlueMaemo - Bluetooth HID mouse & keyboard for MaemoBlueMaemo - Bluetooth HID mouse & keyboard for Maemo
BlueMaemo - Bluetooth HID mouse & keyboard for Maemo
 
Bluetooth android application For interfacing with arduino
Bluetooth android application For interfacing with arduinoBluetooth android application For interfacing with arduino
Bluetooth android application For interfacing with arduino
 
Interfacing bluetooth with arduino
Interfacing bluetooth with arduinoInterfacing bluetooth with arduino
Interfacing bluetooth with arduino
 
Getting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and ArduinoGetting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and Arduino
 
Port Interfacing
Port InterfacingPort Interfacing
Port Interfacing
 
Main schotky diode
Main schotky diodeMain schotky diode
Main schotky diode
 
RFID and IR Based Attendance System
RFID and IR Based Attendance SystemRFID and IR Based Attendance System
RFID and IR Based Attendance System
 
WATER LEVEL MEASURE AND CONTROL WITH ULTRASONIK SENSOR AND ARDUINO UNO
WATER LEVEL MEASURE AND CONTROL WITH ULTRASONIK SENSOR AND ARDUINO UNOWATER LEVEL MEASURE AND CONTROL WITH ULTRASONIK SENSOR AND ARDUINO UNO
WATER LEVEL MEASURE AND CONTROL WITH ULTRASONIK SENSOR AND ARDUINO UNO
 
RFID Based Student Attendance Management System in India
RFID Based Student Attendance Management System in IndiaRFID Based Student Attendance Management System in India
RFID Based Student Attendance Management System in India
 
Arduino lcd display
Arduino lcd displayArduino lcd display
Arduino lcd display
 
RFID attendance system
RFID attendance systemRFID attendance system
RFID attendance system
 
Design Development of Water Monitoring Systems by Using Arduino and Sensors
Design Development of Water Monitoring Systems by Using Arduino and SensorsDesign Development of Water Monitoring Systems by Using Arduino and Sensors
Design Development of Water Monitoring Systems by Using Arduino and Sensors
 
LCD Theory and Working Principles
LCD Theory and Working PrinciplesLCD Theory and Working Principles
LCD Theory and Working Principles
 
Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
Bidirectional Visitor Counter using IR sensors and Arduino Uno R3Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
 
Soil Moisture Sensor and Arduino
Soil Moisture Sensor and Arduino Soil Moisture Sensor and Arduino
Soil Moisture Sensor and Arduino
 
Arduino uno
Arduino unoArduino uno
Arduino uno
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-Presented
 

Similaire à Interfacing with Arduino

teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
ethannguyen1618
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
Jayanthi Kannan MK
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
HebaEng
 

Similaire à Interfacing with Arduino (20)

Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
 
Arduino
ArduinoArduino
Arduino
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshop
 
Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
 
Multi Sensory Communication 2/2
Multi Sensory Communication 2/2Multi Sensory Communication 2/2
Multi Sensory Communication 2/2
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
INT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdfINT4073 L07(Sensors and AcutTORS).pdf
INT4073 L07(Sensors and AcutTORS).pdf
 
ARDUINO (1).pdf
ARDUINO (1).pdfARDUINO (1).pdf
ARDUINO (1).pdf
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 

Plus de Omer Kilic

Fast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profitFast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profit
Omer Kilic
 
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing WorldCloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Omer Kilic
 
Taking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded FrameworkTaking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded Framework
Omer Kilic
 
Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!
Omer Kilic
 

Plus de Omer Kilic (17)

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsBare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
 
Gearing up for Volume Manufacturing
Gearing up for Volume ManufacturingGearing up for Volume Manufacturing
Gearing up for Volume Manufacturing
 
The Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsThe Process of Shipping Hardware Products
The Process of Shipping Hardware Products
 
Confusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware Kerfuffle
 
Fast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profitFast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profit
 
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing WorldCloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
 
Taking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded FrameworkTaking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded Framework
 
Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!
 
The Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded DomainThe Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded Domain
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the World
 
From Breadboard to Finished Product
From Breadboard to Finished ProductFrom Breadboard to Finished Product
From Breadboard to Finished Product
 
A Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicA Quick Introduction to Programmable Logic
A Quick Introduction to Programmable Logic
 
concurrency.cc OSHUG #3
concurrency.cc OSHUG #3concurrency.cc OSHUG #3
concurrency.cc OSHUG #3
 
BURO Arduino Workshop
BURO Arduino WorkshopBURO Arduino Workshop
BURO Arduino Workshop
 
Introduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyIntroduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon Technology
 
TinkerSoc Electronics 101
TinkerSoc Electronics 101TinkerSoc Electronics 101
TinkerSoc Electronics 101
 
Beer Bottle Night Lamp
Beer Bottle Night LampBeer Bottle Night Lamp
Beer Bottle Night Lamp
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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 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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Interfacing with Arduino

  • 1. Omer Kilic | omer@tinkersoc.org
  • 3.
  • 6.
  • 7. RS232 – The Serial Port Asynchronous serial communications protocol No clock is sent - the receiver must provide the clock signal Data rate must be known by transmitter and receiver Arduino implements a ‘virtual’ serial port via USB http://arduino.cc/en/Reference/Serial
  • 8. Voltage Levels Different devices may have different voltage levels Example: RS232 Voltage levels specified as +12/-12 volts in the standard Hooking these levels up to the micro will FRY it! Solution: Use a level converter
  • 10. Virtual COM Ports Serial port via USB Applications think they are talking to a serial port, which is emulated by the drivers No need to have a physical serial port! Most new machines don’t have them anyway A LogicalChoice(tm) !
  • 11. Example Project: Thermometer A temperature sensor is connected to an analog input on the Arduino Arduino periodically reports the temperature back to PC PC uses this data to plot graphs etc.
  • 12. It’s an analog world… Digital – only has two values: on/off Analog – has many (infinite) values Computers don’t really do analog So they fake it, with quantization From Tod E. Kurt’s ‘Spooky Projects’ notes - http://todbot.com/blog/spookyarduino/
  • 13. Thermometer: Arduino Code intsensorPin = 0; // the analog pin that the sensor is connected to void setup(){ Serial.begin(9600); } void loop(){ //getting the voltage reading from the temperature sensor int reading = analogRead(sensorPin); // converting that reading to voltage, for 3.3v arduino use 3.3 float voltage = reading * 5.0 / 1024; // print out the voltage Serial.print(voltage); Serial.println(" volts"); // now print out the temperature floattemperatureC = (voltage - 0.5) * 100; // converting from 10 mV per degree with 500 mV offset // to degrees ((voltage - 500mV) times 100) Serial.print(temperatureC); Serial.println(" degress C"); delay(1000); // wait a second } From Ladyada’s TMP36 Tutorial - http://www.ladyada.net/learn/sensors/tmp36.html
  • 14. Thermometer: PC Side Read the incoming data every X seconds (cron) Collect and plot temperature graphs (rrdtool) Example: thermostat-graph http://www.anders.com/projects/thermostat-graph/ Not an Arduino project but easily hackable!
  • 16. Thank you for listening Any questions? Further questions/comments to omer@tinkersoc.org please…