SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
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/

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

+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@
 

Kürzlich hochgeladen (20)

+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...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
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)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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...
 
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
 
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
 
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
 
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?
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

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/