on/off switch & analog sensor
For this antiprimadonna me and Loes made a circuit where the LED would go on when the button is pushed. The code was found here, I just changed the pins for the button and LED.
I also drew a schematic of this circuit. But i'm doubting this is right:
I don't think this is right because I didn't know where to put all the pins from the arduino, I feel like there is more on the board than there is on my schematic.
Ive tried working with the Ultrasonic sensor, so that I could ideally change the pushbutton to the ultrasonic as a start for my working circuit. First, I just wanted to see the output of the sensor in the serial monitor just to check if the sensor was working. I did this with the following code:
in the parameters of NewPing sonar you can how I connected the Ultrasonic to my Arduino. I've connected them with wires from the Ultrasonic straight into the Arduino pins (without breadboard, just to check). But unfortunately the distance in my Serial monitor kept staying on 0cm. So I think I accidentely took a broken ultrasonic.
I basically started here, with the crystal, without doing the first steps that were posted on Youtube, because I'm stubborn I guess. I connected the resistor with the backside of the copper tape, which is not conductive, I found out later because of Loes' whatsapp video. For some reason I thought it was possible because I vaguely remember doing something like this in week 2 with the paper circuits.
This was my first try with connecting a LED light with copper tape and the breadboard. I am not sure what I did here, the confusion began.
I decided to start over with the button and LED I have made before but then on a paper circuit, hoping I would understand it better.
First I wanted to check if the button was working so I connected it to my breadboard and sent the state of the button to the serial monitor with this code:
And it worked:
Then I connected the button on a paper, exactly how I connected it to a breadboard.
I checked it again with the same code, unfortunately the button didn't work anymore. This was because the pins of the button were sodered together on the copper tape. Because of this the currtent can not go around the circuit anymore. So I soldered the pins that weren't needed loose and tried it again. During the soldering I accidently broke a pin so I used another button but it worked! I could now see the right state of the button in the serial monitor. I soldered it like this:
The side that the paperclip is on togetheer with the resistor is connected GND(-), the other paperclip is connected to V3V(+).
Now I did the same thing but with the LED lights
The long side of the LED (upper one) is + and the one in the bottom right corner is GND(-). I connected the button and LED together on the breadboard and used the same code as before with the on/off switch to check if my first paper circuit was working. (And it worked, yay!)
Now that I understood the paper circuits better I wanted to take another try in a sensor paper circuit.
I used Loes' examples as a reference for the crystal sensor. I soldered everything together like she had done before with hers. I tried using the thick copper steel but unfortunately I had nothing to break and bend it with so I had to use the thin copper wire which was hard to solder on the copper tape.
Then I connected the crystal sensor like I did before with the paper LEDs and button to the breadboard to see the outputs of the sensor. I used Loes' code.
I got really weird outputs in the beginning in the serial monitor, but this was because I didnt match the baud with the serial.begin and upload speed. After Loes told me this and I changed it the sensor was working!
Then I connected 2 LEDs with the sensor to make it a bit different than Loes' example and I changed the code a bit with an if/else statement.
If the sensor will catch light, the red led will go on and the green led is off and vice versa.
Then I tried to make the sensor in another kind of shape. Unfortunately because I understood the assignment a bit wrong and went so many ways because I didnt understood the circuit at first, I didn't had much time left for the actual creative part so I made a simple box. I would've loved to put more effort and time in this.
Box open = Red ON, green OFF Box closed = Green ON, red OFF.
To be honest I'm not too proud of what I've made. It all took so much time because I couldn't understand how the circuits were working. I discovered that I was having trouble with understanding the assignment first, and then begin at the very first step. Instead of diving into the crystal sensor and being in a cycle of not understanding it. If I had started from the beginning I would've had more time left to make something nice. But I am happy that it is working at the end, it took a lot of time and patience.
From the video class Ive just learned that the crystal is not a light sensor but a pressure sensor.. :')
Week 6: 12th of March - 18th of March 2020
When we talk about "inputs" in electronics, what does it mean? How are inputs structured in such a way that they become readable by computers? This week we make the bridge between connecting materials (week 2), and translating their properties into digitally readable formats. What is the anatomy of a button anyway? And what is the difference between a "digital" and an "analog" input?
We will make our own buttons and sensors and you will learn how you can use a microcontroller as a probe to "read" what is happening in an electronics circuit. You will get familiarized with the Arduino IDE and a type of microcontroller board, you will use a breadboard, and you will learn (or refresh) how to get readings from input devices - even ones you make yourself! (Bron: Brightspace)
In this weeks' zine I will be discussing the relationship between technological development and the military-industrial complex.
Working circuit with led and sensor
I used Loes' examples as a reference for the crystal sensor. I soldered everything together like she had done before with hers. I tried using the thick copper steel but unfortunately I had nothing to break and bend it with so I had to use the thin copper wire which was hard to solder on the copper tape.
Then I connected the crystal sensor like I did before with the paper LEDs and button to the breadboard to see the outputs of the sensor. I used Loes' code.
I got really weird outputs in the beginning in the serial monitor, but this was because I didnt match the baud with the serial.begin and upload speed. After Loes told me this and I changed it the sensor was working!
Then I connected 2 LEDs with the sensor to make it a bit different than Loes' example and I changed the code a bit with an if/else statement.
If the sensor will catch light, the red led will go on and the green led is off and vice versa.
Then I tried to make the sensor in another kind of shape. Unfortunately because I understood the assignment a bit wrong and went so many ways because I didnt understood the circuit at first, I didn't had much time left for the actual creative part so I made a simple box. I would've loved to put more effort and time in this.
Box open = Red ON, green OFF Box closed = Green ON, red OFF.
To be honest I'm not too proud of what I've made. It all took so much time because I couldn't understand how the circuits were working. I discovered that I was having trouble with understanding the assignment first, and then begin at the very first step. Instead of diving into the crystal sensor and being in a cycle of not understanding it. If I had started from the beginning I would've had more time left to make something nice. But I am happy that it is working at the end, it took a lot of time and patience.