HW3: Sound, GPIO and led – input output

https://github.com/parikhpriyal/iot_class15/blob/master/speech_with_led.js

Learning how to use LED lights in class, I tried to combine them with sound. So I used the say.js and gpio.js packages to complete the assignment.

Say.js uses the Festival speech synthesis system, supported by Linux, to convert text defined in the code to sound. While GPIO controls the switching on and off of the LEDs.

I combined the two to show the changing of the lights. When the green light switches on, the pi says ‘Hi! Turning light green.’. Whereas, with the red light on, it says ‘Bye! Turning light red.’

A similar system is used at certain traffic light to notify blind pedestrians for crossing. The sounds they usually use are single chirp sounds or beeps. Below is a link from youtube to show how that works in reality.

HW3: Sound, GPIO and led – input output

Alarm Project and learning curves

Basically, I built an alarm which lights up and plays music. Here’s my code. At first I wanted to use a potentiometer to set age as a parameter for the length of the alarm time. Different ages need different sleep. I’m interested in augmenting sleep hygiene. I wonder, should we be in total control of our sleep timing? Considering the unhealthy sleep patterns of many modern people, I wonder.  The thought of connected and augmented sleep ties into my midterm idea. I did some sketches/notes, see below.REM-sleep-cycleFullSizeRender

All good and fine in theory. Then it falls apart.

giphy-1

Let the hurdles begin: First, the potentiometer is problematic to use with javascript, as it is best with digital, so I reevaluated my functionality. I set up a ball switch for the circuit to turn off the alarm. Then, low and behold the npm library which I had chosen was pulling up a ‘window’ error- it wasn’t playing well with rPi. Ugh. Reboot!

IMG_8066Screen Shot 2015-09-24 at 5.08.35 PM
My second time around I set up the node-aplay library. And it worked! Kind of. The file plays as static. 😦 I tested it on ‘omxplayer music.mp3’ and the file works. I’m stumped! Have to run this by Ayo in class.

On the bright side, I’ve learned a massive amount about how the libraries function! I’ve now played audio on my Pi and used Cyberduck to send a file and edit code on my PI! And my alarm code/pcomp does work!

ps! i forgot that we were doing wordpress for the blog so i posted on tumblr. oops!

Alarm Project and learning curves

Pi HW #2, Building a Jamband

After a long and arduous first 3 weeks of confusion, buy a hella ton of electronics I feel confident enough for my first project/thing of Raspberry Pi. To start we were tasked with creating a “thing” using the raspberry pi, two inputs, two outputs, and at least two node packages (aka libraries or code cheat sheets as it were). All this leaves now is the question of the thing… Quickly I was brought into the idea of a Jamband, aka Jukebox.

What initially inspired the idea of my jamband wurlitzer gig was the various musicians found in my walks both to and from Parsons everyday, an example is on the right. I want to see if I could recreate it at least on a simple scale model on raspberry, for now let us just call it my music box. Using my still growing knowledge of code I devised a three parts where inputs being buttons which then each will play a unique sound/note when pressed and from there also turns on a led connected to said button both creating something visual and acting as the confirmation (console.log) that everything is working POINTS!. More so one note is kinda drab and stupid so I’m taking it upon myself to do THREE of these sets, one for each of the band mates.

Physical Aspects

  •  Led’s – for lights to make something visual also acting as a visual confirmation
  • Speaker – to play the music generations from code
  • Button’s – for people to press and start playing the music beats they want

Digital Aspects

  • Node – cause JS is a lot easier to code over python, sorry but true
  • NPM onoff – package controller for GPIO led and buttons
  • node-aplay – music player and uploader

Ok so with plan in mind it is time to start building and after almost 6 hours in the lab I got the node, js, and packages along with general operations working at which point I DID IT. I MADE A LIGHT BLINK!!!! VICTORY! Ok, well sorta it’s definitely progress on a system I have had little to no experience with before and with a coding system I have had little to no experience before but I’m happy, that in truth is about a 1/3rd of my project right there. All I need to do right now is add the music, and string together another 2 sets and we are good to go.

IMG_2367

Final Project

Pi HW #2, Building a Jamband

HomeWork-1 (The Fluxus Factor)

The Fluxus influence on correspondence art and mail art is truly incredible. It seems to be a stepping-stone for creating a network of artists that exists today. The existence of such network is highly beneficial to artists to not only communicate and share new ideas but to also use a medium to collaborate for the purpose of expression of art.

