Author Archives: aisencc

About aisencc

Hello! I'm Aisen Caro Chacin, my curiosity led me to research the intersecting fields of art, science, and technology driven by conceptual forms of inquiry and design thinking resulting in functional prototypes. I'm looking forward to seeing your ideas materialize. My inbox is always open.. so say "Hello!".

Arduino Analog Read and Tones

Class Recap:

  • Introduction to Arduino
  • Circuits, Symbols and Breadboarding

At the end of class we learned about analog inputs, and how they can be mapped to tone values. Digital inputs work in a similar way, instead of reading various values you will only read 1s and 0s, 5 volts or 0 volts. Arduino programming is very similar to Processing, you can add if statements and for loops; utilize the logic you have learned so far. By adding a conditional statement that listens to the button presses, you can trigger a sound. It could be a piece of music you compose or maybe you can make a piano if you make every button have its own sound.

Assignment:

Create a project that uses the tones function, with your piezo buzzer, you can add either an analog or digital input to trigger the sound. In this prototype you should experiment in making an enclosure. This interface should be conceptual and also interactive, think outside the box, or inside the music box, or an instrument, or a toy 🙂

Analog Read:

buzzer5_bb

Analog Read: http://arduino.cc/en/Tutorial/AnalogReadSerial

/////////////////////////////////////////

/*Class Code: This sketch listens to light! Depending on the variable resistance of your photoresistor you can map its value to tones*/

int speaker = 11;
int sensor = A0;
int sensorValue = 0;

void setup() {
Serial.begin(9600);
pinMode(sensor, INPUT);
pinMode(speaker, OUTPUT);
}

void loop() {
sensorValue= analogRead(sensor);
sensorValue = map(sensorValue, 1, 15, 31, 3000);
tone(speaker, sensorValue);
Serial.println(sensorValue);
delay(1000/16);
noTone(speaker);
}/////////////////////////////////////////

Digital Read:

button

Serial-Begin2

Digital Read: http://arduino.cc/en/Tutorial/DigitalReadSerial

Button: http://arduino.cc/en/tutorial/button

small-circuit-solderless-breadboard-md

Midterm Progress and Proposal Review

Today we are going to have one on one meetings to discuss your progress in the class so far, and your proposals for the midterm project due next week.

During the midterm review we will look through your blog portfolios and discuss your assignments. Most of you are in great standing! And those of you that are lagging behind need to post your work as soon as possible. All of you are required to have a portrait image on your profile and an introductory post.** The rest of posts that you should have so far are:

  1. Introduction and Profile Photo**
  2. Modifying a Sketch
  3. Drawing with Code
  4. Importing Images and Drawing tool
  5. For loops

If you are missing some of these assignments we will have technical meetings with Bernardo today. He will help all who have technical questions about midterm projects and/or reviewing incomplete assignments. If you miss these meetings you are responsible for rescheduling a meeting about your midterm progress.

See you soon!

Aisen

 

Learning For Loops: Code

///////////////////
// Hello! This is a for loop tutorial!
// You can copy and paste this on to a new processing sketch!
// By: aisencc
///////////////////
/*
In a for loop you have 3 portions: (init; test; update){ stuff }
The value is first initiated, then tested, then the loop does “stuff”, and then it is updated.

INIT:
An initiating value happens only once the first time the loop runs and it looks like:
int i= 0;
This initiating value is what your number count will start from. Usually we start counting from 0.
We use “i” because in math i is used sometimes in place for an intereger.
If we are using nested forloops we will initiate the value with “j” then “k” and so forth.
We could use “int ilovethisnumber = 0;” but that is just too long.

TEST:
The test is much like the comparator tests we use in if statements, it looks like:
i < height;
i < 100;
This means that once i grows bigger than the height of our sketch the loop will stop.

UPDATE:
The update is the opperation that allows the i to grow or shrink, it looks like:
i++; will add 1 everytime
i–; will subtract 1.
i+=10; adds 10 every time.
The update is last command to run after each turn of the loop,
and it will stop once the number is to high or too low and fails the test.

Run this sketch and see what happens.
Comment stuff out below, and run one forloop at a time to see which loop is drawing the lines you see
*/

// remember that “//” allows you to comment things out, and not affect the code
// you can also use /* stuff */ to comment stuff out

void setup() {
size(600, 900); //window size
background(255); // white background
stroke(125, 125, 255); // color of our lines

for (int i = 0; i < height; i+=10) {
line(0, i, width, i);
}
for (int i = 0; i < width; i+=10) {
line(i, 0, i, height);
}

stroke(255, 30, 30);

for (int i = height/2; i < height; i = i+5) {
line(0, i, width, i);
}

for (int i = 40; i < 80; i = i+5) {
line(30, i, 80, i);
}
}
//// run this later! 🙂
//void draw() {
// stroke(0);
// for (int i = 0; i < height; i = i+90) {
// line(mouseX, i, mouseY, i);
// }
// for (int i = 0; i < width; i = i+90) {
// line(i, mouseX, i, mouseY);
// }
//}

hello long posts

Lorizzle sure crunk sit amet, uhuh … yih! adipiscing crazy. Mofo crazy velizzle, get down get down volutpizzle, uhuh … yih! shizzlin dizzle, boofron vizzle, arcu. Pellentesque nizzle tortor. Black erizzle. That’s the shizzle izzle dolizzle izzle shizznit tempizzle tempizzle. Mauris gangsta i saw beyonces tizzles and my pizzle went crizzle et turpis. Dawg in yippiyo. Fo shizzle my nizzle eleifend rhoncizzle for sure. In get down get down i saw beyonces tizzles and my pizzle went crizzle i’m in the shizzle dictumst. Brizzle dapibizzle. Doggy tellizzle urna, pretizzle eu, yo izzle, eleifend vitae,nunc. Nizzle dang. Fo shut the shizzle up boofron yippiyo the bizzle.

Continue reading

Blog Post Etiquette

Here are some guidelines for posting to the blog:

  • Always include images, or embed videos to which you are linking.
  • Write a brief description of what you are posting.
  • Categorize you posts (Currents: News, Events; Prior Art/References: Inspirational Projects; Resources: Libraries, Forums, Communities, Books; Supplies: Sales, Stores;  Student Introduction: About, Image, Pcomp Interests) *If there is not a category, please make your own.
  • When posting about your projects you must include a few images, a video, your code (which you can add a tag for in “Text” view format of the post, not “Visual”)
  • Always credit the examples you followed to create your project. This is very important to follow for academic integrity, and also to keep our community informed of resources.
  • Blog posts uploaded after the beginning of the next class are considered late.