Skip to content

Commit cd30aa3

Browse files
authored
Update README.md
1 parent d3642fd commit cd30aa3

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ player.submit_dot("feedback_id", BhapticsPosition.VestBack.value,
6565
[{"index": 0, "intensity": 100}], duration_millis=100)
6666
```
6767

68+
## Example: Dot-Based Patterns
69+
70+
```python
71+
from bhaptics import better_haptic_player as player
72+
from bhaptics.better_haptic_player import BhapticsPosition
73+
from time import sleep
74+
75+
player.initialize()
76+
77+
# Play sequential dots on vest front
78+
for i in range(20): # Vest has 20 motors
79+
player.submit_dot("front_dots", BhapticsPosition.VestFront.value,
80+
[{"index": i, "intensity": 100}], 100)
81+
sleep(0.5) # Wait between activations
82+
```
83+
6884
### Submit Path Pattern
6985

7086
Play haptic feedback by specifying exact positions:

0 commit comments

Comments
 (0)