Ali Taher
Published

Real Problems-Protest Object

This is a sarcastic take on how people focus on the wrong things.

BeginnerFull instructions provided435
Real Problems-Protest Object

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Custom parts and enclosures

Materials

Construction paper, markers, cardboard, Jenga blocks or any object that can convey the same idea.

Schematics

Just the CPX board and a battery

Cpx

Code

protestCode.ino

Arduino
This code takes light input and sends audio output, from the onboard light sensor
#include <Adafruit_CircuitPlayground.h>

int light;

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

void loop() {
  light = CircuitPlayground.lightSensor();
 
  Serial.print("Light Sensor: ");
  Serial.println(light);
  delay(100);
  
 while (light < 50){
    light = CircuitPlayground.lightSensor();
    delay(100);
    CircuitPlayground.clearPixels();
  
    while (light > 50){
        light = CircuitPlayground.lightSensor();
        delay(100);
     CircuitPlayground.playTone(200, 100);
     CircuitPlayground.playTone(800, 100);
  }
  }
}  

protestCode.ino

Arduino
This code takes light input and sends audio output, from the onboard light sensor
#include <Adafruit_CircuitPlayground.h>

int light;

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

void loop() {
  light = CircuitPlayground.lightSensor();
 
  Serial.print("Light Sensor: ");
  Serial.println(light);
  delay(100);
  
 while (light < 50){
    light = CircuitPlayground.lightSensor();
    delay(100);
    CircuitPlayground.clearPixels();
  
    while (light > 50){
        light = CircuitPlayground.lightSensor();
        delay(100);
     CircuitPlayground.playTone(200, 100);
     CircuitPlayground.playTone(800, 100);
  }
  }
}  

Credits

Ali Taher
5 projects • 0 followers

Comments