// ST4-ESP32 Serial Compatible Example // Drop-in replacement for original ArduinoCode.ino // Works with the ASCOM ArduinoST4 driver at 57600 baud // // Original commands: CONNECT# DISCONNECT# RA+# RA-# RA0# DEC+# DEC-# DEC0# // Extended commands: PULSE RA+ 500# POS?# SYNC 12.345 45.678# STATUS?# VERSION?# #include ST4Controller controller; ST4Serial st4Serial; void setup() { controller.begin( ST4_PIN_RA_PLUS, ST4_PIN_RA_MINUS, ST4_PIN_DEC_PLUS, ST4_PIN_DEC_MINUS, ST4_PIN_LED ); // Extended mode adds PULSE, POS?, SYNC, STATUS?, VERSION? // Set to false for strict original protocol compatibility st4Serial.begin(controller, Serial, true); } void loop() { st4Serial.update(); }