Sharath
Published © GPL3+

Move-inator

People, especially engineers, are at their desks for many hours. My idea is to help them move out of their chairs and make 'em active.

IntermediateShowcase (no instructions)6 hours461
Move-inator

Things used in this project

Hardware components

Force Sensor - 5.08mm Circle
×1
Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×2
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1

Software apps and online services

Bolt IoT Android App
Bolt IoT Android App

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
To stick the 2 jumper cables together so as to be able to attach the force sensor to the cables

Story

Read more

Schematics

The circuit

Code

Python Code

Python
•The Bolt IoT module returns the sensor value every five minutes only.
•The maximum sitting time can be set by the user depending on their requirements.
•I have assumed that the person is sitting only when he is resting his back on the back-rest. (Sensor is placed there. If the sensor were placed anywhere else, it might get damaged.
import conf
from boltiot import Sms, Bolt
import json, time

mybolt = Bolt(conf.API_KEY, conf.DEVICE_ID)
sms = Sms(conf.SSID, conf.AUTH_TOKEN, conf.TO_NUMBER, conf.FROM_NUMBER)
flag = 0;

while True: 
    response = mybolt.analogRead('A0') 
    data = json.loads(response); 
    print (data['value']);
    try: 
        sensor_value = int(data['value']) #storing sensor value in a variable
        print (sensor_value)
        if sensor_value > 0:
          flag++; # flag value gets incremented every five minutes when the sensor returns a non-zero value.
          if flag>5 
            response = sms.send_sms("You have been sitting for a long time. Time to get up!! ")
          
            
    except Exception as e: 
        print ("Error",e)
    time.sleep(10)

Credits

Sharath

Sharath

1 project • 0 followers

Comments