SlideShare uma empresa Scribd logo
1 de 37
Baixar para ler offline
Making things sense
Urban sensing and physical computing
           Day 2 (7-8 May 2011)

        Markus Rittenbruch
        QUT Urban Informatics / FAST & NICTA
Schedule - Day 2
•   12:00 - 12:10 Introduction

•   12:10 - 12:30 Analogue sensors

•   12:30 - 13:00 Activity

•   13:00 - 14:00 Sharing sensor data

•   14:00 - 14:10 Short break

•   14:10 - 16:10 Project activity

•   16:10 - 16:50 Project presentations

•   16:50 - 17:00 Wrap up
Making things sense - Day 2
Programming
Programming
Data types




 When variables are made to exceed their maximum capacity they "roll over" back to their minimum capacity, note that this happens in both
 directions.


    int x
    x = -32,768;
    x = x - 1;         // x now contains 32,767 - rolls over in neg. direction


    x = 32,767;
    x = x + 1;         // x now contains -32,768 - rolls over




Float & casting:
Programming
Float & casting:
  int x;
     int y;
     float z;

     x = 1;
     y = x / 2;            // y now contains 0, ints can't hold fractions
     z = (float)x / 2.0;   // z now contains .5 (you have to use 2.0, not 2)
Resources
•   Language reference:
    •   http://www.arduino.cc/en/Reference/HomePage

    •   http://arduino.cc/en/Reference/Extended

    •   General code library:
    •   http://arduino.cc/en/Reference/Libraries

•   Interfacing with hardware:
    •   http://www.arduino.cc/playground/Main/InterfacingWithHardware

•   Examples
    •   http://arduino.cc/en/Tutorial/HomePage
Analogue sensors
Analogue sensor pins


•   Use analogue in pins 0-5 for analogRead()

•   Address as 14-19 when used as digital pins
    •   digitalWrite(), digitalRead()

•   No pinMode required for analogRead();
Analogue sensor input




•   File/Examples/Analog/AnalogInput
Analogue sensor input
Programming                                   Conditionals




    http://www.ladyada.net/learn/arduino/lesson5.html
AnalogInput
Calibration -
   part 1
Calibration - part 2




•       map(): remap a number from one range to another
    •    val = map(val, 0, 1023, 0, 255);

•       constrain(): constrain to a number range
Project activity 1 -
   Calibration
Components
 •   RGB LED:
Components
•    LED matrix
    http://www.sparkfun.com/datasheets/Components/LED/YSM-1288CR3G2C.pdf
Components
 •   MAX7219 LED driver




http://arduino.cc/playground/Main/MAX72XXHardware
http://www.arduino.cc/playground/Main/LEDMatrix
Project activity II -
     Projects
So, you’ve got an Arduino
and now you want to
make it talk
Or, maybe you want to
talk to it...
...from the other side of the world
This session of the workshop will
show you some ways of doing that.
Arduino to the world
• Arduino direct to Pachube via ethernet/wifi
  shield
• Or Arduino to PC via serial, then to
  Pachube/Twitter
• We’re taking the second approach in this
  workshop, since the kits we provided don’t
  include ethernet/wifi shields
Step 1: Register a feed
     on Pachube
Step 2: Write some
        code
Arduino Sketch
Ruby “Bridge”: setup
Ruby “Bridge”: the loop
Step 3: See your data
    on Pachube
Advanced topics
•   PCB design

•   Wireless communication
    •   Xbee

    •   Bluetooth

    •   Wifi

    •   Infrared

    •   Radio

•   Real-time communication

•   Multi-tasking
Resources

• http://apiwiki.twitter.com/
• http://community.pachube.com/api
• http://community.pachube.com/tutorials
• http://community.pachube.com/triggers/
  twitter
What next?
• Hackerspace Brisbane
    •   http://hackerspaces.org/wiki/Hackerspace_Brisbane

