Skip to content

Arduino portion of the ProximityBand wearable device project

Notifications You must be signed in to change notification settings

vacer25/ProximityBand-Arduino

Repository files navigation

ProximityBand-Arduino

Usage:

Setting the LEDs brightness:
While the device is disconnected, press and hold the button.
All three LEDs will light up, set the switch to position 1-2-3.
Position 1: Min LED brightness.
Position 2: Medium LED brightness.
Position 3: Max LED brightness.
Let go of the button and the change is saved to memory.
The brightness is retained even after the device is turned off.

Setting silent / vibrate / sound mode:
While the device is connected, set the switch to position 1-2-3.
Position 1: Silent mode.
Position 2: Vibrate mode.
Position 3: Sound mode.

Setting do-not-disturb mode:
While the device is connected, press and hold the button.
Set the switch to position 1 to turn on DnD mode.
Set the switch to position 2 or 3 to turn off DnD mode.
Let go of the button.

Turning off the alarm:
In any case while the alarm is turned on, simply press the button.
This will stop the vibration and light flashing on the Proximity Band as well as the Android device (if it is still connected).

TODO:

  1. Make the LEDs flash in unison or some other pattern instead of on their own induvidual timers.
  2. Make the motor pulse in some preset pattern.
  3. Make the LEDs fade in and out.

Technical details:

Determining if the Bluetooth connection is active:
If any data via BLE is recieved, a timer is set for 1 second.
If no other data is recieved after the timer is done, this means that the connection is not active.
In this case the alarm will be acivated.

Connection to Bluetooth module using pins:
RX (Arduino) 	= 	D11
TX (Arduino) 	= 	D12
CST (Arduino) 	= 	D2

Getting data from Bluetooth UART:
Red LED On Command         		=	'R'
Green LED On Command       		=	'G'
Blue LED On Command        		=	'B'
Red LED Off Command        		=	'r'
Green LED Off Command      		=	'g'
Blue LED Off Command       		=	'b'

Red LED Flash On Command    	        =       'I'
Green LED Flash On Command  	        =       'J'
Blue LED Flash On Command   	        =       'K'
Red LED Flash Off Command   	        =       'i'
Green LED Flash Off Command 	        =       'j'
Blue LED Flash Off Command  	        =       'k'

Motor Short Command      	 	=	'1'
Motor Medium Command     	 	=	'2'
Motor Long Command       	 	=	'3'

Alarm On Command           	 	=	'X'
Alarm Off Command           	        =    	'x'
Alarm Supress Command                   =	'Y'

Acknowledged Command                    =	'A'

Sending data to Android using Bluetooth UART:
Switch Position 1 Command  		=	"S1"
Switch Position 2 Command  		=	"S2"
Switch Position 3 Command  		=	"S3"

Button Pressed Command    		=	"B1"
Button Unpressed Command  		=	"B0"

About

Arduino portion of the ProximityBand wearable device project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages