Skip to content

Send OSC values over WiFi based on an analog Arduino input

Notifications You must be signed in to change notification settings

katruud/Arduino-AnalogToOSC-WiFi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino-AnalogToOSC-WiFi

Send OSC values over WiFi based on an analog Arduino input

Developed for an Arduino Nano RP2040 with an adafruit Short Flex Sensor.

Hardware Setup

Create a voltage divider circuit with the flex sensor. In my testing, I used a 44k Ohm resistor. Power can be provided to the circuit from the built-in 5v pin. This guide has a handy wiring diagram, though note that A0 is used as the input in the program.

Set your SSID name and password in the arduino_secrets.h file.

The program will automatically find the high and low range of the sensor by tracking min and max, and sends an OSC float in relation to these limits

You must also set the destination IP variable to match that of your OSC destination.

The delay function may be adjusted to modify update rate. It is currently set to 20 Hz

For testing, the serial print function may be enabled. This will display the sensor values calculated by the program before they are sent over WiFi.

For testing OSC quickly, Protokol is useful.

VRChat Setup

The program is built to send an OSC message to VRChat. A float is sent to the FootLeftFloat parameter. This can be used to drive an animation on your avatar, for example to move toe position realistically.

Shoe Tracking

To do

  • Troubleshoot performance issues related to WiFi?
  • Develop portable power and mounting solution
  • Robustly mount flex sensor to shoe
  • Test other/cheaper SOC such as the Nano 33 IoT

Package Dependencies

References

About

Send OSC values over WiFi based on an analog Arduino input

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published