Skip to content

temporary repo for debugging remote WiFi logging for EE192 Spring 2021

Notifications You must be signed in to change notification settings

ucb-ee192/Huzzah32WiFi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published