Week 1 – Physical Computing

The first week was an opportunity to look at different applications of physical computing. Such as synchronised drone flights…

Physical Computing is an interesting subject and part of what many people are more fascinated by such as robotics. In fact Physical Computing means interacting with real world objects using a computer.

An example of this technology was shown to us by Anton Bowers our lecturer. Who had created his own Delta Parallel robot that could draw an image portrait of a photo taken of someones face, or bust. A Delta Parallel robot looks something like this…

 

Image result for delta parallel drawing robot

Our first step into physical computing and using Arduino was to set up a ‘Hello World’ like experiment with a Blinking LED called ‘Blink’. This required setting up a bread board with wiring, plugging the Arduino in to my laptop and uploading code to it to run the program. This is what the bread board looks like…

Image result for arduino breadboard

The bread board works as the base for our circuits. You can see a plus + and minus – sign at the edges of the board. The plus (+) takes power in and the minus (-) completes the circuit and is connected to the ground on the Arduino. The plus and minus represent anode and cathode which is an important part for the components to our circuits. The middle marked by the letters A–E and F-J run horizontally so that if a connection is made from Cathode (+) to one row, the whole row receives power and current enabling us to add components and complete circuits.

The first circuit I made for the Arduino was based on and looked like this…

Image result for blink circuit arduino

The code looked like this…

Screen Shot 2019-03-06 at 13.31.05

And The result looked like this…

week1a

It was good to bet to grips with the Arduino in this simple experiment because I had used it before previously. So some of the basics about how to create a circuit were rediscovered. It’s important to get the initial confidence about what works with Arduino because it helps when working out what code works in the compiler, as well as how the bread board and Arduino function. The understanding helps build confidence about what works and how to fix it. I look forward to future experiments and using more advanced components.

This is an example of the ‘Blink’ experiment I did at home. I created an SOS LED display of (DOT,DOT,DOT,DASH,DASH,DASH,DOT,DOT,DOT).

2019-03-08 16.12.28

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);

(This code for pinMode and LED_Builtin is important because the voltage is changed for the builtin LED, which for Arduino Leonardo corresponds to Pin 13)

}

// the loop function runs over and over again forever
void loop() {

(This digital write sets values of High ‘5V’ or Low ‘0V’, so by including delay() and digital write, LOW we can create a little light show)

digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(100);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(300);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(300); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(300);
digitalWrite(LED_BUILTIN, HIGH);
delay(300); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(300);
digitalWrite(LED_BUILTIN, HIGH);
delay(300);
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(150);
}

This is the long winded but effective code needed to make an SOS message. Notice the gaps using delay and the switching from high to low voltage at different lengths to create the SOS message.

 

Leave a comment