LogoLogo
  • Documentation Pages
  • About Minor Makers Lab
  • Documentation templates
    • Recipe template
    • Label templates
    • Ingredient template
  • Projects
    • Project overview
      • Gelance Cushion - Andrei Motian
      • Landscapes for Warhammer - Dusanka Prvulovic
      • Bioplastic Filters: An Analogue Photoshop - DaniĆ«l van Kesteren
      • Hyperdisposables - Anoush Mazloumian
      • Project Stop Touching - Summer Danoe
      • Foam For Material Activists - Laura Velgersdijk
      • DateKleed - Duncan van Norden
      • One Size Hurts All - Kaz Bison
      • Biodegradable Packaging Bags - Kim Sinke
      • DIY Faceguards - Thijs Uffen
      • Bioplastics on a Rainbow Spectrum - Desiree van Dam
      • Beyond Humanity - Britt de Heer
  • Coursework
    • Britt
      • research zine text
      • Week 11
      • Week 12 / 13
      • Week 14
      • 1 ) Kick-Off
        • Grafische Werkplaats Amsterdam
        • Safetyzine
      • 2 ) Electronics: Connecting Materials
      • 4 ) Cutting Supersurfaces
        • Zine: Art Approach
        • Furry Sample Book
      • 5 ) Additive Manufacturing
      • 6 ) Untoolkit: Electronic Inputs
      • 7 ) Transforming: Moulding and Casting with Bioplastics
      • 8 ) Untoolkit: Electronic Outputs
    • Andrei
      • Week 1
        • GWA
        • Textielmuseum
        • Safetyzine
      • Week 2
        • Ohm's Law & circuits
        • Speaker on denim
      • Week 4
        • Inflatables 2D to 3D
        • Smooth to sharp with polypropylene
      • Week 5
        • Making a switch for the laser cutter in Fusion360
        • Designing and 3D printing molds
      • Week 6
        • Wearable switch for sound
        • Analog Sensor
      • Week 7
        • Home materials
        • Making bioplastics
        • Material properties
      • Week 8
        • Virtual Swatch
        • Processing
        • RGB LED
      • Project weeks 11 - ?
        • Week 11: Kick-off
          • Brainstorm Session
          • 5 min pitch
          • Trail of Evidence
          • Proposal
        • Week 12: Experimenting
          • Research workout materials
          • First Experiment
          • Trail of Evidence
        • Week 13: Project Work
          • Insights
          • Reframing session with Laura
          • Trail of Evidence
        • Week 14: Reframing
          • Reflective design method
          • Going bigger
          • Trail of Evidence
        • Week 15
          • Highlights photo's
          • Reframing, research & insights
          • Trail of Evidence
        • Week 16
          • Going even bigger
          • Trail of Evidence
        • Week 17
          • Trail of Evidence
        • Project
    • Anoush
      • Week 11-19
        • Week 11 | project kick-off
        • Week 14 | First experiments
        • Week 15 | Progress presentation
        • Last reframing session
        • Trail of Evidence
      • Week 1-8
        • Overall Reflection
        • Week 8 | Untoolkit - Electronic Outputs
        • Week 7 | Transforming bioplastics
        • Week 6 | Untoolkit - Electronic inputs
        • Week 5 | Additive Manufacturing
        • Week 4 | Cutting Supersurfaces
        • Week 3 | Reading Week
        • Week 2 | Electronics: Connecting Materials
        • Week 1 | Kick-off
    • DaniĆ«l
      • Week 20: Expo Week
      • Week 19: Project Week 9
      • Week 18: Project Week 8
      • Week 17: Project Week 7
      • Week 1: Kick-Off
      • Week 2: Electronics and Connecting Materials
        • Part I: The Basics and Recreating Circuits
        • Part II: The Making of the Speaker
        • Part III: Testing the speaker
      • Week 3: Reading Week
      • Week 4: Processes & Collaboration
        • Part I: exploring the words
        • Part II: experimenting with the laser cutter
      • Week 5: Critical Making 3D
        • Part I: Creating the injection mold
        • Part II: Creating the two-part mold
        • Part III: Printing the designs
      • Week 6: Electronics & Open Design
      • Week 7: Bioplastics
        • Material Properties Sheet
        • The Ma2E4 Toolkit
        • The Ma2E4 Toolkit (second bioplastic)
        • An application for the bioplastic
      • Week 8: Interfaces & Algorithmic Bias
      • Week 9: Documentation Week
      • Week 10: Assessments
      • Week 11: Project Kick-Off
      • Week 12: Recess
      • Week 13: Project Week 2
      • Week 14: Project Week 3
      • Week 15: Project Week 4
      • Week 16: Project Week 5
        • Presentation Preparation
    • Desiree
      • Summaries
      • Kick-off
      • Week 1 - Safety Zine
      • Week 2-3 Electromagnets
      • Week 4 - Cutting Supersurfaces
      • Week 5 - Additive Manufacturing
      • Week 6 - Untoolkit: Electronic Inputs
      • Week 7 - Transforming: Molding and Casting with Bioplastics
      • Week 8 - Untoolkit: Electronic Outputs
      • Trail of Evidence
      • Website
      • Material Archive
      • Week 11 - Choose a project
      • Week 12 - 13
      • Week 14
      • Week 15
      • Week 16
      • Week 17
      • Week 18
      • Week 19
    • Duncan
      • Week 1: Kick-Off
        • Masterclass Studio Overvelde
        • Workshop letterpress
        • Textielmuseum Tilburg
        • Meet the Makers - introduce yourself
        • Safetyzine
        • extraĀ“s
      • Week 2: Electronics: Connecting Materials
        • Zine: Kits & Open sources
      • Week 3: Reading week
      • Week 4: Cutting Supersurfaces
        • Zine:
      • Week 5: Additive Manufacturing
        • Workshop Amstelstation
        • Zine: 3D-printers & Being editors
        • Overall conclusion
      • Week 6: Untoolkit (Inputs)
        • Together w/ Loes
        • Zine: week 6
        • ExtraĀ“s
      • Week 7: Transforming
        • Zine: Social issues
        • extra's
      • Week 8: Untoolkit (Outputs)
        • Zine: Does being a 'maker' makes you a better civilian?
        • extraĀ“s: week 8
      • Week 9: Reflection
        • Zine:
        • extra's (week 9)
      • Week 10: Assessments
        • Zine:
      • Week 11
        • Makers skills & attitude
        • Design research skills
        • Collaborative learning
      • Week 12
        • Maker skills & attitude
        • Design research skills
        • Collaborative learning
      • Week 13
        • Scenario
        • Maker skills & attitude
        • Design research skills
        • Collaborative learning
      • Week 14
      • Week 15
        • Materialen lijst
        • Lijst met verschillende manier van connecten
        • Scenarios
        • Inspiratie voor vormen
        • Concrete voorbeelden tekenen
        • Samples / plan schrijven om te MAKEN!!
        • Kleuren inspiratie
      • Week 16
      • Week 18
        • Samples
        • The making of Samples
        • Inspiratie
        • Benodigdheden Woensdag 03/06/20
        • Inspiratie foto serie
        • Digitale tekeningen
      • Week 19
      • Week 20
    • DuÅ”anka
      • Week 1 - 8
        • 1 | Kick-Off
          • 2 | Electronics: Connecting Materials
            • Assignment 0 - Zine
            • Assignment 1 - Paper circuit
            • Assignment 2 - Soft speaker
          • Assignment 1
          • Assignment 2
        • 4 | Cutting Supersurfaces
          • Assignment 0 - Zine
          • Assignment 1 - Sample Book
        • 5 | Additive Manufacturing
          • Assignment 0 - Zine
          • Assignment 1 - Mold documentation
          • Assignment 2 - Molds
        • 6 | Untoolkit: Electronic Inputs
          • Assignment 0 - Zine
          • Assignment 1 - Antiprimadonna's
          • Assignment 2 - Working circuit
        • 7 | Transforming: Molding and Casting with Bioplastics
          • Assignment 0 - Zine
          • Assignment 1 - Intro
            • Bioplastics
            • Experiential toolkit
            • Material properties sheet
            • Future applications
            • Reflection
        • 8 | Untoolkit: Eelectronic Outputs
          • Assignment 0 - Zine
          • Assignment 1 - Working circuit
      • 11 | Projects Kick-Off
        • Trail of Evidence
      • 12 | First experiments
        • Trail of Evidence
        • Building the board
      • 13 | Project Work
        • Trail of Evidence
        • Building scenery
      • 14 | Reframing
        • Trail of Evidence
        • Game ideation
      • 15 | Making fake water
        • Trail of Evidence
      • 16 | Making a cherry blossom tree
        • Trail of Evidence
      • 17 | Expo plan & Clouds
        • Trail of Evidence
      • 18 | Research zine & Coffee soil
        • Research zine
      • 19 | Research zine 2.0
    • Kaz
      • 1 | Kick-Off
      • 2 | Electronics: Connecting Materials
        • Assignment 0 - Zine
        • Assignment 1 - Paper circuits
        • Assignment 2 - Building a speaker
      • 4 | Cutting Supersurfaces
      • 5 | Additive Manufacturing
      • 6 | Untoolkit: Electronic Inputs
      • 7 | Transforming: Molding and Casting with Bioplastics
      • 8 | Untoolkit: Electronic Outputs
      • 11 - 20 | Project: Face Mask Strap
        • 11 | Kick-Off / Pitch
        • Trail of Evidence
        • 15 | Midterm presentation
    • Kim
      • 1 - Introweek
        • Discussion notes
        • Try out zine - Week 1
      • 2 - Electronics: Connecting Materials
        • Zine - Week 2
      • Zine - Week 3
      • 4 - Cutting Supersurfaces
        • The making of: The Sample Book
        • Dense - Clear final sample book
        • Zine - Week 4
      • 5 - Additive Manufacturing
        • Understanding Fusion 360
        • Understanding Cura
        • Understanding the 3D Printer
        • Zine - Week 5
      • 6 - Coronaweek Untoolkit: Electronic Inputs
        • LDR LED connection with Arduino
        • Zine - Week 6
      • 7 - Coronaweek Transforming: Molding and Casting with Bioplastics
        • Material properties sheet + Experiential toolkit
        • Future Bioplastic concept
        • Zine - Week 7
      • 8 - Untoolkit: Electronic Outputs
        • Output swatch
        • Zine - Week 8
      • Project Page Biodegradable Packaging Bags
      • 11 - Project proposal week
        • Trial of evidence week 11
      • 12&13 - Project Bioplastic Consumables
        • Trial of evidence week 12&13
      • 14 - Reframing week
        • Trial of evidence week 14
      • 15 - Project work
        • Trial of evidence week 15
      • 16 - Reframing and expo prep
        • Trial of evidence week 16
        • 16 - The first test
      • Material Sample 1
      • 17 - Project work
        • 17 - Ironing a bioplastic bag
        • 17 - New method for sticking a bioplastic bag together
        • 17 - How to compost?
        • Trial of evidence week 17
      • 18 - Trial of Evidence
      • 19 - Trial Of Evidence
      • 20 - Trial Of Evidence
      • 21 - Final Expostion
    • Laura
      • Week 1: Kick off
      • Week 2: Electronics: connecting materials
      • Week 4: Cutting Supersurfaces
      • Week 5: Additive Manufacturing
      • Week 6: Untoolkit: Electronic inputs
      • Week 7: Transforming Molding and Casting with Bioplastics
      • Foam For Material Activists
        • How to protect?
        • To find a material
        • Foam
        • Trail of Evidence
        • Midterm presentations
    • Summer
      • Foto's
      • Midterm presentation
      • Project: Stop touching
        • Project Proposal
        • Inspirational projects
      • Cutting Supersurfaces
      • Additive Manufacturing
      • Molding and Casting with Bioplastics
        • Creating natural dyes
        • Created bioplastics
      • Electronic input
      • Electronic output
    • Thijs
      • Week 1 - Kickoff
      • Week 2 - Electronics : connecting materials
      • Week 2 - Workshop : debugging circuits
      • Week 2 - Making a speaker
      • Week 3 - Processes & Collaboration
      • Week 4 - Cutting supersurfaces
      • Week 4 - Zine editor
      • Week 5 - Additive manufacturing
      • Week 6 - Untoolkit: Electronic Inputs
      • Week 7 - Transforming: Molding and Casting with Bioplastics
        • Ma2E4 Toolkit
        • Future applications & reflection
      • Week 8 - Untoolkit : electronic outputs
      • Week 11 - Project kickoff
      • Week 12 - First experiments
      • Week 13 - Project work
      • Week 14 - Reframing & trail of evidence
        • Reframing : additional research
        • Shopping list
        • Testing bioplastic material
      • Week 15
      • Weeks 15 - 20
      • Expo prep
  • CLASS NOTES
    • Zine documentation (collaborative doc)
    • Discussions week 2-8
      • Week 02 - Connecting Materials
      • Week 04 - Cutting Supersurfaces
      • Week 05 - Additive Manufacturing
      • Week 06 - Untoolkit Electronics Inputs
      • Week 07 - Transforming Bioplastics
