Arduino sketch for satelite tracking cnc shield

Hi there could some one please direct me to the arduino sketch to control the stepper motors to use with Arduino CNC controller as per this article
many thanks
Peter (G4GRK)

If I understand your question correctly… The one I’m using is a slightly modified version of satnogs-rotator-firmware.
You need to change the rotator_pins.h to match the board you’re using.
For the Uno CNC shield (should also work on the Nano iirc).

#define M1IN1 2
#define M1IN2 5
#define M1SF  7
#define M1FB  A1

#define M2IN1 3
#define M2IN2 6
#define M2SF  11
#define M2FB  A0

#define MOTOR_EN 8

#define SW1 9
#define SW2 10

#define RS485_DIR 13

#define SDA_PIN
#define SCL_PIN
1 Like

Hi Daniel
Thanks for that it helped but still having a problem in trying to get motors to move.
Have attached the responce when trying to move stepper motors.

Many thanks


rotctl Hamlib 4.5.5 Apr 05 11:43:08Z 2023 SHA=6eecd3
Report bugs to

rot_init called
initrots4_easycomm called
rot_register (201)
rot_register (202)
rot_register (204)
set_conf: called
set_conf: token=timeout, val=500
rot_token_lookup called lookup timeout
rot_set_conf called
rot_set_conf: timeout=‘500’
frontrot_set_conf called
set_conf: token=retry, val=0
rot_token_lookup called lookup retry
rot_set_conf called
rot_set_conf: retry=‘0’
frontrot_set_conf called
rot_open called
serial_open: COM5
serial_setup: tcgetattr
serial_setup: cfsetispeed=9600,0x000d
serial_setup: cfsetospeed=9600,0x000d
serial_setup: data_bits=8
serial_setup: parity=0
serial_setup: Handshake=None
serial_setup: tcsetattr TCSANOW
read_string_generic called, rxmax=4095 direct=1, expected_len=1
Opened rot model 202, ‘EasycommII’
Backend version: 20191206.0, Status: Stable

Rotator command: P145
Azimuth: Elevation: 45
rot_set_position called az=145.00 el=45.00
rot_set_position: south_zero=0
easycomm_rot_set_position called: 145.000000 45.000000
easycomm_transaction called: AZ145.0 EL45.0

rig_flush: called for serial device
read_string_generic called, rxmax=4095 direct=1, expected_len=1
write_block(): TX 15 bytes, method=2
0000 41 5a 31 34 35 2e 30 20 45 4c 34 35 2e 30 0a AZ145.0 EL45.0.

Rotator command:

I haven’t tried it so much against hamlib, it might give up if commands are sent during the homing, in the satnogs version it is blocking while that task is completing.

For the GS232 and Easycomm it’s quite a simple task to issue the commands directly to the controller via some terminal. I use putty in win and minicom in linux. Make sure to set the correct baud, 19200 default for Easycomm.

This Easycomm implementation accepts separate az/el commands or combined.
AZ45 or EL45 moves the axes separately, and can be commanded while the other is moving.
AZ45 EL45 sets both at the same time.
Query the position with AZ EL and immediate stop with SA SE.
GS gives status, GE for error register.