Hello everyone, I need to create a code for Arduino nano so that it connects to stelarium. At the moment I have it, there is only one thing, I connect stelarium, but the stepper motor does not respond, all I have is (nema17, Arduino nano, A3967) I need to make it so that the telescope itself is aimed only along the R.A. axis. Help if it is not difficult
You'll need to post more details about your project:
- a schematic of your setup,
- some clear photos,
- specifications of all relevant modules/components used,
- the code you're trying to run
- clear description of what the code is supposed to do / how the system is supposed to behave
- a description of what the system actually does and how that deviates from what you intend it to do.
Please note that ideally you supply all of the above, and not just pick something from the list that appeals to you. The more of this information you provide, the more focused and effectively the help will be that you receive.
<CODE/>#define STEP_PIN 7
#define DIR_PIN 6
void setup() {
Serial.begin(9600); // Настройка последовательного порта
pinMode(STEP_PIN, OUTPUT); // Настройка пина STEP как выход
pinMode(DIR_PIN, OUTPUT); // Настройка пина DIR как выход
}
void loop() {
if (Serial.available() > 0) {
char command = Serial.read(); // Чтение команды из последовательного порта
if (command == 'F') { // Команда для вращения вперед
rotateMotor(true, 200); // Вращение вперед на 200 шагов
}
else if (command == 'B') { // Команда для вращения назад
rotateMotor(false, 200); // Вращение назад на 200 шагов
}
else if (command == 'S') { // Команда для остановки
stopMotor(); // Остановка двигателя
}
}
}
void rotateMotor(bool direction, int steps) {
digitalWrite(DIR_PIN, direction ? HIGH : LOW); // Установка направления вращения
for (int i = 0; i < steps; i++) {
digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(1000); // Пауза между шагами
digitalWrite(STEP_PIN, LOW);
delayMicroseconds(1000);
}
}
void stopMotor() {
// Просто не вызываем функцию rotateMotor
}
I am a complete zero in programming. I dug through all the forms in search of a driver for ascom, tried all the methods, but to no avail
I am an amateur astronomer. I just ordered a MSM Nomad system. What you are trying to do is considered an advanced project.
Being able to communicate with this forum in English will get you the most responses.
Step one is a requirements statement written as if I or any listener has NO clue what Stellarium is. I have done that professionally and it often takes many months to get right.
Good luck.
So now we know two things. The mount you shoed us is a manual mount. Are you trying to replace the hand cranked parts with a stepper? It appears you want to use Ascom as the mechanism. If so, do a lot of goggle searching on Ascom and I think you will be rewarded.
I don't care what I use as long as it works
Ok, but this still applies https://forum.arduino.cc/t/arduino-connect-to-stellarium/1287339/5?u=sonofcy
I did this google search
and got a few interesting hits. The following might be where to start after looking at some videos first.
https://github.com/Tigra-Astronomy/TA.ArduinoPowerController.AscomServer
I saw this article but I didn't understand what it was for
What article?
I was too quick, that git link is just for power mgmt, I think this link is the entire package https://github.com/ASCOMInitiative/ASCOMPlatform
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.