What is this?

Projects

  • examples/button.rs
    • Button input example
  • examples/button_led.rs
    • Serial LED example
  • examples/connect_wifi.rs
    • Wifi connect example
  • examples/osc_send.rs
    • OSC send example
  • examples/main.rs
    • OSC receive and led control

Before running wifi related projects, export wifi credentials and port no.

export OSC_WIFI_SSID=LAB3
export OSC_WIFI_PASS=aabbccddeeff
export OSC_WIFI_RECV_PORT_STR=5000
export OSC_WIFI_RECV_PONG_STR=5001

# osc send port
export OSC_WIFI_SEND_PORT_STR=5100
# osc destination (PC) port
export OSC_WIFI_DEST_PORT_STR=5101
export OSC_WIFI_DEST_IP=192.168.2.100

Commands

source ~/export-esp.sh  # if needed
cargo run               # build & flash & monitor
cargo build --example button
cargo run --example connect_wifi
espmonitor /dev/ttyACM0

Crate

Samples

OSC test with OSCD

  • Commandline OSC tester. You can also use other tools like TouchDesigner.
  • With another terminal, run oscd to send OSC packet (IP should be your device's IP and PORT should be OSC_WIFI_RECV_PORT)
cargo install oscd
oscd

Following OSC commands are available

/ping       # reply /pong 1 to your_ip:OSC_WIFI_PONG_PORT from your device
/rgb r g b  # set color to LED (int 0-255 are available for r, g, b)