Skip to content

Input devices

This is a copy of the Guillem’s class notes. You can find the latest version here

Input devices #1 [Guillem]

Core ideas

  • Why we need sensors
  • Neurons, I/O and Bio indicators
  • Sensing the environment
  • Close loop systems
  • Inferring metrics
    • Bike speed from counting wheel turns
    • Water tank distance from distance from above
  • Composed sensors
    • Radar: emitter (output) and receiver (input) working in sync
  • Complex post processing: Compur vision
    • From a list of colors (pixel matrix) to meaningful data (i.e. object location based in color tracking)

How to choose and use a sensor

The section is aimed at INPUTS (sensors) but many concepts work also for OUTPUTS (motors, LEDs)

Input devices #2 [Guillem]

Playing with your Hello Board

  • [Code Examples] https://github.com/fablabbcn/arduino-workshops/tree/master/Hello%2044

When the ATtiny is not enough: Other microcontrollers!

The ATtiny can do amazing things but will require us to optimize the code to an uncessary level when we just want a protoype…

  • ATtiny44

    • Example board: HelloBoard
    • FLASH 4KB
    • RAM 256B
    • Pro: Digital and Analog Inputs and Outputs
    • Con: No Hardware I2C or Serial
  • ATtiny84

    • Example board: HelloBoard
    • FLASH 8KB
    • RAM 256B
    • Pro: Digital and Analog Inputs and Outputs
    • Con: No Hardware I2C or Serial
  • ATMEGA328

    • Example board: FabDuino
    • FLASH 32KB
    • RAM 2KB
    • Pro: Hardware I2C, Serial and SPI
    • Con: No USB Hardware (requires an FTDI)
  • ATSAMD21G18

    • Example board: Adafruit Feather M0
    • FLASH 256KB
    • RAM 32KB
    • Pro: Multiple I2C, SPIs, Serial and full speed USB
    • Con: No WIFI or Bluetooth
  • ESP32

    • Example board: ESP32 Feather Board
    • FLASH 4MB
    • RAM 520KB
    • Pro: WIFI and Bluetooth
    • Con: No USB Hardware (requires an FTDI)