smart objects
play

Smart Objects SAPIENZA Universit di Roma, M.Sc. in Product Design - PowerPoint PPT Presentation

Smart Objects SAPIENZA Universit di Roma, M.Sc. in Product Design Prof. Fabio Patrizi What is a Smart Object? Essentially, an object that: Senses Thinks Acts Example 1 Example 2 Example 3 Example 4 Example 5 Homework 1


  1. Smart Objects SAPIENZA Università di Roma, M.Sc. in Product Design Prof. Fabio Patrizi

  2. What is a Smart Object? • Essentially, an object that: • Senses • Thinks • Acts

  3. Example 1

  4. Example 2

  5. Example 3

  6. Example 4

  7. Example 5

  8. Homework 1 • Browse the web to learn about Arduino projects and make a list of all the capabilities you encounter (e.g., can sense light, can rotate wheel, can switch light on, etc.) • This will be useful for your prototype, as it allows you to know which features you can provide a product with

  9. Smart Objects (A closer look) Remember Example 1 (motion-controlled lamp) A simplified schema: Ultrasonic Microcontroller sensor (e.g., Arduino) Relay

  10. Smart Objects (A closer look) Ultrasonic sensor Senses distance to closest object (up to 30 cm) Relay An electronically-controlled interruptor We need to know WHAT these components do, not HOW THEY ARE INTERNALLY BUILT!

  11. Smart Objects (A closer look) How does it work? 1. The ultrasonic sensor measures distance to closest object 2. Arduino reads the measurement 3. If distance is small enough, Arduino switches the relay 4. The relay lets the current flow and the lamp switches on 5. If distance is large, Arduino switches the relay 6. The relay interrupts the current flow and the lamp switches off

  12. Sense-think-act Sense-think-act is a popular interaction paradigm (and the one we will use in this course) • Sense: observe the environment (some features) • Think: based on observation, make a decision • Act: based on decision, perform some action(s)

  13. Sense-think-act Who takes care of what? • Sense: sensors (e.g., ultrasonic sensor) • Think: micro controller (e.g., Arduino) • Act: actuators (e.g., relay)

  14. Sense-think-act We will learn how to make products interactive We will do so by implementing the sense-think-act paradigm with Arduino To do so, we need to: 1. Understand a bit the Arduino structure 2. Learn how to program Arduino 3. Learn how to physically connect sensors and actuators

  15. Observations • We chose Arduino as microcontroller • Arduino is a (fast) prototyping tool , not a component you want to embed into the final product (it costs too much, it is too large, it is not optimized for your product) • This is just for us to have a preview of the final product (and possibly decide to produce it)

  16. Arduino Overview

  17. Arduino Overview Reset Pins Button Pins

  18. Arduino Overview • Arduino communicates with sensors and actuators through pins • You can only write from or read to pins • We will connect actuators and sensors to pins • Programs consist in reading from pins (sensing), elaborating (thinking), and writing to pins (acting)

  19. Programming • Basics of Arduino Programming • Overview of Arduino programs • Variables, constants, assignments, logical operators • Input/output • Instructions: sequence, if-then-else, loops (?)

  20. Programming • In order to work, Arduino needs to be programmed • Programs define the way Arduino behaves, when and how sensors and actuators are used • Programs tell Arduino what to do

  21. Structure of Arduino Programs • Every Arduino program consists of 2 parts: • setup : this tells Arduino what to do before actually starting • loop : this tells Arduino what to do when running

  22. My First Arduino Program void setup(){ pinMode(13,OUTPUT); A program that makes } an LED blink void loop(){ digitalWrite(13,HIGH); delay(1000); (Yes, you’ll learn how to write this, and even more!) digitalWrite(13,LOW); delay(1000); }

  23. My First Arduino Program void setup(){ pinMode(13,OUTPUT); } void loop(){ digitalWrite(13,HIGH); delay(1000); digitalWrite(13,LOW); delay(1000); }

Recommend


More recommend