Giter VIP home page Giter VIP logo

tens4osc's Introduction

TENS4OSC

DIY Controllable TENS Stimulator for VRChat Avatars via OSC

CAUTION

I am not responsible for if you suffer serious side effects or harm, Your an adult if you are even thinking about using TENS/EMS for activities please read the warnines with the device and do not put the electrides near your heart or sensitive skin. Do not keep the device attached to a PC when active and its suggested that you use a battery to prevent the possibliity of being connected to your AC ground. If you must use a USB isolator.

Use Case

  • ERP
  • .... I don't know

Hardware

  • ESP32
  • 2 Relays
  • AVCOO TENS Stimulator kit from Amazon

IMG_0172 IMG_0171

  • Not Shown, Relays break output + channels. If possible use 2 relays for both positive and nagative
#define DEFAULT_OFF // Device is off by default

// Remove unused buttons to remove the feature
#define POWER_BUTTON 19 // Power Button
#define UP_BUTTON 18    // Intensity Up (REQUIRED)
#define DOWN_BUTTON 5   // Intensity Down (REQUIRED)
#define TIME_BUTTON 14  // Time Setting
#define PUP_BUTTON 12   // Preset Up
#define PDOWN_BUTTON 27 // Preset Down

#define M_PRESS_TIME_FOR_C 8 // Number of presses to enter continuous timer

#define BUTTON_DEBOUNCE_PRESS 45 // Your devices button minimum to press buttonin ms for its debouncer
#define BUTTON_DEBOUNCE_DELAY 50 // Your devices button minimum wait time in ms for its debouncer

// Stop / Disconnect Relays
#define CHANNEL_A_RELAY 16
#define CHANNEL_B_RELAY 17

// Relays On Off State (some relays are active on low or high)
#define RELAY_ON_STATE HIGH
#define RELAY_OFF_STATE LOW

// Max Intensivty Level supported by your device
#define MAX_INTENSITY 30

// WiFi Connection
const char * ssid = "Radio Noise AX";
const char * password = "Radio Noise AX";

Known Issues

  • If you swing your from values to quickly there is tendicy for it to get out of sync (Low then expected thankfully)

Implimentation

  • Use VRCOSC to route the output from VRChat to your devices IP Address @ Port 9001
  • Add the 4 Parameters
    • TENSLevel (INT)
    • TENSActive (BOOL)
    • TENSESTOP (BOOL)
    • KACommand (INT) (Not Required)

Animate the TENSLevel to set the intensity, Animate the TENSActive Bool to turn the output on or off (if your jumping to higher levels or need sudden output

Use TENSESTOP as a Menu Toggle to Toggle Master Output, Add KACommand Buttons to your meun to send commands like bellow

  • 51: Preset Up
  • 50: Preset Down
  • 54: Resync Intensity

tens4osc's People

Contributors

uiharukazari2008 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.