so i’ve been thinking

about energy. like how sometimes a person has a lot of energy and sometimes there’s like less energy. i wonder how you could measure how much energy a person has at a time… like what form that usually takes… is that in how much they move… or how much heat they’re expending.. (but hard to say in this climate).. or their heartrate… anyways… sometimes a person could be exercising but feeling low on energy, or a person could be sitting still and feel a lot of energy.. so i’m wondering how to measure that..

Posted in Uncategorized | Leave a comment

fantasy

In an ideal world, it would be amazing if there was a sensor that measured your heartbeat (which there are) and that was connected to clothing or even something by remote, that would show via LED RGB colors how fast your heart was beating. You could give someone else your heart that would tell them how fast your heart was beating at any given moment no matter how far away you were from them. Like using Wi-fi. The output doesn’t really matter. It could be something you wear on your own shirt. That vibrates like a cell phone when the person’s whose heart it belongs to heart is beating fast.

Posted in Uncategorized | Leave a comment

will add more to this post later

but I want to put up:

  • sensorwalk photos
  • photos of the Arduino and related
  • maybe some code questions
Posted in Uncategorized | Leave a comment

Stupid Pet Tricks

Today’s class was cool because I got to see what everyone had made, and none of them were stupid but some of them did involve animals/pets. I was a bit in awe…

But anyways I will kind of talk about my project.

This is the code:

#include "pitches.h"

 int notes[] = {
  NOTE_FS1 , NOTE_GS1 , NOTE_AS1 , NOTE_CS2 , NOTE_DS2 };

 void setup() {
   Serial.begin(9600);
 }

 void loop() {
   int sensorValue = analogRead(2)/4;
   Serial.println(sensorValue, DEC);

   if (sensorValue <6 && sensorValue >0){
     tone(8, 92.499, 500);
   }
   if (sensorValue <11 && sensorValue>6){
     tone(8, 103.83, 500);
   }
   if (sensorValue <16 && sensorValue >11){
     tone(8, 116.54, 500);
   }
   if (sensorValue <21 && sensorValue >16) {
    tone(8, 138.59, 500);
    }
   if (sensorValue <26 && sensorValue >21) {
     tone(8, 155.56, 500);
   }
   if (sensorValue <31 && sensorValue >26){
     tone(8, 185.00, 500);
   }
   if (sensorValue <36 && sensorValue > 31){
     tone(8, 207.65, 500);
   }
   if (sensorValue <41 && sensorValue >36){
     tone(8, 233.08, 500);
   }
   if (sensorValue <46 && sensorValue >41){
     tone(8, 277.18, 500);
   }
   if (sensorValue <51 && sensorValue >46){
     tone(8, 311.13, 500);
   }
   if (sensorValue >50){
     tone(8, 369.99, 500);
   }
 }

 

The Pitches.h file is included, but because I wasn’t using the same notes, I had to use specific frequency values from a table of frequency values matched with notes.

When I got back to my room to try it out again, the light levels were lower, and actually the values (as seen in Serial Monitor) did not really go above 25-30, so to get the same results I divided analogRead(2) by 2 instead of 4, and that worked fine. However, it would be better probably to put in either a Map or a Calibration function.

It’s really cool too because it wouldn’t have come together without the help of my classmates, teacher Scott Fitzgerald, and the people of ITP.  It was like each person gave me a piece of the puzzle and then it was easy to put together.

The soldering was kind of a last-minute thing I decided to do, because obvious the sound is going to be hard to hear when the speaker is inside the box. I didn’t want to make a stupid looking hole in the box last-minute for the speaker, so I just stuck it at the edge. It’s okay.

Oh yeah, and today I went to the NYU Computer Store to pick up a packet of photo resistors. While I was there, I noticed they had medium Servo motors among other things like LED’s and a hugeeee packet of resistors. Honestly, I don’t really understand what was going on with the photo resistors. All I know is that in the end it worked. But the values coming out of analogRead(0) were all 1000+. I just tried analogRead(2) and the values were between approximately 0-50, so I decided to go with that. Since I believe it’s a serial circuit, I wonder if the values would change if there were only 2 photoresistors on the board, or 1.

I guess I’m curious now about batteries.

Posted in Uncategorized | Leave a comment

Digital input and output

Seems I am running into a snag which is the LEDs are working, but the switch isn’t. I’m not sure exactly what I’m doing wrong.

I added a line of code in void (loop) to see if the Switch State was being activated:

Serial.println(switchState);

But the Serial Monitor did not show anything.

Edit: Nevermind, got it to work.

 

 

Posted in Uncategorized | Leave a comment

Opening up the Arduino

5:14 P.M. So I got the kit today (finally!) and it’s glued in and screwed in. I haven’t connected it to the computer yet, partially because the USB driver doesn’t seem to be working for me. I think the problem was that I installed Arduino before opening up the driver. After restarting Arduino, the two usbmodem options under Board>Serial Port> are not showing up.

I wrote this code, which I pretty much copy and pasted from somewhere. So far I have on my breadboard 2 red for power wires, 2 black for ground wires, one yellow connected to digital input pin 2, a switch button, a green LED, and 2 resistors. The resistor leads are too long at the moment and should be clipped as well. That means I will have to go to Duane Reade to buy a small pair of scissors or else do it on Tuesday.

void setup(){
  pinMode(2,OUTPUT);
}

void loop(){
  digitalWrite(2,HIGH);
  delay(1000);
  digitalWrite(2,LOW);
  delay(1000);
}

I wonder if it will still work without the serial port driver. I am going to try that in the next 15 minutes.

Posted in Uncategorized | Leave a comment

My 2nd Post

Today in class we learned about analog inputs and outputs. We also got a tour of the shop. Humans may occasionally use black+white/binary thinking but for the most part we are rather analog in our sense perception. I read recently about how the main difficulty in reaching true interactivity between computers and humans is that the intelligences are so alien to each other. Today we learned about one of the main differences between computers and humans, which is the analog vs. digital divide. Our senses have incredible resolution that far outpaces any computer technology- (now, perhaps this is simply because we would never have an incentive to create a computer technology that has a greater resolution than what we can perceive, such as in film which runs at only 25 frames per second which is enough to create the illusion of motion). For example if an AI were able to mimic human emotions, it probably could do so to the extent of the 5-7 basic and universal human emotions- well there has been a robot invented that does this.  But these 5-7 emotions are simply like the binary version of our emotions, in the sense that there is only a is/isn’t state of emotion for the computer, while in a human it would be more like #0-1023.

The real-time feedback of what is going on on the Arduino shown numerically (but potentially alphanumerically?) is quite cool to watch. Also using the potentiometer to create an analog effect was interesting; Is it possible to create analog inputs without the usage of a potentiometer. Honestly I am quite excited to learn about resistance, voltage, and current as the actual meaning of those terms and how they relate to each other is…

Posted in Uncategorized | Leave a comment