/Protocol

Elastic Spaces 2020

Primary LanguagePython

Haptic Wrist Band

Collab: Elastic Spaces
Fall 2020
Parsons School of Design x UC Boulder

Assignment: Protocol


Schematic

Schematic for Haptic Wrist Band


Source Files

Protocol for sending data

*<intensity>@<frameDelay>$<frames>#<frameData>*

  • intensity - Intensity on which you haptic motor vibrates. Value ranges from 1-254.
  • frameDelay - Delay in milliseconds betwen two frames.
  • frames - Number of frames you are sending as animation. Maximum number of frames will be capped at 100 frames in single payload.
  • frameData - Sequential frame data.

Let us assume Mx represents a Haptic Motor at position x, then each frame would look like M0, M1, M2,...,M17 where Mx can assume a binary value of 0 or 1

Setting credentials in your local environment

# Run the following python commands
os.environ['telegram_bot_api_token'] = '<YOUR-TELEGRAM-BOT-TOKEN>'
os.environ['ParallelDots'] = '<YOUR-PARALLELDOTS-API-KEY>'

Running the script

python3 protocol.py

In a new terminal window/tab, run the following command

python3 connector.py <ARDUINO NANO's COM PORT>

<!-- Say I am using COM4, the above command formulates to -->
python3 connector.py COM4

TIP: You can find the COM Port by using Arduino IDE

Team