PComp Week 2: Digital and Analog Input/Output

Lab: Digital Input and Output with an Arduino

Having worked with Arduino before, I was sure I wouldn’t have any problems with the lab but I was wrong.

To start out, the setup of the breadboard was very clear from the schematics given. Arduino Nano 33 IoT was a new microcontroller to me but I was excited to work with something new. After getting the Nano setup on the board (see figs. 1 &2), it was time to input the code into the Arduino Integrated Development Environment (IDE). The code was provided so no major challenge there other than to make sure the correct ports (USB) and board (Nano) were selected. Besides switching the colors of the LEDs, I made no changes to the code provided. After verifying that I had no errors in the code, I press the button to upload the code to the Nano…

Closeup of Circuit
(Fig. 1)

Full view of circuit (large breadboard)
(Fig. 2)

Error 1

…Error #1

Nothing to worry about. I checked the Discord as others had similar errors. There was one person who received the same error message and it was a matter of a wiring issues. I checked my wiring, multiple times, with no luck. I ended up getting the same error. Someone on the chat also mentioned there being a possible connection issue with using a hub (multi-port adapter) to connect the Nano to the laptop. I did have a large hub with multiple USB-C, USB-A, SD card and HDMI ports so maybe that was the culprit. I was able to in my USB-C to USB-A Apple branded adapter; it couldn’t hurt to use the adapter that was designed by the same company as my
laptop…

Error 2 and 3

…Errors #2 and #3

This error occurred twice. First after switching out the hub or the new adapter and, second, after testing a new USB-C cable which connects the Nano to the adapter. Fingers crossed…

Error 4 Not port or board selected

…Error #4

I had overlooked resetting the board and the port which defaulted to their original settings after the few times I had changed the connection wires. I was able to reset those parameters and…

Error 5 - Done Uploading

…Done Uploading / Possible Error #5

I was thrilled to see that the code was able to be uploaded but was curious as to the text listed in the console, as it was in orange, which tends to be a warning color. Nothing in the message stuck out to me so I proceeded to check out the board….

…Nothing.

What was I doing wrong!?! I took a step back and decide it was time to break out the multimeter. I checked that there was voltage running through the LEDs. With the button unpressed, the Red LED had a voltage of -1.78 and the Yellow that o 0.14. When I pressed the button, the Red had 0.13V and the Yellow had -1.82V. I was stuck at how the LEDs had negative voltage as they were wired properly from power to ground and I was using the correct leads of the multimeter to take the measure. So I decided to pullout the wires and try again…

…Still nothing.

I then proceeded to check that the LEDs had not burnt out; they were working. I checked and rechecked the wiring. I wanted to be sure I had done all I could before reaching out for help. Looking back, I would have saved time had I reached out earlier to the group but now I have all this documentation!

By accident, I stumbled upon something that I puzzled me even more than the current situation. When I was testing the LEDs’ voltage, I shorted one of the LEDs by touching both legs of the LED with on of the multimeter’s leads…

…It worked!

The yellow light was lighting up when the Red LED was shorted and the button was not pressed. This wasn’t exactly what I wanted, and was concerning as I didn’t want the short circuit to damage the Nano, but I was making progress. I tested next if I could get the Red LED to light up by shorting the Yellow…

…It worked!

I had reached a point where I was not able to learn anymore from this lab so I reached out for help. I still don’t understand why shorting out the LEDs worked, but I will find out. Shortly after asking or help, Viola He had solved my problem. As I had never used the large breadboard before, I was unaware that the grand power conduits do not connect down the sides. Around row 30, there is a break in power and ground. All I needed to do was to connect the two halves and…

…Lab #1 complete.

Lab: Analog In with an Arduino

Next I setup the breadboard with the potentiometer which went smoothly. After the issues in the digital lab I felt I was better prepared for this lab.

Potentiometer Analog Circuit

Next, I setup the breadboard for the photo cell. I used originally the photo sensor but the range of input was so low (0-40) I was worried something was wrong. I decided to try out a photo resistor I had on hand which had a range of 0-400. I have previously worked with this component in a project so I was familiar with it’s serial output. In comparison, this was much more useful.

