missing library: globals.h

Hi All,

Trying to verify code for Satnogs rotator controller ready to upload to Arduino micro pro.

The code info for stepper_motor_controller:

  • This is the documentation for satnogs rotator controller firmware
  • for stepper motors configuration. The board (PCB) is placed in
  • satnogs-rotator-controller and is for releases:

Error tells me I am missing the library globals.h and I have since found it here:
https://github.com/dacarley/Arduino/blob/master/ReadingClock/Globals.h

Question:
How do add this library to arduino v1.8.9?

i only know how to manage libraries using Tools>Manage Libraries.

Not sure if I can copy globals.h directly to libraries folder or if I need to add link to Manager so it can find globals.h to install.

Cheers and Merry Christmas
Yabby

In your sketchbook folder you will find a folder named libraries
Create a folder in that libraries folder with exactly the same name (case matters) as the .h file
Copy the .h file and any associated files into the newly created folder
The file will now be available using

#include <globals.h>

However, I would be very suspicious as to whether it is the correct .h file as it has such a generic name and I note that you have referred to it as both globals.h and Globals.h which implies that two different files are being referred to.

Thanks UKheliBob,

I'll give it a try and if it doesn't work I go to the Satnogs forum for help. Either way I'll post my results.

Cheers
Ivan

An alternative is to put the .h and associated files in the same folder as the sketch then use
#include "globals.h"but the file will then only be available to that one sketch

yabby:
Error tells me I am missing the library globals.h and I have since found it here:
Arduino/Globals.h at master · dacarley/Arduino · GitHub

No, that's most certainly not it. You can't just go grab some random file from some random clock project and expect it to work just because it has the same generic filename. Worse, it's not even the same file name. Global.h and global.h are not the same thing!

The global.h file is right there in the satnogs-rotator-firmware project:

There are detailed instructions in the readme. If you follow them exactly, you should have no problems:

yabby:
How do add this library to arduino v1.8.9?

i only know how to manage libraries using Tools>Manage Libraries.

Not sure if I can copy globals.h directly to libraries folder or if I need to add link to Manager so it can find globals.h to install.

Just follow the instructions and no library installation is needed. Unfortunately, the authors of this sketch created a folder structure that is not supported by the Arduino IDE. They are using that Arduino-Makefile thing, which apparently does support it. It's too bad they didn't make the tiny bit of extra effort it would have taken to provide a more user friendly option for flashing the firmware to the controller, but they did write some very nice documentation so it should be easy enough.

So give it a try and if you run into any problems come back here with a detailed description of what is happening and we'll help you out.

Thanks for setting me straight.

I found the libraries just where you said and I appreciate the help.

Cheers
Ivan

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per