Swipe-Force Keyboard in Mini-Text

Think about if we have a tiny device (even smaller than apple watch), how could we achieve the funcion of typing the keyboard?

Image credit: Mini-Text Demo

Overview

  1. I achieved the interaction between the pressure button and path generation.
  2. I implemented the core algorithm part of Dynamic Time Wrapping to suggest the words based on the simulated path list and real path list.
  3. Due to the data analysis, we have to send the data from the iphone to the computer, I achieved this by WebSocket in the Javascript.

Technical Parts

The tiny device interaction

First we have to let the iphone access the files stored from the computer. This is easily achieved by the setting up a file server by python -m http.server -port, and we access the computer’s ip address + port to access the files.

The Dynamic Time Wrapping Algorithm

Here I have two arrays. We simulated the paths of the alphabetical words in the json file, and have another real sampling paths, we used the DTW algorithm which could get the minimum cost of the paths, and thus we can get the most similar one.

Send the data back to the computer

Here I used the Websocket in the javascript, we have to create a host with the new port waiting for the data receiving in this port. And when we finished the test work, just use the websocket to send back the data of what we need to this new port.

Please check the demo video to see how it works!

License

Copyright 2019-present Dengpan Yuan.

Avatar
Dengpan Yuan
Columbia@MSCS

I’m a MSCS student at Columbia University@SEAS.