top of page

Operating Instructions/Code

//CIJE Project

//SOLEFUL

#include <SoftwareSerial.h>

SoftwareSerial BTserial(2, 3); 

 int flex = A0;

int flexval=0;

int step=0; 

int stepcount= 0;

int sensorPin = A0;

 

int sensorValue = 0;

void setup(){

 

  BTserial.begin(9600); }

     

void loop(){

  flexval = analogRead(flex);          

  delay(300); 

  Serial.print(flexval);             

  if(flexval<=350)

  {

    stepcount=( step++);

  }

   else 

   {

    stepcount=(step);

  }

    

 Serial.print("step");

 Serial.println( stepcount);                 

 

sensorValue = analogRead(flex);

 

BTserial.print("1234");

 

BTserial.print(",");

 

BTserial.print("1234.0");

 

BTserial.print(",");

 

BTserial.print("1234 hPa");

 

BTserial.print(",");

 

BTserial.print("500 ml/s");

 

BTserial.print(",");

 

BTserial.print(flexval);

 

BTserial.print(";");

delay(20);

 

}

1) Insert the sole into the heel of your shoe

2) Pair the Bluetooth sensor to your phone

3) When you walk the force placed on the sole will trigger the Arduino to add a step onto the device/app

bottom of page