antoineJean Noëlabaument
Published © CC BY-SA

Autiplanner

The first project, called 'AutiPlanner, ' aims to assist young adults with autism in their journey towards independence and autonomy

IntermediateWork in progress20 hours129
Autiplanner

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Arduino button
Just random button
×8
Grove – Chainable RGB Led V2.0
Seeed Studio Grove – Chainable RGB Led V2.0
×8
Grove - MP3 v2.0
Seeed Studio Grove - MP3 v2.0
×1
bluetooth HP AEG Sound System
×1
PP Ultimaker Naturel - 2.85mm
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver
3D Printer (generic)
3D Printer (generic)
Plier, Long Nose
Plier, Long Nose

Story

Read more

Custom parts and enclosures

Button STL

AI files for the laser cutting

AI files for the laser cutting

box parts dimensions

Schematics

Circuit Diagram

Arduino IO mapping

Code

arduino sketch.ino

Arduino
#include <ChainableLED.h>
#include <KT403A_Player.h>
#include <SoftwareSerial.h>

#define NUM_LEDS 8

int buttonPins[] = {1, 3, 4, 5, 6, 8, 9, 10};

ChainableLED leds(2, 7, NUM_LEDS);
KT403A<SoftwareSerial> Mp3Player;
SoftwareSerial SSerial(11, 12); // RX, TX
#define COMSerial SSerial

// Variables pour le suivi de l'tat du bouton
int etatBouton;
int etatBoutonPrec[NUM_LEDS];
bool boutonAppuye = false;
int ledActive = 0;

void setup() {
  leds.init();

  for (int i = 0; i < NUM_LEDS; i++) {
    pinMode(buttonPins[i], INPUT_PULLUP);
    etatBoutonPrec[i] = HIGH;
  }

  leds.setColorRGB(0, 0, 255, 0);

  COMSerial.begin(9600);
  while (!COMSerial);
  Mp3Player.init(COMSerial);
  Mp3Player.volume(25); // Set the volume, maximum 30.
}

void loop() {
   // Lecture de l'tat du bouton de la LED active
  etatBouton = digitalRead(buttonPins[ledActive]);

  // Vrifier si le bouton a t enfonc (dtecteur de front montant)
  if (etatBouton == LOW && etatBoutonPrec[ledActive] == HIGH) {
    // teindre la LED active actuelle
    leds.setColorRGB(ledActive, 0, 0, 0);

    // Passer  la LED suivante
    ledActive++;
    if(ledActive > NUM_LEDS ){
      leds.setColorRGB(ledActive, 0, 0, 0);
    }

    // Allumer la nouvelle LED active
    leds.setColorRGB(ledActive, 0, 255, 0);

    // Jouer la musique
    Mp3Player.playSongIndex(1); // Lance la lecture du mp3
  }

  // Mettre  jour l'tat prcdent du bouton

    // Dsactiver les autres boutons
  for (int i = 0; i < NUM_LEDS; i++) {
  if (i != ledActive) {
    pinMode(buttonPins[i], INPUT_PULLUP);
  }
}

  delay(100);
}

Credits

antoine
1 project • 0 followers
Contact
Jean Noël
13 projects • 36 followers
pedagogical director at L'école LDLC https://www.linkedin.com/in/jnlootsidebox/
Contact
abaument
1 project • 1 follower
Contact

Comments

Please log in or sign up to comment.