Photocell Full Circuit
Full Analog Photocell Circuit
Photo Resister and Photo Sensor
Photo Resister (left) and Photo Sensor (right)

 

…additional exercises in progress..

Questions:

  • Why are there 2 GND pins on the Nano?
  • Why is the large bread board made with a vertical break between the ground and the power?
  • What is the difference between the photo resistor and the photo cell and the photo transistors? 
  • How do you slow the Serial Monitor down so that you can actually read the output?

ICM Week 2: Animation with Variables

This week we worked with variables in order to animate 2D images. 

While watching the videos, I was able to to create the follow sketches:

Demonstrating mousePressed(), mouseX, and mouseY().  https://editor.p5js.org/danielryanjohnston/sketches/r33XVpViX

  • I really had a lot of fun playing with this piece myself.  I tried moving the mouse in a variety of patterns to see how layered the sketch could get. 

This following sketch demonstrates using an object to animate.  https://editor.p5js.org/danielryanjohnston/sketches/nW4r1-m_l

  • I would want to make this piece restart from the absolute beginning on a loop so that the viewer can see the background change colors and the triangle slide through space. 
  • UPDATE: Edited the code using mousePressed() in order to restart the animation. 

The final sketch, Are you okay?, was created to meet the requirements:
https://editor.p5js.org/danielryanjohnston/sketches/Oo6ii74G0

 

  • 1 element controlled by the mouse.
    • The whites of the eyes change color from white to black as the mouse travels along the y-axis. 
    • The mouth changes color from black to white as the mouse travels along the x-axis. 
    • mousePresses() is used to reset the background whenever the user presses the mouse.
  • 1 element that changes over time, independent of the mouse.
    • Triangles which have random x and y points for all parameters as well as a random selection of colors.
    • The pupils of the eyes have randomized colors selected.
  • 1 element that is different every time you run the sketch.
    • mousePresses() is used to reset the background whenever the user presses the mouse.
    • The text “Are you okay?” appears at a random location, in a text size ranging from 5-50 pts. when the sketch is restarted
      • I was not able to get the text to reappear when the mouse was pressed (see below for specific questions).

I was very much inspired by the work I did on sketch #1 for this week’s worksheet. 
https://editor.p5js.org/danielryanjohnston/sketches/03pgxBBDt

  • UPDATE: Edited the code using mousePressed() in order to restart the animation. 

The worksheet was fairly manageable except for the last two challenges.   I was not able to wrap my mind around how exactly to accomplish have the image move towards the mouse or moving the rectangle from Q3 towards the mouse. 

Questions:

  • How do I place have text within the code so that it also reappears on the background after the mouse is pressed?  I have tried placing the text within the functions setup(), draw() and mousedPressed() with no success.  Both setup and draw allow the text to appear when the program first starts or is restarted. 
  • How do I embed the sketches into WordPress without having the scroll bars?  I’ve tried editing the iframe unsuccessfully as the text reverts back to the original after saving. 

 

Video & Sound Week 1

A Response to The Danger of a Single Story by Chimamanda Ngozi Adichie

Adichie’s discussion on the dangers of a single story truly resonated with me. To begin with, it brought up a conversation I had many years back with a good friend in Chicago. This friend once told me,  “you never know what’s going on in someone else’s life.”  This, being a seemingly simple and universal understanding, struck me deeply.  I realized I’d been inventing narratives for those I interacted with which were not based on reality but on stereotypes and assumption.  These  assumptions – being derived from the single stories I was taught –  were creating conflict and anxiety instead of compassion and connection.  To this day, I carry my friend’s words with me whenever I struggle  to find compassion and understanding, and even forgiveness, in the world around me.

