runjeet
Published

Ticcer

Ticcer is a device to help users deal with their Tourette Syndrome or generalized tic disorder.

IntermediateFull instructions provided159
Ticcer

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Battery pack with barrel plug (can be 9v or AA)
×1
Resistor 330 ohm
Resistor 330 ohm
×2
Male/Male Jumper Wires
×9
HC-06 Bluetooth Module
×1
SparkFun 2.2 in flex sensor SEN-10264 or equivalent flex sensor
×1

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Schematics

Wiring the Flex Sensor

Wiring the Bluetooth Module

Code

Code

Arduino
int flexPin = A0; 
int threshhold = 0;
int value = 0;
int values[] = {0, 0, 0, 0, 0, 0};


void setup() {
  Serial.begin(9600);
  pinMode(flexPin, INPUT);
}

void loop() {
  // Read resistance from flexPin and
  // assign to increment to array
  for(int i = 0; i <= 5; i++){
    for(int k = 0; k <= 9; k++){
      value = analogRead(flexPin);
      if(value >= threshhold){
        values[i] += 1;
      }
      // delay one minute
      delay(60000);
    }         
  }
  // take average number of tics for the hour
  value = 0;
  for(int count = 0; count <= 5; count++){
    value += values[count]; 
    value / 6; 
  }
  // send average to smartphone  
  Serial.print(value);
}

Credits

runjeet
1 project • 0 followers

Comments