

The breathing pod is a device made by a general plywood structure with an electro air pump in its center that inflates air into 3 soft actuators casted in extra soft silycon. The pump is controlled by an air quality sensor, the MQ7, that cyclically reveals the level of Carbon Dioxide detected in the air nearby and make the pump and a set of RGB LEDs behaving according to the data detection of the sensor. In the original project, those detected data should have been sent to an online data repository for citizen science, throug the use of a micro wifi embedded electronics feleer.
A FabKit is enough to control the whole system. The only added boards are those necessary to convert current voltage from a general 12V battery that would have powered all boards and the pump. For the final presentation I hadn't enough time to implement these feature, as the one for data online trasmission, because I used just the bench supply for the pump and a 5V puwer supply for the FabKit.

























Breathing_Pod.ino
int pompa = 4; // posiziona pin pwn su arduino _ pin1 su fabkit
int MQ7 = A1; // su analog non ho bisognpo di specificare se ooutput o input
int gas = 0; //inizializa la lettrua a zero
int valgas = 0; //inizializa la lettrua a zero
int ambient = 0;
const int ledR = 12; // pin digitale dove ci saràil R del LED
const int ledR1 = 11;
const int ledR2 = 10;
const int ledB = 9;
const int ledB1 = 8;
const int ledB2 = 7;
const int ledG = 6;
const int ledG1 = 5;
const int ledG2 = 4;
const int delayRED = 9000;
const int delayBLUE = 4500;
const int delayGREEN = 1000;
const int restore = 2000;
void setup () {
Serial.begin (9600);
pinMode (pompa, OUTPUT);
pinMode (ledR, OUTPUT);
pinMode (ledR1, OUTPUT);
pinMode (ledR2, OUTPUT);
pinMode (ledG, OUTPUT);
pinMode (ledG1, OUTPUT);
pinMode (ledG2, OUTPUT);
pinMode (ledB, OUTPUT);
pinMode (ledB1, OUTPUT);
pinMode (ledB2, OUTPUT);
digitalWrite (pompa, LOW);
}
void loop () {
// We read the gas data, and behave accordingly
valgas = analogRead(MQ7);
Serial.println(valgas);
if (valgas <= 200)
{
// Use the pump
pompaOn ();
Pompa
ledRon();
delay (delayRED);
pompaOff ();
delay (delayRED+restore);
ledRoff ();
}
else if (valgas > 200 && valgas <= 250)
{
// Use the pump
pompaOn ();
// delay (7000); // questo valore è quello che serve al muscolo per gonfiarsi che trovo empiricamente
ledBon();
delay (delayBLUE);
pompaOff ();
delay (delayBLUE+restore);
ledBoff ();
}
else if (valgas > 250)
{
// Use the pump
pompaOn ();
delay (1000); // This is the time the muscle needs to get inflated
ledGon();
delay (delayGREEN);
pompaOff ();
delay (delayGREEN);
pompaOn (); Pompa
delay (delayGREEN);
pompaOff ();
delay (delayGREEN+restore);
ledGoff ();
}
}
LED_Green.ino
void ledGon () {
digitalWrite (ledG, HIGH);
digitalWrite (ledG1, HIGH);
digitalWrite (ledG2, HIGH);
}
void ledGoff () {
digitalWrite (ledG, LOW);
digitalWrite (ledG1, LOW);
digitalWrite (ledG2, LOW);
}
LED_Red.ino
void ledRon () {
digitalWrite (ledR, HIGH);
digitalWrite (ledR1, HIGH);
digitalWrite (ledR2, HIGH);
}
void ledRoff () {
digitalWrite (ledR, LOW);
digitalWrite (ledR1, LOW);
digitalWrite (ledR2, LOW);
}
LED_Clue.ino
void ledBon () {
digitalWrite (ledB, HIGH);
digitalWrite (ledB1, HIGH);
digitalWrite (ledB2, HIGH);
}
void ledBoff () {
digitalWrite (ledB, LOW);
digitalWrite (ledB1, LOW);
digitalWrite (ledB2, LOW);
}
MQ7.ino
void leggigas () {
gas = analogRead (MQ7);
Serial.println (gas);
}
gas_evaluation.ino
void gasreport () {
if (valgas <= 200)
{
ambient = 0;
}
else if (valgas > 200 && valgas < 250)
{
ambient = 10;
}
else if (valgas > 250)
{
ambient = 20;
}
}
pump.ino
void pompaOn () {
Serial.println ("pompa ON");
digitalWrite (pompa, HIGH);
delay (20);
}
void pompaOff () {
digitalWrite (pompa, LOW);
delay (100);
}