SatNOGS rotator with CNC Shield and ESP8266

Hi everyone,
I am using a CNC Shield which works pretty well on an Arduino UNO.
I am now trying to port the code on an ESP8266 (Wemos D1 Mini Pro) to be abble to control my rotator via Wifi.
Here is the roator_pins declaration:

#define M1IN1 D6 ///< Motor 1 PWM pin
#define M1IN2 D2  ///< Motor 1 PWM pin

#define M2IN1 D5 ///< Motor 2 PWM pin
#define M2IN2 D1  ///< Motor 2 PWM pin

#define MOTOR_EN D7 ///< Digital output, to enable the motors

#define SW1 D3 ///< Digital input, to read the status of end-stop for motor 1
#define SW2 D4 ///< Digital input, to read the status of end-stop for motor 2

But I constantly get a wdt reset on the serial monitor:

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9

Just to ensure there is no input/output issue, I have tried to add this in Setup() but with it still fails:

    pinMode(M1IN1, OUTPUT);
    pinMode(M1IN2, OUTPUT);
    pinMode(M2IN1, OUTPUT);
    pinMode(M2IN2, OUTPUT);
    pinMode(MOTOR_EN, OUTPUT);
    pinMode(SW1, INPUT_PULLUP);
    pinMode(SW2, INPUT_PULLUP);

Any idea of what is going wrong?

wdt is watchdog, needs to be fed periodically so it doesn’t run out and reset the cpu.
if the code has a lot of sleep and blocking calls it can be good to increase the time it takes.
just feed it at least once in loop(), for 8266 I think it is ESP.wdtFeed();

A Similar project to yours and they give you the code if you ask. I have one up and running right now in WiFi sitting out in the snow… It’s been running for 8 months at temps down to -30C

Thank you for the information, I’ll dig into that.

@ve6kdx I know this project but I won’t change my hardware (the rotator is up and running with the serial port) just for adding a Wifi connection :wink:

Any chance you supply a link and/or a name of your CNC Shield.
I am very interested.

Hi Steeve,
Sure, this is a CNC Shield V3 that you can purchase everywhere for less than $15.
Mine is fitted with two DRV8825 drivers.
Everything you need to know is described here:

SatNOGS Arduino Uno/CNC Shield Based Rotator Controller - SatNOGS Wiki


I think we went different routes in that i installed the RPi3 with a NooelecSmart SDR outside with the Rotor and used the Wifi from the RPi3 to communicate with my Router and the Satnogs Network. I liked the idea of having very little loss between the Antenna and the SDR.

Good luck with your Project.


Hi JB,
Thanks for quick response, that’s the shield and drivers that I am using, works great.
Silly me misread your first post, thought it said you had a shield for the ESP8266.
Sorry about that.

No worry Steeve.
I am using an Arduino Proto Shield to plug the CNC Shield on an Wemos D1 mini Pro.
With some minor changes in the source code, it works like a charm with en ESP8266.