C#-Library to Interact with ESP-Remote Shockcollars
Go to file
2024-02-15 23:11:56 +01:00
.idea/.idea.CShocker/.idea Initial Commit 2024-01-17 03:25:13 +01:00
CShocker Fix ShockerJsonConverter 2024-02-15 23:11:56 +01:00
TestApp Dependency from Nuget 2024-02-12 02:02:45 +01:00
.gitignore Initial Commit 2024-01-17 03:25:13 +01:00
CShocker.sln Add TestApp 2024-01-20 20:02:12 +01:00
CShocker.sln.DotSettings Use Http-API to get RF-IDs for OpenShockSerial 2024-01-20 21:15:26 +01:00
CShocker.sln.DotSettings.user Rewrite Hierachy that shockers now contain the api they use. 2024-02-01 23:03:28 +01:00
LICENSE License 2024-01-17 03:25:31 +01:00
README.md Update Readme 2024-02-11 22:58:53 +01:00

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