Powered by GitBook
On this page
  • Zine
  • Assignment 1: RGB LED & digital switch
  • Assignment 2: RGB-LED & analog sensor
  • Processing & Digital Swatch
  • Reflection
Export as PDF
  1. Coursework
  2. Thijs

Week 8 - Untoolkit : electronic outputs

PreviousFuture applications & reflectionNextWeek 11 - Project kickoff

Last updated 5 years ago

Zine

My zine design :

Assignment 1: RGB LED & digital switch

For this assignment, I used my Grove Arduino board. My regular board is broken so I had to improvise. Loes helped me out with this problem and showed me a way to connect the grove board with my breadboard.

To begin with, I connected the RGB LED to my groveboard on the D0, D1 and D2 pinholes. I connected those to my breadboard. Then I placed three 22 ohm resistors on the board, paralel from the LED pins and the cables. At last, I connected the LED to an GND port, and connected this to the GND of my arduino.

In Arduino, I used the following code that Loes provided to me:

int RED_PIN = D2;
int GREEN_PIN = D1;
int BLUE_PIN = D0;

// This variable controls how fast we loop through the colors.
// (Try changing this to make the fading faster or slower.)

int DISPLAY_TIME = 100;  // In milliseconds

void setup()
{
  // Here we'll configure the Arduino pins we're using to
  // drive the LED to be outputs:

  pinMode(RED_PIN, OUTPUT);
  pinMode(GREEN_PIN, OUTPUT);
  pinMode(BLUE_PIN, OUTPUT);
}

void loop(){

// Off (all LEDs off):

  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, LOW);

  delay(1000);

  // Red (turn just the red LED on):

  digitalWrite(RED_PIN, HIGH);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, LOW);

  delay(1000);

  // Green (turn just the green LED on):

  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, HIGH);
  digitalWrite(BLUE_PIN, LOW);

  delay(1000);

  // Blue (turn just the blue LED on):

  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, HIGH);

  delay(1000);

  // Yellow (turn red and green on):

  digitalWrite(RED_PIN, HIGH);
  digitalWrite(GREEN_PIN, HIGH);
  digitalWrite(BLUE_PIN, LOW);

  delay(1000);

  // Cyan (turn green and blue on):

  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, HIGH);
  digitalWrite(BLUE_PIN, HIGH);

  delay(1000);

  // Purple (turn red and blue on):

  digitalWrite(RED_PIN, HIGH);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, HIGH);

  delay(1000);

  // White (turn all the LEDs on):

  digitalWrite(RED_PIN, HIGH);
  digitalWrite(GREEN_PIN, HIGH);
  digitalWrite(BLUE_PIN, HIGH);

  delay(1000);
}

After I uploaded the code, the LED on my breadboard began to shine different colors!

Now my LED is working, I am going to connect a switch to toggle between the different colors of the LED.

