Satnogs CNC shield

I am having problems verifying the sketch on Arduino mega. It saying no such file globals.h file. I am struggling to install the libaries on the apple mac. I have no problem installing zip libaries. Any suggestions would be welcomed
Thank you

Peter (G4GRK)

I seldom use the original Arduino IDE these days, but I noticed the same problem.
Copying those files from the libraries folder to the stepper_motor_controller and remove the ../ from all the include lines on row ~40-50 is one way.

I recently added a platformio.ini to my repo as this simplifies the build a lot imho. The point being that it is much more reproducible than the Arduino environment, ofc a bit more to get used to if new to VSCode and PlatformIO.

1 Like

Hi there
I am trying to compile the sketch to a mega board but get the error message (no “setup” or “void”).
As far as I know all Arduino sketches require a Void setup and a Void loop for them to run.
Would apprciate your thoughts on this.

many thanks
Peter (G4GRK)

Hi Peter,
what is “the sketch” in this case ? I do use the Arduino IDE every now and then, I know that at least the type of board set should be the right one, can you share some error message output, preferred no screenshot from telephone :wink:

Ben _ PE2BZ

Hi Ben
the error is below and the sketch is the one on the front page cnc control
thank you for replying.

Pete
/Users/peter/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/main.cpp:43: undefined reference to `setup’

/Users/peter/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/main.cpp:46: undefined reference to `loop’

collect2: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

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

Peter(G4GRK)

rotctl Hamlib 4.5.5 Apr 05 11:43:08Z 2023 SHA=6eecd3
Report bugs to hamlib-developer@lists.sourceforge.net

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
tcflush
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
tcflush
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.

Hi just need a bit of advice sent this comand to arduino +cnc shield but motor dose not move.
is this the correct responce
many thanks
Peter(G4GRK)rotctl, Hamlib 3.2
Report bugs to hamlib-developer@lists.sourceforge.net

rot_init called
initrots3_easycomm called
rot_register (201)
rot_register (202)
rot_register (204)
rot_open called
serial_open called
serial_setup called
Opened rot model 202, ‘EasycommII’
rig_strstatus called
Backend version: 0.4, Status: Beta

Rotator command: P145
Azimuth: Elevation: 34
rot_set_position called
easycomm_rot_set_position called: 145.000000 34.000000
easycomm_transaction called: AZ145.0 EL34.0 UP000 XXX DN000 XXX

serial_flush called
write_block called
write_block(): TX 35 bytes
0000 41 5a 31 34 35 2e 30 20 45 4c 33 34 2e 30 20 55 AZ145.0 EL34.0 U
0010 50 30 30 30 20 58 58 58 20 44 4e 30 30 30 20 58 P000 XXX DN000 X
0020 58 58 0a XX.

Rotator command:

Hi again, please keep the same subject in one thread (:

Good morning all
Looking for some help with arduino + cnc build.
Have built all the engineering bits and loaded software.
On start up its goes through homing sequence and sets both az and el.
When I send rotcl command the pc displays the position sent but the stepper motors do not move.
The fact that it performs homing sequence with no problem makes me think the hardware is working correctly.
Any suggestions ?

Many thanks

Peter (G4GRK)

I have been building one lately and it works fine. what is your command line for the rotctld ?
Have you tried running it directly to a serial terminal?

Good morning all just one question.
Have built the Ardunio cnc project homing sequnce works fine and can mamualy enter AZ & El using ROTCTL with no problems.
When I use ROTCTLD and press engae on Gpredict it shows ERROR in READ box and then Hamlib disconnects.
My question is the project has no postion device included in the project so dose Hamlib/Gpredict require a response from the arduino on its postion and if so where dose it come from

many thanks

Peter(g4grk)

7 different threads on the same topic, why ?

@g4grkiow I’ve merged all the related topics into one to be more easier for someone with similar questions to follow the discussion.