Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In this video I used TCP sockets. I have since switched to UDP sockets with no buffering. Results are similarly smooth but servos are more responsive.

I use the following setup:

  • SparkFun ESP32 Thing
  • MG92B servos
  • ESP32 is an access point (creates a wifi network) and a UDP socket server
  • gamepad communicates with the phone over bluetooth
  • phone joins the wifi network and sends data to the UDP socket
  • I need only one-way communication

To get this working I used esp-idf and Kolban's book:

I attach code that I use to test servos:

  • servo-tester.c is the ESP32 program
  • servo-tester-client.py is a Python 2.7 script that I run on my computer
  • ESP32 is an access point and UDP socket server
  • in each message I send 4 bytes (one 32-bit integer)

I use UDP sockets instead of TCP sockets because the latency is smaller. UDP doesn't guarantee that messages will arrive in the order they were sent, or that they will arrive at all, but it's OK for my use case. If you want more reliable (but slower) communication, or two-way communication, you should use TCP sockets.

About

temporary repo for debugging remote WiFi logging for EE192 Spring 2021

Resources

Stars

0 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors

Languages