|This project provides some of the most wanted enhancements for Celestron Telescope mounts: a GPS receiver, a WiFi adapter, a BlueTooth interface, and a Serial Bridge over USB. All in one, easy to wire circuit. This project is being discussed in a thread at the Cloudy-Nights site.|
WiFi works anywhere that a Celestron WiFi device would work. Bluetooth has been proven to work with CPWI's "hand controller" interface. And the GPS (optional) works with everything as well.
To build this project with the Arduino IDE, one must first also install ESP32 support into it from GitHub, following these instructions.
The Arduino "sketch" (aka. "program") that runs the entire project is available here: esp32_wifi.ino (always the latest version).
To begin, click on the first photo below.
You may prefer the simpler HomeBrew GPS project.
The Arduino WiFi code now implements both the default SoftAP mode (aka. "Direct Connect"), as well as Client mode (aka. "Use Access Point") which can be configured from the SkyPortal app. At this point, we are beyond "feature parity" with the Celestron WiFi units. Yay!
ESP32 Pin D5 has been designated as the "mode switch" pin: it defaults to SoftAP mode, but if that pin is pulled LOW (using either a jumper or a switch), it will attempt Client mode, same as the Celestron dongles do.
As an alternative to wiring up a "mode switch", one can instead telnet to port 3000 over WiFi, and select the desired WiFi mode using the "wifi.mode" variable. Eg. "set wifi.mode 0" will force SoftAP mode, and "set wifi.mode 1" will attempt Client mode (falls back to SoftAP if parameters are messed up). Anything other than 0/1 there will rely instead on the state of Pin D5.
This same interface can also be used to change the SoftAP SSID name, as well as to set a WiFi passkey on the SoftAP. These settings, like all others, are persistent across resets and power-cycles! The "get all" command will show all of the current settings from the telnet interface (just like with the Celestron units).
There is not a lot of validation done on the settings, so if they get messed up then one can pull ESP32 Pin D18 LOW at WiFi "on" time, to restore "factory defaults". One could hook up a switch to this pin as well, if desired.