Because I don't have a 10K resistor at home, Loes has thaught me to use a Pullup. In this way, you can enhance the signal a digital pin is giving. I had to swap the High and Lows in the original code from Micky, because the connections on the breadboard are different. The button is normally attached to a ground, but now it has to be attached to a 3v port. My code looked like this:

//       RGB LED Color Control
//      circuits4you.com
//========================================================================
//Changes made by Micky van Zeijl 
 
// constants won't change. They're used here to
// set pin numbers:
 
// Make sure to change the pinnumbers when you’re using the Arduino MKR.
// For the nodeMcu you can use all pins except 0. Don’t forget to add a D
// so it’s redPin = D3; for example

const int buttonPin = D8; // for Arduino MKR 1010 I used 6
const int redPin = D1; // for Arduino MKR 1010 - use pin 3
const int bluePin = D3; // for Arduino MKR 1010 - use pin 4
const int greenPin = D2; // for ARduino MKR 1010 - use pin 5

int counter = 0;
bool previousbuttonstateHigh = false;
void setup() {
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
  pinMode(D8,INPUT_PULLUP);
  Serial.begin(115200);
}

void loop() {

  int buttonState;
  buttonState = digitalRead(buttonPin);

  Serial.println(counter);

  if (buttonState == HIGH && !previousbuttonstateHigh) {
    counter++;

    if (counter > 3) counter = 0;
    previousbuttonstateHigh = true;

  }

  if (buttonState == HIGH) {
    previousbuttonstateHigh = false;
  }

  Serial.print("buttonstate is:" );
  Serial.println( buttonState);
  Serial.print("previous buttonstate is:");
  Serial.println(previousbuttonstateHigh);

  if (counter == 0) {
    digitalWrite(redPin, LOW);
    digitalWrite(greenPin, LOW);
    digitalWrite(bluePin, LOW);
  }

  else if (counter == 1) {
    digitalWrite(redPin, HIGH);
    digitalWrite(greenPin, LOW);
    digitalWrite(bluePin, LOW);
  }

  else if (counter == 2) {
    digitalWrite(redPin, LOW);
    digitalWrite(greenPin, HIGH);
    digitalWrite(bluePin, LOW);
  }

  else if (counter == 3) {
    digitalWrite(redPin, LOW);
    digitalWrite(greenPin, LOW);
    digitalWrite(bluePin, HIGH);
  }


}