•   Living Dolls (The Edge)

    •   http://edgeqld.org.au/blog/2011/04/07/living-dolls/

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Arduino course
Arduino courseArduino course
Arduino course
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Blinky 101 with Arduino v1.0b3 (FastLED)
Blinky 101 with Arduino v1.0b3 (FastLED)Blinky 101 with Arduino v1.0b3 (FastLED)
Blinky 101 with Arduino v1.0b3 (FastLED)
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the Arduino
 
arduino-ppt
 arduino-ppt arduino-ppt
arduino-ppt
 
Introduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to IotIntroduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to Iot
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino
ArduinoArduino
Arduino
 
Arduino Introduction Presentation
Arduino Introduction PresentationArduino Introduction Presentation
Arduino Introduction Presentation
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Programming Addressable LED Strips
Programming Addressable LED StripsProgramming Addressable LED Strips
Programming Addressable LED Strips
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino Microcontroller
 
Introduction to Arduino and Circuits
Introduction to Arduino and CircuitsIntroduction to Arduino and Circuits
Introduction to Arduino and Circuits
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
Intro to Hardware Programming with the Arduino Uno
Intro to Hardware Programming with the Arduino UnoIntro to Hardware Programming with the Arduino Uno
Intro to Hardware Programming with the Arduino Uno
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 

Semelhante a Making things sense-Day 2 (May 2011)

Building Connected IoT Gadgets with Particle.io & Azure
Building Connected IoT Gadgets with Particle.io & AzureBuilding Connected IoT Gadgets with Particle.io & Azure
Building Connected IoT Gadgets with Particle.io & Azure
Nick Landry
 
The world is the computer and the programmer is you
The world is the computer and the programmer is youThe world is the computer and the programmer is you
The world is the computer and the programmer is you
Davide Carboni
 

Semelhante a Making things sense-Day 2 (May 2011) (20)

IoT Session Thomas More
IoT Session Thomas MoreIoT Session Thomas More
IoT Session Thomas More
 
Cc internet of things @ Thomas More
Cc internet of things @ Thomas MoreCc internet of things @ Thomas More
Cc internet of things @ Thomas More
 
Arduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonnArduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonn
 
Implementation of an Arduino Remote Laboratory with Raspberry Pi
Implementation of an Arduino Remote Laboratory with Raspberry PiImplementation of an Arduino Remote Laboratory with Raspberry Pi
Implementation of an Arduino Remote Laboratory with Raspberry Pi
 
11_04_2019 EDUCON Award: "Implementation of an arduino remoto laboratory with...
11_04_2019 EDUCON Award: "Implementation of an arduino remoto laboratory with...11_04_2019 EDUCON Award: "Implementation of an arduino remoto laboratory with...
11_04_2019 EDUCON Award: "Implementation of an arduino remoto laboratory with...
 
Hacking with the Raspberry Pi and Windows 10 IoT Core
Hacking with the Raspberry Pi and Windows 10 IoT CoreHacking with the Raspberry Pi and Windows 10 IoT Core
Hacking with the Raspberry Pi and Windows 10 IoT Core
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
Scaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUsScaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUs
 
IOT beginnners
IOT beginnnersIOT beginnners
IOT beginnners
 
IOT beginnners
IOT beginnnersIOT beginnners
IOT beginnners
 
Make your own device
Make your own deviceMake your own device
Make your own device
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
 
Using R for the internet of things
Using R for the internet of thingsUsing R for the internet of things
Using R for the internet of things
 
arduinoedit.pptx
arduinoedit.pptxarduinoedit.pptx
arduinoedit.pptx
 
Building Connected IoT Gadgets with Particle.io & Azure
Building Connected IoT Gadgets with Particle.io & AzureBuilding Connected IoT Gadgets with Particle.io & Azure
Building Connected IoT Gadgets with Particle.io & Azure
 
The world is the computer and the programmer is you
The world is the computer and the programmer is youThe world is the computer and the programmer is you
The world is the computer and the programmer is you
 
Workshop: Event-sourced system through Reactive Streams
Workshop: Event-sourced system through Reactive StreamsWorkshop: Event-sourced system through Reactive Streams
Workshop: Event-sourced system through Reactive Streams
 
