1.12 Interface and application programming

http://academy.cba.mit.edu/classes/interface_application_programming/index.html

The return of FabISP

Given that my ISP was broken (not spontaneously but incidentally) I prepared a new one. The broken and the new ISP. This time was really simple and straighforward to make the new ISP.

I also have recomendations based on the use: because the USB connector will be handled many times, you have to put more solder on it. Also the temp must be adjusted to aproximately 325 degrees and use the solder of .020 (thinner is preferable because it allows you to control the process)

Broken and new ISP

Ideas: Explorations

I was exploring new ideas for programming languages, the visual and flow paradigm was conceptually advanced, but I couldnt find a way to make a interaction with serial ports

Mockups and inspiration

how do you lift your ideas? is simple as to let fly a ballon?

Prototype

Note: if you couldnt open the serial or USB port, check this advice "could not open port /dev/ttyUSB0".

This week I used the ATTiny45 circuit designed by Neil in order to create a simple interactive game: balloon flying. You have to heat the sensor of the circuit to achieve the ideal temperature, so the balloon will lift up. If the temperature of the balloon is not the ideal one, it will fall to earth. All the code is written in Python and use these libraries: sys, os, pygame, serial, pickle, shelve.

There are some basic concepts to design this interaction:

  • A - Every sensor in the end only brings numbers
  • B - Every program in the end only understand numbers
  • C - Everything in the middle is creativity

Also is important to understand what are the relations beetween the components of the interaction, the physical device has an integrated programmed response (residing on the IC), but only will works if communicates with a program via the proper commands (in this case residing on a computer: python code):



Neil G. Input devices circuit Source: http://academy.cba.mit.edu/classes/input_devices/temp/hello.temp.45.jpg

So, I took the information input from the temperature sensor which is essentially a number provided by the circuit IC and I made to interact with the coordinates of the balloon (provided by the python program and GUI), which is also a number. Between two there is the balloon which is a cultural product, and have its own significance in others contexts.

You can download the code through this link Balloon. To work, its necessary

Physical stuff (Atoms)

  • Hello.temp.45 circuit
  • USB TTL Serial Cable. 6 way, 0.1" pitch single inline connector
  • Digital stuff (Bits)

  • Hello.temp.45 source code and makefile
  • Balloon app source code
  • Requirements: python, pyserial, pygame, gcc, etc (seen in Input Devices lesson)
  • Integration Process

  • Step 1: Program the circuit board (using the FabISP burn the c code into the circuit). Result: Circuit board with embedded "intelligence"
  • Step 2: Connect the circuit board and the PC through the USB TLL Serial cable
  • Step 3: Install the software requirements (in GNU/linux: sudo apt-get install python pyserial python-pygame)
  • Step 4: Deploy (download, put in a directory and decompress the Balloon source code, 2 files: balloon.py and ballon.png)
  • Step 5: Execute the script given proper permissions and adding the port as an argument, in GNU/Linux: sudo python balloon.py /dev/ttyUSB0)
  • Step 6: Control the balloon altitude using the temperature as a parameter. If you heat the sensor beyond 29.50, it will lift up.
  • Results: Lift your ideas

    Inspirations from HTMAA

    Full visual journey

    Back to top