At first, I received unexpected outputs from the counter in the code. I only saw a red light from the LED.

To check if my code was correct, I added a serial print line to each else if statement. The code was correct so it had to be my hardware.

//       RGB LED Color Control
//      circuits4you.com
//========================================================================
//Changes made by Micky van Zeijl 
 
// constants won't change. They're used here to
// set pin numbers:
 
// Make sure to change the pinnumbers when you’re using the Arduino MKR.
// For the nodeMcu you can use all pins except 0. Don’t forget to add a D
// so it’s redPin = D3; for example

const int buttonPin = D8; // for Arduino MKR 1010 I used 6
const int redPin = D1; // for Arduino MKR 1010 - use pin 3
const int bluePin = D3; // for Arduino MKR 1010 - use pin 4
const int greenPin = D2; // for ARduino MKR 1010 - use pin 5

int counter = 0;
bool previousbuttonstateHigh = true;

void setup() {
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
  pinMode(D8,INPUT_PULLUP);
  Serial.begin(115200);
}

void loop() {

  int buttonState;
  buttonState = digitalRead(buttonPin);

  Serial.println(counter);

  if (buttonState == LOW && !previousbuttonstateHigh) {
    counter++;

    if (counter > 3) counter = 0;
    previousbuttonstateHigh = true;

  }

  if (buttonState == HIGH) {
    previousbuttonstateHigh = false;
  }


  if (counter == 0) {
    digitalWrite(redPin, LOW);
    digitalWrite(greenPin, LOW);
    digitalWrite(bluePin, LOW);
    Serial.println("uit");
  }

  else if (counter == 1) {
    digitalWrite(redPin, HIGH);
    digitalWrite(greenPin, LOW);
    digitalWrite(bluePin, LOW);
    Serial.println("Rood");
  }

  else if (counter == 2) {
    digitalWrite(redPin, LOW);
    digitalWrite(greenPin, HIGH);
    digitalWrite(bluePin, LOW);
    Serial.println("Groen");
  }

  else if (counter == 3) {
    digitalWrite(redPin, LOW);
    digitalWrite(greenPin, LOW);
    digitalWrite(bluePin, HIGH);
    Serial.println("blauw");
  }


}

I finally noticed that my resistors didn't connect properly, so the green and blue colors didn't want to light up. When I fixed this, I noticed that the output was very unstable. It had to do with my counter, because I saw in the monitor that the counter value fluctuated from 0 to 3 very quickly.

When I switched

bool previousbuttonstateHigh = false;

to

bool previousbuttonstateHigh = true;

I fixed the problem. Because when the previous button state is high and the counter reads false, it forms a loop and pendles between the counter values. When the previous button state is high and true, the counter can make a distinction between the different inputs.

Assignment 2: RGB-LED & analog sensor

The next assigment was to connect a RGB-LED to an analog sensor. Originaly, we had to use a LDR sensor. I didn't have one, so I used a grove light sensor.

At first, I tried the code on DLO. Because I use a different sensor, the code didn't work properly. I searched on the internet and found a nice code I could use to manipulate the RGB-LED with the sensor:

int sensorPin = A0; //Light sensor
int redPin= D1; 
int greenPin = D2;
int bluePin = D3;
int sensorValue = 0; // variable to store the value coming from the sensor

void setup() {
Serial.begin(115200); //sets serial port for communication
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
}
void loop() {
sensorValue = analogRead(sensorPin); // read the value from the sensor
Serial.println(sensorValue); //prints the values coming from the sensor on the screen


delay(100);

if (sensorValue < 400) {
  setColor(170, 0, 255); //purple
  }

  else {
    setColor(255, 255, 0); //green
    }

}

void setColor(int redValue, int greenValue, int blueValue) {
  analogWrite(redPin, redValue);
  analogWrite(greenPin, greenValue);
  analogWrite(bluePin, blueValue);
}

The code worked perfectly, the color of the LED changed when placed in a dark environment.

Processing & Digital Swatch

The next step is to work with Processing. Processing is a sketchbook software that generates visuals by the input of code. It is possible to connect the input of your sensor with Arduino to manipulate the output of Processing.

Because I was working with the grove light sensor on my previous assignments, I decided to use it for this assignment as well because I am familiar with it.

The output created by Processing has to resemble the series we created, so I am aiming for a black background and copper details.

I searched on the processing website for some nice variable examples in shapes. They all use the mouse position, I have to adjust to code so the output reacts to my sensor input.

To do so, I wrote some code for the Arduino, so the output on my COM3 will convert it's values for processing languague.

int sensorValue = 0;

void setup() {
Serial.begin(115200); //needs to match processing baudrate
}

void loop() {
//Serial.println(analogRead(A0)); // for debugging only
sensorValue = analogRead(A0); // store value in sensorValue
Serial.write(map(sensorValue, 0,1023,0,255)); // map to processing range
delay(50);
}

Next, I looked at the examples on the processing website. I came across a cool design, a bezier.

The code for this example was originaly like this:

void setup() {
  size(640, 360); 
  stroke(255);
  noFill();
}

void draw() {
  background(0);
  for (int i = 0; i < 200; i += 20) {
    bezier(mouseX-(i/2.0), 40+i, 410, 20, 440, 300, 240-(i/16.0), 300+(i/8.0));
  }
}

The sketch now only uses the input of your mouse. The styling is also not in line with my idea. So I had to connect my sensor input with Processing, and change the values of the sketch to make it appear more like the series we've made.

The code I wrote looked like this:

import processing.serial.*;
int x;
int y;
float outsideRadius = 150;
float insideRadius = 100;
Serial myPort;
int dataInput;
PImage bg;


void setup() {
  size(500, 500);
  stroke(91, 53, 17);strokeWeight(4);  // Thicker
line(20, 40, 80, 40);
  noFill();
  String portName = "COM3";  //change to your own port address!
  myPort = new Serial(this, portName, 115200); //needs to match arduino baudrate
}

  
 void draw() {
  background(0);
  for (int i = 0; i < 200; i += 20) {
    bezier(dataInput-(i/2.0), 40+i, 410, 20, 440, 300, 240-(i/16.0), 300+(i/8.0));
  }
}

void serialEvent(Serial myPort) {
dataInput = myPort.read();
 }

I adjusted the thickness and colors of the lines. I also adjusted the canvas size to match the 10cm * 10cm requirement. I changed the bezier input to dataInput instead of mouseX.

I uploaded the code, and the bezier moved when I changed the light on my light sensor!

Reflection

During this week, I learned a lot of new insights concerning programming on Arduino. I had some prior experience, but that was very basic compared to the things I've done this week.

Especialy the combination with the breadboard and additional electronical circuit props, like resistors (and the lack of them) has thaught me to debug, program and build cool installations.

Loes helped me out a lot this week, because I didn't have all the required parts. I learned how to pull up a signal for my Arduino board, so I can bypass the required 10k ohm resistor for my button.

State 1 - Thijs Uffen
State 2 - Thijs Uffen
My arduino setup - Thijs Uffen
My working RGB LED - Thijs Uffen
The setup for my button - Thijs Uffen
Only a red light - Thijs Uffen
Disco party - Thijs Uffen
It finally worked! - Thijs Uffen
The setup I used for this assignment - Thijs Uffen
Working light sensor & LED - Thijs Uffen
The example I found - Thijs Uffen
The digital swatch I made - Thijs Uffen
It worked! - Thijs Uffen
Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.Notion
Logo