Workshop: Event-sourced system through Reactive Streams
Workshop: Event-sourced system through Reactive StreamsWorkshop: Event-sourced system through Reactive Streams
Workshop: Event-sourced system through Reactive Streams
 
Extending Hadoop for Fun & Profit
Extending Hadoop for Fun & ProfitExtending Hadoop for Fun & Profit
Extending Hadoop for Fun & Profit
 
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
 

Último

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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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 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, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Making things sense-Day 2 (May 2011)

  • 1. Making things sense Urban sensing and physical computing Day 2 (7-8 May 2011) Markus Rittenbruch QUT Urban Informatics / FAST & NICTA
  • 2. Schedule - Day 2 • 12:00 - 12:10 Introduction • 12:10 - 12:30 Analogue sensors • 12:30 - 13:00 Activity • 13:00 - 14:00 Sharing sensor data • 14:00 - 14:10 Short break • 14:10 - 16:10 Project activity • 16:10 - 16:50 Project presentations • 16:50 - 17:00 Wrap up
  • 5. Programming Data types When variables are made to exceed their maximum capacity they "roll over" back to their minimum capacity, note that this happens in both directions. int x x = -32,768; x = x - 1; // x now contains 32,767 - rolls over in neg. direction x = 32,767; x = x + 1; // x now contains -32,768 - rolls over Float & casting:
  • 6. Programming Float & casting: int x; int y; float z; x = 1; y = x / 2; // y now contains 0, ints can't hold fractions z = (float)x / 2.0; // z now contains .5 (you have to use 2.0, not 2)
  • 7. Resources • Language reference: • http://www.arduino.cc/en/Reference/HomePage • http://arduino.cc/en/Reference/Extended • General code library: • http://arduino.cc/en/Reference/Libraries • Interfacing with hardware: • http://www.arduino.cc/playground/Main/InterfacingWithHardware • Examples • http://arduino.cc/en/Tutorial/HomePage
  • 9. Analogue sensor pins • Use analogue in pins 0-5 for analogRead() • Address as 14-19 when used as digital pins • digitalWrite(), digitalRead() • No pinMode required for analogRead();
  • 10. Analogue sensor input • File/Examples/Analog/AnalogInput
  • 12. Programming Conditionals http://www.ladyada.net/learn/arduino/lesson5.html
  • 14. Calibration - part 1
  • 15. Calibration - part 2 • map(): remap a number from one range to another • val = map(val, 0, 1023, 0, 255); • constrain(): constrain to a number range
  • 16. Project activity 1 - Calibration
  • 17. Components • RGB LED:
  • 18. Components • LED matrix http://www.sparkfun.com/datasheets/Components/LED/YSM-1288CR3G2C.pdf
  • 19. Components • MAX7219 LED driver http://arduino.cc/playground/Main/MAX72XXHardware http://www.arduino.cc/playground/Main/LEDMatrix
  • 20. Project activity II - Projects
  • 21. So, you’ve got an Arduino and now you want to make it talk
  • 22. Or, maybe you want to talk to it...
  • 23. ...from the other side of the world
  • 24. This session of the workshop will show you some ways of doing that.
  • 25. Arduino to the world • Arduino direct to Pachube via ethernet/wifi shield • Or Arduino to PC via serial, then to Pachube/Twitter • We’re taking the second approach in this workshop, since the kits we provided don’t include ethernet/wifi shields
  • 26. Step 1: Register a feed on Pachube
  • 27.
  • 28.
  • 29. Step 2: Write some code
  • 33. Step 3: See your data on Pachube
  • 34.
  • 35. Advanced topics • PCB design • Wireless communication • Xbee • Bluetooth • Wifi • Infrared • Radio • Real-time communication • Multi-tasking
  • 36. Resources • http://apiwiki.twitter.com/ • http://community.pachube.com/api • http://community.pachube.com/tutorials • http://community.pachube.com/triggers/ twitter
  • 37. What next? • Hackerspace Brisbane • http://hackerspaces.org/wiki/Hackerspace_Brisbane • Living Dolls (The Edge) • http://edgeqld.org.au/blog/2011/04/07/living-dolls/