Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.62 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.62 KB

Library to interact with Shock-Collars that are remotely controllable via ESP32-Boards.

GitHub License NuGet Version

Usage

public static void Main(string[] args){
    string apiKey = ":)";
    
    OpenShockHttp openShockHttp = new (apiKey);
    OpenShockShocker shocker1 = openShockHttp.GetShockers().First();
    shocker1.Control(ControlAction.Vibrate, 20, 1000);
    
    shocker1.Dispose();
    
    List<SerialPortInfo> serialPorts = SerialHelper.GetSerialPorts();
    int selectedPort = 1;
    OpenShockSerial openShockSerial = new(serialPorts[selectedPort], apiKey);
    OpenShockShocker shocker2 = openShockSerial.GetShockers().First();
    shocker2.Control(ControlAction.Vibrate, 20, 1000);
    
    shocker2.Dispose();
}

Shocker.Control

Control(ControlAction action, int intensity, int duration)

ControlAction

From here

Variables

ApiKey

  • For OpenShock (HTTP) get token here

Intensity Range

in percent

0-100

Duration Range

in ms

  • 0-30000 OpenShock
  • 0-15000 PiShock

Future

Username (PiShockHttp only)

For PiShock (HTTP) get information here

Sharecode (PiShockHttp only)

For PiShock (HTTP) get information here