- Floating IP Address (related to local network):
10.100.xx.xx
/api/uptime
: Get system/glove server uptime.GET
/api/events
: Get sent/unfinished vibration events.GET
/api/events
+ Json format parameters (see examples): Create a vibration event/pattern.POST
mode
: Which haptic pattern to run.- Type:
int
0
: Real-time trigger (default)1
: Heartbeat around whole hand/all motors2
: Random raining/iteration around whole hand/all motors3
: Spreading vibration on fingertips4
: Spreading vibration on palmar area5
: ON/OFF vibration on single point/motor at random intensity and duration
- Type:
gpio
(table): Which pin(s)/motor(s) to trigger.- Type:
int
(original size)
- Type:
intensity
: How strong is the vibration.- Type:
int
0
~60
: OFF mode250
: max. ON mode
- Type:
duration
: How fast/many milliseconds will this haptic pattern run.- Type:
int
- Type:
round
: How many rounds will this haptic pattern run.- Type:
int
- Type:
time
: Works as a placeholder (not functioning).- Type:
long
- Type:
- Check if the glove server is turned on by getting its uptime information:
- Request:
- HTTPie command:
# shell http GET http://10.100.xx.xx/api/uptime
- Browsers: http://10.100.xx.xx/api/uptime
- Response (Json):
{ "uptime": "753" }
- Request:
- Create a call to turn ON/OFF a motor at pin number 27 with a specific intensity (e.g. level 150):
-
Request:
- HTTPie command:
# shell # turn ON http POST http://10.100.xx.xx/api/events time=999999 mode=0 gpio=27 intensity=150 # turn OFF http POST http://10.100.xx.xx/api/events time=999999 mode=0 gpio=27 intensity=0
- Postman:
POST
{ "time": "999999", "mode": "0", "gpio": "27", "intensity": "150" // turn ON }
-
Response (Json):
{ "id": "0", "time": "999999", "mode": "0", "gpio": "27", "intensity": "150", "duration": "0", "round": "0" }
-
- Check if there is any sent/unfinished vibration event:
- Request:
- HTTPie command:
# shell http GET http://10.100.xx.xx/api/events
- Browsers: http://10.100.xx.xx/api/events
- Response (Json):
{ "id": "0", "time": "999999", "mode": "0", "gpio": "27", "intensity": "150", "duration": "0", "round": "0" }
- Request:
- Create a call to run a preset haptic pattern with specific parameters:
-
Request:
- HTTPie command:
# shell # mode 1: run the heartbeat pattern through whole hand/all motors at the 120 ms duration/period for 10 rounds http POST http://10.100.xx.xx/api/events time=999999 mode=1 intensity=150 duration=120 round=10
- Postman:
POST
{ "time": "999999", "mode": "1", // Heartbeat "intensity": "150", "duration": "120", "round": "10" }
-
Response (Json):
{ "id": "1", "time": "999999", "mode": "1", "gpio": "27", // from previous request call "intensity": "150", "duration": "120", "round": "10" }
-