Week 12: Interfacing

PART I | First Attempt

  1. design

    I wanted to use RGB LED for my final, and control it with a button.

    Then, the LED is supposed to dim within a period of time, which is defined by user.

    So the interface on computer will give user the option to input the value of time duration for the dimming process.

    Here are the design for the board.

  2. program

    However, there are some problem with the board design, which made it unprogrammable.

    The LED lights up, but apparently something wrong between the ISP head and attiny 44.

PART II | A different attempt

  1. sonar board and MAX

    So I decided to do this week seperately from final, and spend more time debugging my button LED board later.

    For the purpose of this week, I just need to interface with either an input/output.

    The easiest way to go is recycling one of my earlier device (i.e. my sonar board, which I know it works for sure).

    Then I got help from Pohao, interfacing my sonar using MAX. (it is very similar to the logic of Grasshopper and MODS)

    The first step is to exract the data read by sonar distance sensor.

    Then transform it to a value that make sense for my application BRCOSA(brightness,contrast,saturation).

    BRCOSA is an already made module provided in MAX, very handy.

    I feed a camera component into MAX with laptop's built-in camera.

    Then I can interface with the live image using the sonar distance sensor.

    BRCOSA has values ranging from -1 to 1.

    So I created a function that converts sonar reading of 0 to 100 to BRCOSA reading of -1 to 1.

    The closer my hand get to the sensor the brighter, more contrast and saturation the live image is.

    Then I also played with another module that zoom in and out of the live image.

    The closer my hand get to the sensor the bigger the live image get.