Adichie’s words reminded me of another friend’s advice given to me shortly after the 2016 presidential election.  This friend told me that we all, including my family whom I was in conflict with, were making the best decisions we could  with the information that we had.  This, also simplistic understanding, is one that rings true at the same time infuriates.  I was not initially sold on his statement.  I wanted to hold on to the divisive narratives I was being feed.  I didn’t want to let go of that single story in order to see the complexities within, not only the highly charged political environment, but within my family.  This doesn’t absolve anyone ignorance or harmful views, but it does create a starting point.  A place to find compassion and, hopefully, the willingness to let go in order to find a way forward. 

This, in turn, led me to thinking about where we learn these stories – the media,  our institutions, our family and friends –  and how we choose to hold on to narrows view of the other.  Is it fear that keeps our heads in the ground or is it just laziness, or maybe even fatigue that prevents us from doing the work to challenge our own beliefs?  I do not know the answer.  I can say for sure that it is not as simplistic as one single, overarching idea or narrative.  Humans are complex creatures, surviving in an increasingly complex system. 

Lastly, I leave you with some questions that came up for me while listening to the words of Cimamanda Ngozi Adichie:

  • What narratives do I have only a single story?
  • Where can I find compassion and the courage to open up my view to new and different narratives?
  • What stories have I held onto and not have the courage or compassion to delve deeper into?
  • Is it worth finding the origin of these single stories so as not to perpetuate them or would it be more productive to inundate my world with additional stories instead?   Or both?
  • What single story-line do others have about me?  Am I okay with having a single story? 
  • Where do I perpetuate stories about others told by those in power?
  • Why is the hold of some singular stories so strong?
  • What is my investment in certain story lines and how can I divest?

 

Listening to A History of Sound Art

For this assignment I had originally chosen to analyze Louis & Bebe Barron’s Forbidden Planet (interview and sounds) (1956), roughly 16:30 into the video.  I connected first with Barron’s use of circuit sounds to convey emotion (mostly fear) and dying as well as their view of the circuit as a living creature.  The interview didn’t offer me much outside of a narrative around their work with Hollywood, so  I decided I would select a different section.  Arbitrarily, I decided to start the track at 37:04.

Upon pressing play, I was greeted with the soothing sounds of someone or something wading through water.  This serene soundscape was interrupted, only slightly though, by a male voice.  This voice is part of R. Murray Schafer’s World Soundscape Project which I had just entered the middle of.  

The voice had a calming tone and an ease to it that was also bright and engaging.   The speaker started with“…no one studied the changes in the acoustic environment…” which led into sounds that demonstrated an of array pitches and, less so, amplitudes. These were short and active sounds which rolled one into the other.

Next the voice stated, “you don’t notice the sounds you’ve grown accustomed to are disappearing.”  This was followed by sounds that touched on the speaker’s comment.  These were
commentary between two speakers reminiscing on sounds of sleigh bells, presumably sounds that had disappeared from their own lives. 

The voice then declared, “disappearing sounds become romances.”  There is a longing for a past in that statement, one which is connected to the human heart.  The subsequent sounds – a twangy guitar riff, dialogue asking “Where did they go,” followed by a very round operatic passage – all three embodied a sense of loneliness and longing.  They also included a release at the end of their moment in the form of decrescendos.

Lastly, the voice proclaimed, “new sounds are almost always phobias.”  This was followed by a shriek for which I then chose to end the track and my aural analysis. 

From what I can surmise, the artist who created the overall track, used sounds from Trevor Wishart’s Red Bird (1978) to illustrate the points R. Murray Schafer was making in his piece World Soundscape Project.  

 

Creating a Sound Collage:
Sitting at Desk: Brooklyn

This soundscape aims to show what it is like to sit at my desk on any given day.  7 different prerecorded tracks from freesounds.org were used to compose this soundscape. 

In the end, I was able to get a basic understanding of the program through this exercise and how to proceed learning Adobe Audition.

Adobe Audition Workspace View
Adobe Audition Workspace View

PComp Week 1: Labs and more

I’d like to start out with the final project in this week’s selections of reading and labs: 

Creative Switches in Series

Inspiration:
Like the majority of the world, masks and sanitizer have become necessary additions to our daily routine.  What better everyday activity to use as inspiration than one we all wish wasn’t.   I decided to build this circuit around an instance of coming home from a walk. 

