Not long ago I was asked to make a hardware project with art involved to show to high school students. I firstly thought about creating an electronic mural but I enjoy better collaborative work so I got inspired by distributed ledger system. The idea is to have a bunch of nodes, each of them have space for drawing and electronic random gadgets such as led lights. They also have conductive materials and wires. The idea is to let the students draw stuff in the "nodes" and then ask another "nodes" to connect to theirs. When connecting, the electronic devices in the nodes activate and so they are collaborating in the same work, instead of leaving their art individual. The result will be a big mural full of different drawing styles and electronics. Also bought a bunch of translucent paper so we can put origami in the led lights and make it even more cute.
This is the basic code for the RGB led pin in one of the nodes, as described in adafruit:
//rgb_led.ino
int redPin= 7;
int greenPin = 6;
int bluePin = 5;
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
setColor(255, 0, 0); // Red Color
delay(1000);
setColor(0, 255, 0); // Green Color
delay(1000);
setColor(0, 0, 255); // Blue Color
delay(1000);
setColor(255, 255, 255); // White Color
delay(1000);
setColor(170, 0, 255); // Purple Color
delay(1000);
}
void setColor(int redValue, int greenValue, int blueValue) {
analogWrite(redPin, redValue);
analogWrite(greenPin, greenValue);
analogWrite(bluePin, blueValue);
}
As an extra point, I'm also doing some conductive paint with graphite the students could use to experiment with drawing + leds. I already tried this one with my 12 years old student, who enjoyed it a lot.
Here's the code for the capacitive stuff, as we made in our class:
//graphite.ino
#include <CapacitiveSensor.h>
CapacitiveSensor capSensor = CapacitiveSensor(4,2);
int threshold = 1000;
const int ledPin = 12;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop() {
long sensorValue = capSensor.capacitiveSensor(30);
Serial.println(sensorValue);
if(sensorValue > threshold) {
digitalWrite(ledPin, HIGH);
}
else {
digitalWrite(ledPin, LOW);
}
delay(10);
}
Why physical nodes for collaboration? My father is a psychologist and he explained me not long ago touching makes understanding better, for example when toddlers try to put different figures (triangles, circles and such) in easy puzzles. For this, for example, exist the kindergarten toys for teaching programming, which only works in basic programming logic without maths or words involved, only a robot and the directions (right, left, straight) indications. This is the same, in order to better understand hardware and collaborative ledger, I think it's easier to make a physical performance.
I aim to upload every detail in an open repository in github, it's still ongoing, tho, excuse the low quality of it right now.