====== Projets E-Fabrik 2018 ====== ==== Résumé ==== E-Fabrik' met en relation des personnes en situation de handicap, des jeunes en insertion et un fablab pour imaginer et prototyper un projet qui améliore la vie quotidienne des personnes en situation de handicap. ==== Laetitia : Sacoche et tablettes de communication ==== Une sacoche à créer pour accrocher sur le côté de sa chaise afin qu'elle puisse attraper d'elle même les objets suivant, qui sont à créer : * une tablette simulant une "Une" de journal humouristique (type Charlie Hebdo) et servant de fiche de présentation * des plus petites tablettes avec des idéogrammes pour faciliter la communication * une tablette à alphabet === Apprentis === * Sophie * Margaux * Naïdati ==== David : Horloge à couleur ==== Un objet/horloge qui indique les moments de la journée avec une couleur : *6h - 12h : Jaune *12h - 14h : Vert *14h - 17h : Bleu *17h - 20h : Rouge *20h - 00h : Blanc === Apprentis === * Sammy * Sara {{projets:oeuf_horloge.png?200}} {{projets:horloge_couleur.jpg?200}} {{projets:horloge_couleur_cablage.png?400}} === Besoins === * 1 carte Arduino Uno * 1 module DS3231 * 1 ledstrip type Pololu ou Adafruit avec au moins 16 leds * 1 imprimante 3D * 1 alimentation 5V avec de la connectique à souder === Arduino === // Attention, si besoin de réinitialiser l'heure dans le chip DS3231 il faut impérativement utiliser l'heure d'été pour que le code fonctionne correctement.// ++++ Code Arduino | /* Color Clock E-Fabrik' 2018 - Pop [lab] A clock-like object changes color according to which part of the day it is. ######## WIRING : ######## Plug a DS3231 chip on 5V/GND SDA > A4 SCL > A5 Use DS3231 lib examples to set the time. Warning : Time must be set using summer-time (no daylight saving) for this code to work properly. Ledstrips on 5V/GND DI > pin 8 Simple switch on 5V/GND reading > pin 2 --> HIGH : Summer time, no daylight saving --> LOW : Winter time, daylight saving (-1h) Last update : 24/05/2018 - mh8 */ //libs #include #include #include //constants #define SWITCH 2 #define DATA_PIN 8 //variables DS3231 Clock; bool Century = false; bool h12; bool PM; byte ADay, AHour, AMinute, ASecond, ABits; bool ADy, A12h, Apm; Adafruit_NeoPixel ledstrip = Adafruit_NeoPixel(4, DATA_PIN, NEO_GRB + NEO_KHZ800); uint32_t color = (0, 0, 0); void setup() { //Start I2C interface with DS3231 Wire.begin(); pinMode(SWITCH, INPUT); //Initialize ledstrip ledstrip.begin(); ledstrip.show(); ledstrip.setBrightness(100); //Start serial interface Serial.begin(9600); } void loop() { // Read & show date and time from DS3231 (RTC) Serial.print("Date : "); Serial.print(Clock.getDate(), DEC); Serial.print("/"); Serial.print(Clock.getMonth(Century), DEC); Serial.print("/"); Serial.print("20"); Serial.print(Clock.getYear(), DEC); Serial.print(" - Time : "); Serial.print(Clock.getHour(h12, PM), DEC); Serial.print(':'); Serial.print(Clock.getMinute(), DEC); Serial.print(':'); Serial.print(Clock.getSecond(), DEC); int buttonState = digitalRead(SWITCH); int hour; if (buttonState == 1) { //Summertime > Do nothing to time hour = Clock.getHour(h12, PM); } if (buttonState == 0) { //Wintertime > Remove 1 hour from time read if (Clock.getHour(h12, PM) == 0) { //Exception when midnight hour = 23; } else { hour = Clock.getHour(h12, PM) - 1; } } Serial.print(" - hour var : " ); Serial.print(hour); if (hour >= 6 && hour < 12) { color = ledstrip.Color(255, 255, 0); lightLeds(); } else if (hour >= 12 && hour < 14) { color = ledstrip.Color(0, 255, 0); lightLeds(); } else if (hour >= 14 && hour < 17) { color = ledstrip.Color(0, 0, 255); lightLeds(); } else if (hour >= 17 && hour < 20) { color = ledstrip.Color(255, 0, 0); lightLeds(); } else if (hour >= 20) { color = ledstrip.Color(255, 255, 255); lightLeds(); } else { color = ledstrip.Color(0, 0, 0); lightLeds(); } Serial.print('\n'); } void lightLeds() { for (uint8_t i = 0; i < ledstrip.numPixels(); i++) { ledstrip.setPixelColor(i, color); ledstrip.show(); } } ++++ === Fichiers === *[[http://poplab.maisonpop.fr/ressources/3D/oeuf_OK.123dx|Oeuf, fichier 123 Design]] *[[http://poplab.maisonpop.fr/ressources/3D/oeuf_OK.stl|Oeuf, fichier STL]] *[[http://poplab.maisonpop.fr/ressources/3D/socle.123dx|Socle, fichier 123 Design]] *[[http://poplab.maisonpop.fr/ressources/3D/socle.stl|Socle, fichier STL]]