Process:

Initial Sketch
Initial sketch mapping out the three switches.

After I had the basic idea mapped out, I started building the ring switch.  I first had to make sure the ring was going to be able to carry a current, which luckily it did.  Then came the actual switch.  Initially, I was going to have the the action required for the switch be placing the ring on a flat surface with the two conductive contact points on either side (see picture below).  Unfortunately, the connection wasn’t strong enough so I decided to create a case to put the ring into which would close that switch. 

Ring switch attempt 1
Initial idea for the switch.
Final Ring Switch
Here is a closeup of the ring switch. The box is lined with aluminum foil and copper tape. When the ring is placed in the box, the switch is closed.

Next, I worked on the mask switch. 

Since the nails used were not conductive, I needed to wrap them with aluminum foil so that they could be part of the switch.  Next I strung a wire in the pocket of the mask, connecting the two ear holds.  I used aluminum foil and copper tape to attach the wire to the elastic.  The copper tape was necessary as the aluminum duct tape was not conductive on its sticky side, unlike the copper tape.  Using the copper allowed me to wrap the connections without needing to use a separate glue. 

Closeup of mask switch
Here is a closeup of the closed mask switch.

With the two other switches working, I needed to figure out how best to create the cup pressure sensor.  I had created a fabric pressure sensor once before so I had a basic idea of how to proceed.  The challenge was be making sure the switch didn’t close before I poured the water into the cup.  I experimented with a few different cups and settled on a plastic one.  Ideally, I would have used a cup with a completely flat bottom but all the plastic cups I had on hand had curved bottoms.   

For the fabric switch, I initially made a 2 and 3/4 inch diameter circle in the neoprene which separated the two conductive sides of the switch.  Because the opening was so big, the switch closed before I could pour any water into the cup.  I then tired cutting a new piece of neoprene with a smaller opening, 7/8th of an inch across.  This size opening allowed the switch to stay open while waiting for the water to be poured, but did not close the switch once filled.  This was because the bottom of the cup was curved up which did not place enough pressure on the top layer of fabric even though the cup was full.  To fix this, I taped a small ball of paper onto the bottom of the cup which, once the cup was full, pressed down through the center hole closing the switch.   

Pressure switch
Here are the pieces of the neoprene pressure switch laid out.

Completing the Circuit

The final step was to connect the series of switches to the power via the breadboard.  I did not need to modify the setup much as I had just created a circuit with an LED and a potentiometer prior to working on this lab.  Here is a closer picture of my board layout. 

Breadboard View
 Just outside the picture is the 9V battery.
Final Circuit Setup
Full view of final circuit setup.

Switch Materials:

Switch #1: The Mask

  • Cotton mask with elastic
  • Aluminum foil
  • Copper tape
  • (2) Nails wrapped in aluminum foil
  • Wires

Switch #2: The Ring Box

  • Silver Ring
  • Cardboard
  • Aluminum Foil
  • Aluminum Duct Tape
  • Copper Tape
  • Scotch Tape
  • Wires

Switch #3: Glass of Water

  • (1) Plastic Cup
  • Neoprene
  • Aluminum Duct Tape
  • Copper Tape
  • Wire
  • Dress Pins
  • Water
  • Paper
  • Scotch Tape

Lab 1: Components

I found this lab to be very helpful as it allowed me to organize my supplies and equipment while getting a better handle on exaclty what I had on hand.   I now have a much better understanding of the components as well as confidence in being able to identify individual components. 

Here are a few pictures of my organizing progress:

Components in Trays
Components out of the bags and into organizing trays.
Organizer awaiting components
Organizer awaiting components and labels.

 

Lab 2: Breadboard

I decided to build the setup in this lab as I wasn’t entirely sure if this was a lab to report something or just an informative lab. I did, however, get to practice soldering headers to a 9V batter snap which came in handy for lab 3. 

Pin Header
Close up of the my soldering work. I added pin heads to the ends of the 9V battery snap.  This image doesn’t show the layer of hot glue that was applied to the connection after to prevent a short circuit. 

