Giter VIP home page Giter VIP logo

rkaczorek / astroberry-diy Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 16.0 169 KB

Astroberry-DIY provides INDI drivers for Raspberry Pi devices such us Astroberry Focuser - stepper motor driver, Astroberry Board - power switch board for up to 4 devices, Astroberry System - operating system status.

License: GNU General Public License v3.0

CMake 23.43% C++ 76.57%
astroberry astronomy focuser indi-driver indi-server raspberry-pi relay

astroberry-diy's People

Contributors

helgemk avatar patrick-81 avatar rkaczorek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

astroberry-diy's Issues

Disable Standby mode

Hi,
Is it possible to disable the automatic standby mode, to prevent the focuser from slipping?
Thanks a lot for the great job!

Astrobery Relays On/Off seem to be the opposite

I've just configured the Astroberry Relays for the ASIAir Pro DC Hub and the On/Off toggle switches seem to be opposite to what it is. i.e. On switches off the port, Off switches on the port.

Screen Shot 2021-02-09 at 20 31 49

Screen Shot 2021-02-09 at 20 32 02

For now I switched the following and recompiled and it seems to reflect correctly that Off is now switching off the DC port, and On is switching on the DC port :-

gpiod_line_set_value(gpio_relayX, 1);
gpiod_line_set_value(gpio_relayX, 0);

Access for compiling and installing Astroberry_focuser driver on RPi4

Hi,
I would like to use the astroberry_focuser driver with A4988 motor driver on my RPi4, which I already use with kstars/ekos to drive my telescope and cameras. The RPi4 has Ubuntu 20.04 OS.
I tried to follow the instructions in the readme file to compile your driver but I had to register to Gihub to access to astroberry-dyi through <git clone https://github.com/rkaczorek/astroberry-diy.git> (it asks username and password) and once this done, the access was still not permitted because it has new dongle access.
I am a real beginner in using github software and installing it on my RPi4.

How can I add the astroberry_focuser driver running on Ubuntu 20.04 to my indi library ?
Thanks for the support,
Best regards,
Pierre Cevey

Configuration saving issue for joystick parameters

If I set some parameters in Astroberry Focuser in INDI Control Panel like the Resolution to 1/32 step then in Options panel I hit Configuration > Save, the next time I start this profile I get the settings I’ve saved.
If for the same profile I set Joystick > Enable and set custom buttons bindings in Joystick panel then I hit Configuration > Save the Joystick related settings are losed so I have to manually set it when I start KStars.
button3_mapping

If I make the same procedure using Focuser Simulator instead of Astroberry Focuser, the Joystick settings are saved.

Change initial value of minimal value of FocusMaxPosN

I am using Astroberry Focuser as a helicoidal focuser for my camera lens.
Max travel of the helicoid is only 117mm and I want to specify 390step for max. position.
The minimum value of max. position is 1000 steps, so I can't set 390.
Therefore I would like to change the position from 1000 steps to 100 steps.

The configuration of the lens and stepper motor is as shown in the attached image.
IMG_3713

The stepper motor has 200 steps per revolution and the gears have 60mm per revolution.
The helicoid travel distance of the lens is 117mm, so the max. position is 390step.

To be honest, I have already changed the default value to 100 in my local environment, is it possible to change the original source code as well?

Help : usage of astroberry-diy with Ubuntu 20.04

Hi,
I need help for astroberry-diy please.
I am using KStars/ekos on my Raspberry PI4, running with Ubuntu 20.04 without problem (connected to telescope, mount, camera, guiding camera).
I tried to install astroberry-diy (V2.9), mainly for astroberry-focuser, using your instructions. After connecting all pins to a step motor driver (Big Easy Driver from Sparkfun, with A4988 IC), it is visible on Indi control panel, with 3 tabs (Otions, Main control, General Infos), but I get an error at connexion : Problem initiating Astroberry Focuser.
I am not a computer specialist, therefore I send you print screens of the compilation and installation process for diagnostic : can you tell me if I can compile and use astroberry-diy with Ubuntu 20.04 and if there are special configuration to accomplish to have it work?
Thanks a lot!
astroberry_diy_compil_term_printscreen.odt

support nanopi-m4

hello.

I would like to use to run your indi driver on my nanopi-m4.
There is a library wriringpi that works pretty well.
Unfortunately I have no gpio accessible via wiring pi on the pins 29, 31, 33 and 35 (the pins of the part relay)