The origin of this dates us back to the correspondence art that the article by Ken Freidman mentions. This form of elusive art that was activated over mail may seem to have blurred out with the introduction of electronic communication. However, it was correspondence art that seems to have blossomed the idea of sharing art within communities whose interest lies in common field. From private conversions and individual expression, we’ve come a long way in making art global and easily accessible. The Something Else Press that served as a large locust of correspondents is again just a seed that could have possibly seen growth in the form of multiple publications today that recognize the works of artists world over.

One good example of a large community of artistic explorations can be seen in the form of exhibitions or Biennales. These are a result of a community that has been generated over years with new members each passing day. From communications via mail art to e-communications, these exhibitions successfully run n public forums. I happened to visit one such Biennale in Kochi in India and was enthralled with the large community of artists that exists today. This community is not limited to individuals but has expanded through cultural and social societies across the globe. Events like these only help to bring them together physically each year.

Further exploration in terms of virtual presence through virtual reality could possibly help this community stay active not only over internet but every second of a person’s artistic life.

HomeWork-1 (The Fluxus Factor)

HW Week 3: Raspberry Pi + Node.js OnOff with Double Inputs & Outputs

After a couple of failed attempts on using npm to install node.js packages, I finally managed to get something working. Even if it’s as simple as using OnOff node package with two buttons as input and two LEDs as output….. this takes way more effort and time that I had imagined. My raspberry Pi just always fails on me.

HW Week 3: Raspberry Pi + Node.js OnOff with Double Inputs & Outputs

HomeWork-2

https://github.com/sings257/IOT-Fall-2015

1. Using Node packages ‘onoff’ and ‘sleep’

I have used the above packages to flash my LED and control it with a morse code. The onoff package helps to light the LED and the sleep package helps to control the flashing of the light with intervals.

IMG_0950
Screen Shot 2015-09-23 at 7.38.19 pm

Screen Shot 2015-09-23 at 7.26.47 pm

Screen Shot 2015-09-23 at 7.27.12 pm

Screen Shot 2015-09-23 at 7.27.25 pm

2. Using two inputs and two outputs

I have used the node package onoff and, given two inputs and two outputs. Two inputs are the buttons and the two outputs are the LEDs.

IMG_0971

Screen Shot 2015-09-24 at 6.50.36 pm

HomeWork-2

Mail Art Then and Now Reflection

With the proliferation of Cloud Computing and Internet of Things, the notion of Mail Art and Correspondence Art, art that does not rely on one sole creator but evolves as different people contribute to the creation of the piece, offers so many new creative potentials. The process of one art being passed on and another artist reacting to the piece could now be done within seconds through emails or other messaging platforms. The time it takes to transport physical objects has also been reduced dramatically. Now, rather than Correspondence art, the name “Simultaneous Art” seems more relevant. Without having to wait days or even hours for mail to be transferred from one place to another, artists can simultaneously work together online and even physically. Think about text art (in the form of mail art) on a Google Doc where all the artists can write all at once. Through motion sensors or virtual reality simulators, we can now collaborate on one project while being physically separated by hundreds of miles. One example is the inFORM, a project created by The Tangible Media Group, which allows users to move 3D objects by controlling a pinscreen remotely (http://www.fastcodesign.com/3021522/innovation-by-design/mit-invents-a-shapeshifting-display-you-can-reach-through-and-touch). The increase of crowd sourcing as an artist’s tool further propels the movement towards “Simultaneous Art.” Among the artists, Aaron Koblin, now the creative director of data arts at Google, most notably created The Sheep Market in 2006 using Mechanical Turk. (Refer to this article crowd-sourcing in art, http://www.artnews.com/2014/09/02/artists-and-crowdsourcing/) The piece shows 10,000 sheep drawings of varying skill levels in 40 days, all drawn by workers who were paid two cents per sketch.

As shown from the examples above, Internet of Things and exponentially developing computing technologies introduce a myriad of new methods for creative collaboration. From these new possibilities springs the question: how are these new forms of art and art making shifting artist’s agency? In regards to Koblin’s The Sheep Market, could the workers paid to draw a single sheep also claim authorship of the final piece? According to the Koblin, the piece belongs to a “smarmy capitalist person who is selling the sheep drawings.” Designers in tech, especially, could not help but think about how our work fits in this world of collaboration. If we take lines of code from Codepen or use open source to fuel our designs, how creative are we really being?

Mail Art Then and Now Reflection

HW Week 2: Python Parse Email

https://github.com/umisyam/IOT_Fall2015/blob/master/umi-email-hw.py

This simple script has two functions that searches your inbox:

  1. Based on the substring (it takes string input)
  2. Based on the array index (it takes integer input)

And then it sends out 2 emails with different subject and body copy containing result from raw_input 1 and 2. Change it your own email credentials to make sure it works! Everything is set to loop again after 1 minute time interval.

HW Week 2: Python Parse Email