Skip to content

WEEK12 - Input Devices : The noise music beginns

It's Input-devices time! This week connects back to week 9 and week 8 and 6! Having already made a board that has an output device this week I focused on playing around with input devices and with to also go a bit deeper into coding.

Since my primary output at the moment is a speaker I primarily wanted to experience with different inputs which look at electricity and sound and the influence between those two.

WEEK TWELVE ASSIGNMENT

Assignments Completed
GROUP
- probe an input device's analog levels and digital signals GROUP ASSIGNMENT PAGE here
INDIVIDUAL
- measure something: add a sensor to a microcontroller board that you have designed and read it - done

HERO-SHOTS

This video shows how the current neko-board currently with the photo transistor set-up. Noise-music fun, the final projects is beginning to feel a bit more approachable.

IMG 86A25A9416DB 1

GROUP ASSIGNMENT

For the group assignment we went and measured and probed the photo-resistor (transistor). You can find this here.

KEY LESSONS: I still don't understand the oscillator but its fun. I learned something from it. but man is a mysterious black box ahahha.

Ezgif.Com Optimize

MEASURING

Here you can see the value of the resistance changing as the photo-transistor is deprived of light.

Gif2

DESIGNING THE BOARD

I made a little board to attach to the other side of the neko-board whiskers. I remade the board back in week 9 already considering how to best design it to be able to set up as many input sensors to it as possible.

Screenshot 2023 03 24 At 15.24.47

Screenshot 2023 03 26 At 16.05.46

WISHES AND THOUGHTS

I still haven't had the chance to try out etching boards to see if this is something I could at home or away from the lab. And I am also still struggling with really grasping my head around electronics. But I suppose what I can say is that at the very least this board, as small and simple as it is worked on first try. So now I need to keep practicing my coding.

CODING

I used a simple light to tone function.

int light_sensor = 8;
const int spPin = 5;

void setup() {
Serial.begin(9600); //begin Serial Communication
pinMode(spPin,OUTPUT);
}

void loop() {
  int raw_light = analogRead(light_sensor); // read the raw value from light_sensor pin (A3)
  int light = map(raw_light, 0, 1023, 10000, 20); // map the value from 0, 1023 to 0, 100

  Serial.print("Light level: "); 
  Serial.println(light); // print the light value in Serial Monitor

  //tone(spPin, light);
  tone(spPin, light);

  delay(50); // add a delay


}

BREAKDOWN

The way this code is currently set up is that the tone gets higher the more darkness there is. This can be reversed in the code rather easily by simply swapping the numbers in the mapping line function around. I could also work with negative numbers.

Note: I need to select the speakers I want to use for my final project and play around with their capacities for glitching: to see which parameters they can handle.

Some notes for myself for when I inevitably forget: When it comes to the noise music elements in this code the pitch changes with the light, which is why the tone and light input - outputs are mapped to one another. But the funky noise actually comes from the delay. So I really want to add a secondary input value in terms of delay manipulation.

I am currently planning to map that to the button or to another more slow-acting sensor. This way the delay would change slowly over time!

NOTES ON MAPPING

In the code above you can see this line:

int light = map(raw_light, 0, 1023, 10000, 20); // map the value from 0, 1023 to 0, 100
This refers to mapping, this was something I learned from Georg this week.

What I have to come to terms with is that this will probably be the most important aspect of my final-project, which ethically is something that bothers me.

Mapping as a function does exactly what I wanted to avoid, as opposed to proper inter-species communication, it creates again a human centric engagement with nature as it simply measure and map noises.... I need to find a better process of transcoding the information of a less human-focused way.

Though Georg had said a very good to me this week.....

"no one ever asks the plants if they even want to talk to us"

FINAL PROJECT THOUGHTS AND TIMELINE UPDATE

With the fabacademy more than halfway through, I need to start allocating more time to final project work.

But input week and coding has actually finally answered a lot of the previous questions that I have been struggling with. My biggest problem is still absolutely time-management.

I need to really focus and figure out how to handle that.

FILES

sound_light_code

board_kiCad

board_designfiles_renders