On the other hand I have pins 8, 10, 12, 22 and 26 which are accessible (with numbers 15, 16, 1, 6 and 11 on wiring pi).

Request: Support Wireless connection with Stepper moter

Hello.
Astroberry Focuser is great tool for me. It has been an indispensable tool for my astronomical observations.

Now, I have a request for Astroberry Focuser.
Could you possible to make the connection to the motor wireless ?
Perhaps this can be achieved by supporting remote GPIO. Remote GPIO can be supported by pigpio.

For example, you can install a Stepper motor and handler HAT in a Raspberry PI Zero W, and install an Astroberry Focuser Driver rewritten in pigpio in a Raspberry PI 4.
The Raspberry PI Zero W should be connected to the Raspberry PI 4 via Wi-Fi or Bluetooth PAN.
Controlling the focusing module with Ekos on Raspberry PI 4 would allow the Stepper motor on Raspberry PI Zero W to work.

Thanks

error: ‘FOCUSER_CAN_REVERSE’

Hi,

I have this error when compiling.

INDI 1.7.4

[ 66%] Built target libbcm2835
[ 75%] Building CXX object CMakeFiles/indi_rpifocus.dir/rpi_focus.o
/home/pi/astroberry-diy/rpi_focus.cpp: In constructor ‘FocusRpi::FocusRpi()’:
/home/pi/astroberry-diy/rpi_focus.cpp:139:66: error: ‘FOCUSER_CAN_REVERSE’ was not declared in this scope
FI::SetCapability(FOCUSER_CAN_ABS_MOVE | FOCUSER_CAN_REL_MOVE | FOCUSER_CAN_REVERSE); // | FOCUSER_CAN_ABORT);
^~~~~~~~~~~~~~~~~~~
/home/pi/astroberry-diy/rpi_focus.cpp: In member function ‘virtual bool FocusRpi::initProperties()’:
/home/pi/astroberry-diy/rpi_focus.cpp:264:2: error: ‘FocusMaxPosN’ was not declared in this scope
FocusMaxPosN[0].min = 1000;
^~~~~~~~~~~~
/home/pi/astroberry-diy/rpi_focus.cpp: In member function ‘virtual bool FocusRpi::ISNewNumber(const char*, const char*, double*, char**, int)’:
/home/pi/astroberry-diy/rpi_focus.cpp:377:4: error: ‘FocusMaxPosN’ was not declared in this scope
FocusMaxPosN[0].min = (int) FocusMaxPosN[0].min * resolution / last_resolution;
^~~~~~~~~~~~
/home/pi/astroberry-diy/rpi_focus.cpp:381:17: error: ‘FocusMaxPosNP’ was not declared in this scope
IDSetNumber(&FocusMaxPosNP, nullptr);
^~~~~~~~~~~~~
/home/pi/astroberry-diy/rpi_focus.cpp:403:19: error: ‘FocusReverseSP’ was not declared in this scope
deleteProperty(FocusReverseSP.name);
^~~~~~~~~~~~~~
/home/pi/astroberry-diy/rpi_focus.cpp: In member function ‘virtual bool FocusRpi::saveConfigItems(FILE*)’:
/home/pi/astroberry-diy/rpi_focus.cpp:523:29: error: ‘FocusMaxPosNP’ was not declared in this scope
IUSaveConfigNumber(fp, &FocusMaxPosNP);
^~~~~~~~~~~~~
/home/pi/astroberry-diy/rpi_focus.cpp:525:29: error: ‘FocusReverseSP’ was not declared in this scope
IUSaveConfigSwitch(fp, &FocusReverseSP);
^~~~~~~~~~~~~~
/home/pi/astroberry-diy/rpi_focus.cpp: In member function ‘virtual IPState FocusRpi::MoveAbsFocuser(int)’:
/home/pi/astroberry-diy/rpi_focus.cpp:606:6: error: ‘FocusReverseS’ was not declared in this scope
if (FocusReverseS[REVERSED_ENABLED].s == ISS_ON) {
^~~~~~~~~~~~~
/home/pi/astroberry-diy/rpi_focus.cpp:606:20: error: ‘REVERSED_ENABLED’ was not declared in this scope
if (FocusReverseS[REVERSED_ENABLED].s == ISS_ON) {
^~~~~~~~~~~~~~~~
CMakeFiles/indi_rpifocus.dir/build.make:62: recipe for target 'CMakeFiles/indi_rpifocus.dir/rpi_focus.o' failed
make[2]: *** [CMakeFiles/indi_rpifocus.dir/rpi_focus.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/indi_rpifocus.dir/all' failed
make[1]: *** [CMakeFiles/indi_rpifocus.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

error in SetResolution

During testing i found a small coding error in rpi_focus.cpp.

In line 691 and 692 you set twice pinMode(M2, OUTPUT);, but one should be pinMode(M3, OUTPUT);.

Support for ULN2003

Hello,

does this work with driver ULN2003?
If not can you implement this?

best regards Jan

AbortFocuser() handling

I need help in implementing AbortFocuser() function in the driver.
I'm missing basic concept how it should be handled according to INDI API.

When building, the warning "deprecated" is displayed.

When building with indi 1.9.8 environment, the following warning is displayed where a deprecated member function of class DefaultDevice is used in a derived class.

 warning: 'void INDI::DefaultDevice::<function name>(ISwitchVectorProperty*)' is deprecated [-Wdeprecated-declarations].

Would you please modify it for the indi 1.9.8 environment?

Waveshare Stepper Motor Hat focuser support

It would be nice to have it supported, as it looks like natural Astroberry companion :). This board is quite cheap (compared to other hats) and should support big range of motors.

Support for servo-motor for focuser

I, thanks for your job but its possible to add support for servo-motor ?
Today, my focuser is a sg90 servo connected in gpio17 on my rpi. Its possible to use astroberry-diy for control my focuser with ekos ?

rpi_focus cmake error

Dear Radek!
First of all, I'd like to say a great thanks for your work on Astroberry Server and Astroberry DIY.
I have an RPI 3 model B+ with Raspbian, and I wanted to install the Astroberry focuser with cmake, following the installation instructions, but I always got this error message:

Scanning dependencies of target indi_rpifocus
[ 93%] Building CXX object CMakeFiles/indi_rpifocus.dir/rpi_focus.o
/home/pi/astroberry-diy/rpi_focus.cpp: In member function :
/home/pi/astroberry-diy/rpi_focus.cpp:212:73: error: was not declared in this scope
SetFocuserCapability(FOCUSER_CAN_ABS_MOVE | FOCUSER_CAN_REL_MOVE);
^
CMakeFiles/indi_rpifocus.dir/build.make:62: recipe for target 'CMakeFiles/indi_rpifocus.dir/rpi_focus.o' failed
make[2]: *** [CMakeFiles/indi_rpifocus.dir/rpi_focus.o] Error 1
CMakeFiles/Makefile2:215: recipe for target 'CMakeFiles/indi_rpifocus.dir/all' failed
make[1]: *** [CMakeFiles/indi_rpifocus.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Earlier the Astroberry Focuser worked perfectly in Kstars installed on my RPI2 with Ubuntu Mate, but unfortunately the SD card injured, and the whole setup destroyed. I don't remember, how I installed the working focuser driver, but when I tried to compile the driver, I got the same error message.
Please help me to solve this problem! (I am a really-really end-user :-) ).

Thanks in advance
Gabor

Saving and Loading Multiple Named Configuration Files

Could you please implement the ability to save and load different settings into different named settings files?

I am using two different focusers on one Astroberry DIY focuser. Only one of the two focusers can be connected at a time.

The Astroberry Focuser requires different settings for each focuser. This is because the specifications for Reverse motion, Max. Position, Max. Travel, etc. of the two focusers are different.

I believe that if the Astroberry Focuser can handle multiple configuration files, it will greatly simplify and improve the convenience of the settings for me.

Joystick axis support

If I connect a Joystick or gamepad, I can see 3 buttons to focus in, focus out and abort focus
Schermata 2022-02-07 alle 10 12 49

What about adding the ability to use the analog axis of joystick to control the focus speed?
A PS4 controller in INDI control panel

Axis close to 0 = abort focusing
Axis between minimum and maximum , a ramp related to relative minimum and maximum speed set.

Standby timer not reset by new command

If standby is enabled and a a move command is given and then a new move command is given within the timer window, standby from the first command will still be activated, possibly preventing the correct execution of later commands.

To reproduce-
Enable standby and set time to 60s.
Execute a step command.
Execute a second command after 50s

expected result - the motor should not go into standby until 60s after the second command
actual result - the motor goes into standby 60s after the first command and will try to go into standby again 60s after the 2nd, and this can disrupt a move in process at these times.

Thanks for producing this useful piece of software,

Keith

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.