Lab: Electronics

A few years back, I bought a DT-9205B Digital Mulitmeter but did not get too much use out of it.  I learned in the lab just how different multimeters can be.  Learning about my multimeter was insightful.  Unfortunately, the handbook for this particular meter was not entirely accurate when it came to identifying the icons on the front.  Through comparing the meetings shown in the lab and in the videos, I was able to figure out how my mulitmeter works and was able to take all the necessary readings for this lab. 

Lastly, here are a few questions I had from the readings:

  • When organizing electrical components, are there any precautions we need to take in regards to static?  And if so, which components do we need to be most concerned with?
  • Can we discuss more about pull-up and pull-down resistors and how they differ (type, location in circuit, etc.)?
  • Please explain relationship further the relationships happening in the equation Watts = Volts * Amps
  • When would we need to use the variable bench power supply ?
  • How does RC differ from DC/AC and what accommodations do we need to make in a circuit to use RC?
  • What is a voltage divider circuit?
  • With photocells going out of fashion due to their toxicity, are phototransistors equivalent?  Will these take the place completely of photocells and what do we need to know when using phototransistors in place of photocells?
  • Can you provide an example of when we would use a rotary encoder in a project?

ICM Week 1: How Computation Applies to My Interests

I view the world through the lens of an optimistic realist with a fascination in the world of science fiction.  I dream about all the amazing items from books and  TV while delving headfirst into researching theories around making those things a reality.  With a background in sustainable materials as well as operations, I find myself drawn towards speculating around (1) the potential material innovation, (2) the social and political impact and (3) the user interface of these science fiction innovations.

Material Research and Development

I began my research journey into new and sustainable materials while in fashion school.  There, I was introduced to fabrics made out of everything from recycled ocean plastics to orange peels.  The materials that peeked my interest the most were those made using bio-technology.  The idea of being able to grow a garment using bacteria was fascinating.  (Check out Suzanne Lee’s TED Talk on Growing Your Own Clothes if this interests you as well!)  This fascination lead me down the path towards researching the current production of these innovative bio-materials.  Here are just a few of the products and companies I found inspiring: Hemp Bio Leather, Zoa by Modern Meadow, hemp-based ink by Hemp Black, a vegan spider silk called Microsilk by  Bolt Threads.  In addition to innovation in materials, we as a society must be innovative in our thinking around why we need a particular material as well as what is the impact of every step of that materials life. 

I hadn’t originally thought much about how computation applied to the development and implementation of new materials, however,  it is now clear that computation is a necessary component in that development and implementation.  Having already highlighted a few commercial ventures, I would like to share are few inspirational creatives using computation to explore new materials.

The Mediated Matter Group, part of the MIT Media Lab, “focuses on Nature-inspired Design and Design-inspired Nature.”  This incredible group of designers and scientists have explored areas including bio-designed death masks (Vespers I and Vespers II) and Silkworm inspired/created architectural pieces (Silk Pavilion and Silk Pavilion II).

Social innovation

Computation also has the ability to uncover areas where we need to redirect resources and attention towards so that we all have a better, healthier society.  Here are just a couple projects/artists using computation to track, visualize and innovate using code. 

  • NYC Street Trees uses data to create a map showing all the trees located through out NYC. 
  • Avena+ Test Bed uses agriculture, digital fabrication and mapping to challenge EU farming economies though generative farming and tech.

Organic User Interfaces

Even though electronics are so ubiquitous in our daily lives, I do consciously make an effort to  step away from them.  Having recently discovered the following projects, I see how computation can be used to bring the natural world into our experiences with hardware and software.

  • Mud Tub by Tom Gerhardt uses mud to control a computer.
  • Stone Mouse also by Tom Gerhardt which uses a stone as the computer’s mouse.
  • In Order to Control by NOTA BENE Visual which uses dance to interact with the display of text.

As I move forward in this adventure of ITP NYU, I am sure to find more fascinating and unbelievable inspirations to draw from. 

Thanks for reading!