×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

How can I select stepper2 on Adafruit Motor Hat on Astroberry

  • Posts: 5
  • Thank you received: 1
Hi I did have the focuser working on astroberry, but unfortunately I have blown the chip on the Adafruit motor hat.
I have proved that the second connection M2 is working Ok with a simple python script but I don't know how to tell astroberry to use M2 / stepper2.

I would really appreciate any help! Then all i need is clear skies.

Thanks in advance
3 years 7 months ago #58041

Please Log in or Create an account to join the conversation.

  • Posts: 437
  • Thank you received: 31
Slowlearn,

Can you reprogram the Arduino to swap the ports?

Paul
3 years 7 months ago #58083

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1
Hi Paul

Thanks for the reply but I am not using an Arduino, I have a Raspberry Pi 4 with an Adafruit motor HAT directly attached to the GPIO pins.

Steve
3 years 7 months ago #58089

Please Log in or Create an account to join the conversation.

  • Posts: 437
  • Thank you received: 31
Steve,

What controls the HAT?
Is it something in INDI?

Paul
3 years 7 months ago #58091

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1
Hi Paul
I am using Astroberry which has an inbuilt driver for the Focuser using the Adafruit motor hat. That is what I need to change, but i don't know how.
Steve
3 years 7 months ago #58092

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375
The driver handles only stepper 1. However you can recompile it, forcing to use stepper 2.
Source files and instruction is located here: github.com/rkaczorek/astroberry-amh
After downloading the sources code change line 62 in the file amh_focuser.h so it says:
Adafruit_StepperMotor myStepper = hat.getStepper(2);

Then, compile, install and have fun
The following user(s) said Thank You: Steve Conway
3 years 7 months ago #58103

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1
Thanks Radek this looks like solution I was looking for.

This will save me buying a new Motor Hat

Thanks for your help

Steve
3 years 7 months ago #58130

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1
Worked a treat thanks.

Just as a note to others that follow instructions.

Cmake was not on Astroberry image had to install it, and had to run Cmake as sudo, but still very easy and quick to sort out.
The following user(s) said Thank You: Bill McDaniel
3 years 7 months ago #58141

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375
Thanks for the feedback Steve
3 years 7 months ago #58145

Please Log in or Create an account to join the conversation.

Moderators: Radek Kaczorek
Time to create page: 1.956 seconds