processing penguin

This was really cute and fun to do, I was a little confused at first on how to set things up but it worked out well in the end I played a little with the code to see how to make the penguin bigger and smaller, It’s interesting to note that when you change the number from a decimal to a whole one the change in size isn’t very dramatic when you move the light.

also realized that this is supposed to be an owl and I’ve been calling it a penguin this entire time…

Processing code

//March 28, 2017
//Earl Mark
//Make an owl Grow according to the light level
//Owl modified after Reas and Fry Intro to Processing Text
//Exercise:
// 1. Make more than one owl
// 2. Have the owl(s) adjust according to sound detector values (tutorial 15 of the arduino 101 tutorials)
// 3. Make the owl(s) eyes blink such as when someone claps their hands
import processing.serial.*;
Serial myPort; // The serial port
String inString; // Input string from serial port
int lf = 10; // ASCII linefeed
String[] photoSensorRead; //for text array for output from arduino
float n; //for raw value from arduino
//int brightness; //for adjusted value from arduino
void setup(){
size(1280, 720);
myPort=new Serial(this, "COM20", 9600);
myPort.bufferUntil(lf);
}
void draw(){
background(150,200,255);
//read photosensor value from serial port
photoSensorRead = split(inString, '='); //subdivide text string at " = "
//println("photoSensorRead " + photoSensorRead);
//parse text value of photosensor value
if (null != photoSensorRead && photoSensorRead.length > 1) {
String num = photoSensorRead[1];
n = float(Integer.parseInt(num.trim()));
}
randomSeed(0);
float scale = map(n, 0.0, 1025, 0.12, random(1.5, 2.75));
owl(width/2.0, height - 10, int(random(50, 120)), scale);
}
void owl(float x, float y, int g, float s) {
pushMatrix();
translate(x, y);
scale(s); // Set the size
stroke(138-g, 138-g, 125-g); // Set the color value
strokeWeight(70);
line(0, -35, 0, -65); // Body
noStroke();
fill(255);
ellipse(-17.5, -65, 35, 35); // Left eye dome
ellipse(17.5, -65, 35, 35); // Right eye dome
arc(0, -65, 70, 70, 0, PI); // Chin
fill(51, 51, 30);
ellipse(-14, -65, 8, 8); // Left eye
ellipse(14, -65, 8, 8); // Right eye
quad(0, -58, 4, -51, 0, -44, -4, -51); // Beak
strokeWeight(1);
popMatrix();
}
void serialEvent(Serial p) {
inString = p.readString();
}

Arduino code

//Earl Mark 3/23/17
int photocellPin0 = A0; // the cell and 10K pulldown are connected to A0
int photocellReading0;
void setup() {
// initialize serial communication:
Serial.begin(9600);
}
void loop(){
photocellReading0 = analogRead(photocellPin0); //read photoresister
Serial.print(" _ Analog reading 0 = "); //output value to serial port
Serial.println(photocellReading0);
}

slightly chaotic thoughts on physical computing ethics

As we live in such a consumerist, capitalist culture I feel it can be quite difficult to do things completely ethically. However, I do think it is important to still try. I would like to be ethical in sourcing resources so knowing where everything comes from and the conditions workers are working in. I don’t feel our current way of doing things is right or sustainable however I don’t really know if it is really ever going to change. Yes, consumers should be more responsible with our choices but it’s not always easy and we do not always have that option. Like with the issue of the production of not just smartphones but also technology in our society right now you can’t just not have a smartphone you know.
Also, I feel like we need to think more about the kind of technology that is being put out and the implications that it could have and how it affects other people. for example, deepfake technology now I personally do not believe this should exist as I feel it does more harm than good. Facial recognition is another one I’m more on the fence with this as I think it could be very useful but I also don’t trust a lot of institutions that implement it. Humans often do things because they can but never think maybe we shouldn’t lol.

Let there be sound

This was also quite easy to set up one issue I did have was when I tried to add a button ( yes again :() it just wouldn’t work and I just do not know why :(.
If you play around in the code and change the frequency that changes the sound it makes, I put mine up to 25000 Hz and my dog was not amused.
This also reminds me of the voicebox that is put into things like stuffed animals and children’s toys I feel that would be a really cute concept to explore

Tilt sensor!

You tilt the breadboard and the light switches off!
I did this with the same layout of the dice one and it worked perfectly 🙂

working with the tilt sensor reminded me a lot of videogame controllers. In certain games, you can control actions by tilting your controller. I think it would be interesting to attempt to make a makeshift game controller with arduino.

My failures :(

There was an attempt to create the lie detector test and it did not turn out very well. I started first by testing to see if the lights would come on and they did not… I tried reconnecting it a couple different ways and it just wouldn’t function? I also think I still need to get use to graphical representations of circuits. rather than real pictures. Also when I connected to v5 the circuit just would not come on and got really hot which I don’t think is good. I will try this again with the fresher eyes.

I simply do not understand how to get buttons to work again I realize it’s probably an issue with how I’ve connected it but I just don’t know how to fix it. The closest I got was in the second picture where I pushed the button went to go pee and when I came back the light was on. I think it was a fluke though because the button did not switch the light off and the light did not come on again after I had disconnected and reconnected from my laptop.

RGB lights

This was made using similar wiring as the knight rider one but replacing the led lights with the RGB one. Had no issues lights are pretty 10/10 would do again.

doing this reminded me of the lights I have hanging in my accommodation. I think it would be fun to try and make some lights like that.

Creating an experience

When thinking about this assignment I wanted to do something that was kind of relevant to stuff going on today(Covid-19) and low and behold I found this video of a timer that would let you if you’ve washed your hands for long enough(20 secs).

link to original project: https://create.arduino.cc/projecthub/the-tech-lab/fight-coronavirus-simple-handwash-timer-4dc8ac?ref=tag&ref_id=beginner&offset=5

This is my work , it’s not the best-looking but it functions! there’s a sensor inside that detects any movement close to the device and then the lights signify how long you’ve been washing your hands, once the light turns green you’ve washed for long enough.

This was really fun to do and I’m happy I was able to get it working. With no real issue.

Let there be light!

This was my first attempt at getting an led to blink on a physical circuit and… it did not work :/ I now realize my connections were kind of all over the place.

I did get a blinking led when I tried it directly on the circuit! I should have used a resistor as well, thankfully the led is still in one piece.