Week 6 Assignment – Lisa H.


Part 1

  • The goal of the project and/or desired interaction
    The assignment was to adapt one of the light and/or sound circuits we built in class for another creative purpose. I choose to use the ultrasonic sensor to make an interaction with the buzzer and the LED lights.
  • A quick description of assembly and list of core components— 1x Arduino Uno
    – 1x Breadboard
    – 1x HC-SRO4 Ultrasonic Sensor
    – 1x Buzzer
    – 2x Green LEDs
    – 2x White LEDs
    – 2x Red LEDs
    – 7x 330-ohm Resistors
    – Jumper wires
  • How it works

    When you move away from the ultrasonic sensor, the buzzer and LED lights will not light or make a sound. If you go closer to the ultrasonic sensor, the LED lights will light up and the buzzer will get louder.
  • Any problems you encountered and/or solvedAt first, I wasn’t sure how to exactly get the sound to get louder as I move nearer to the ultrasonic sensor.  But I looked at some code and figured it out.
  • Images of your circuit
  • Arduino Code https://github.com/lynnn43/PhysicalComputing/tree/master/wk5_hwk_sensors

Part 2

  • Give a description of the protocol.

SPI-

It is a synchronous data transfer technique which means there is a dedicated clock signal generated by the bus controller. It supports multi-master bus support and bidirectional transfer. It is a serial data protocol used by microcontrollers for communicating one or more peripheral devices quickly.

There is usually always one main master device controlling many other peripheral devices.

  • MISO (Master In Slave Out) – The Slave line for sending data to the master
  • MOSI (Master Out Slave In) – The Master line for sending data to the peripherals
  • SCK (Serial Clock) – The clock pulses which synchronize data transmission generated by the master
  • and one line specific for every device:
  • SS (Slave Select) – the pin on each device that the master can use to enable and disable specific devices.
  • Draw a diagram or illustration that shows how it works.
  • Give at least 2 examples of when you use this protocol.
    For example, SD cards and wireless transmitter both use SPI to communicate with microcontrollers to communicate without interruptions.

 

Leave a Reply

Your email address will not be published. Required fields are marked *