16 lines
424 B
Python
16 lines
424 B
Python
from pishock import SerialAPI
|
|
import time
|
|
|
|
shocker_id = 18281# https://pishock.com/#/control (cogwheel button)
|
|
|
|
api = SerialAPI('/dev/tty.usbserial-120')
|
|
shocker = api.shocker(shocker_id)
|
|
shocker.vibrate(duration=1, intensity=100)
|
|
time.sleep(1)
|
|
shocker.vibrate(duration=1, intensity=50)
|
|
time.sleep(1)
|
|
shocker.vibrate(duration=1, intensity=25)
|
|
time.sleep(1)
|
|
shocker.vibrate(duration=1, intensity=10)
|
|
shocker.beep(duration=5)
|