Interface and application programming
For this week assignment, we had to write an application that interfaces with an input and/or output device.
I have started with a lot of research and trials because I don't have a lot of experience in that and I really find it interesting. I have downloaded Processing which is an open source programming language, development environment, and online community. I think it is a good software to start with as a beginner in programming.
Input
The first trial I made is the Sequential example from the processing software.Go to File / Examples / Topics / Animation / Sequential
The idea is to display a sequence of images creating the illusion of motion and add the input device that I made during week 10 . It is the phototransistor board which is used to measure light. So I have added a bulb light picture as an animation that can be turned off and on by the phototransistor board.
Here are the code and the video of the phototransistor and the sequential combined:sequential - processing from Pamela Chami on Vimeo.
Output
The second trial I made is the Connect 4 game that I found an example of how to program it online. It is a two-player game in which each player has a color and then take turns dropping colored discs from the top into a seven-column, six-row vertically suspended grid. The objective of the game is to connect four of one's own discs of the same color next to each other vertically, horizontally, or diagonally before the opponent.
I had to write the code on Processing which was really useful and helpful to understand how it works exaclty. I wanted this time to use my output device that I have made during week 11 which is the helloArray board, which consists of an array of 20 Charlieplexed LEDs. So after writing the game code and making sure that it works perfectly, I decided to add the sequential code as well for the end of the game and makes the LED array blink. Here is the code and the video:
Connect from Pamela Chami on Vimeo.
Since I wanted to add the output device and let the LED array blink at the end of the game, I had to add the FTDI components to my boards. I had to solder it and add jumpers connecting the GND, VCC, Tx and Rx to the ATtiny 44.I have connected the Tx to the PB0 and the Rx to PB1.
I was running out of time for this assignment, I still have to add the code of the outpout to the game but I am still working on it at the moment.Download the files here : Sequential
Fabacademy.org | Copyright © pamelachami | Design by pch