×

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

Bi-monthly release with minor bug fixes and improvements

is anyone able to get the Alnitak Flat-man driver working? (DIY Flat man)

  • Posts: 194
  • Thank you received: 20
I changed the sketch to read one character at a time, and key off of 0x0a or 0x0d.
3 years 8 months ago #57250

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

  • Posts: 215
  • Thank you received: 41
Does the flat man work using commands through the arduino serial monitor interface?
3 years 8 months ago #57251

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

  • Posts: 215
  • Thank you received: 41
Here are the generic commands that you can use through serial monitor interface to check that the device works.
3 years 8 months ago #57252
Attachments:

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

  • Posts: 183
  • Thank you received: 23
Yup - works through the serial interface - but not with teh INDI driver unless I change the INDI_RES variable to be longer
3 years 8 months ago #57253

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

  • Posts: 194
  • Thank you received: 20
You're sending CR and LF at the end of each message. Per Arduino Serial.println() docs:

That is why it is horking on your response. You need to stuff a newline at the end of your message and then call Serial.print()
The following user(s) said Thank You: Paul Muller
3 years 8 months ago #57256

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

  • Posts: 215
  • Thank you received: 41
I will need to set up some of my gear and check out my settings etc.
I can probably do this in 3-4 hrs. I will get back after.
Mike
The following user(s) said Thank You: Paul Muller
3 years 8 months ago #57257

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

  • Posts: 183
  • Thank you received: 23
That would be a driver thing right? So how is the driver working for some people and not others, SO confused!
3 years 8 months ago #57260

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

  • Posts: 194
  • Thank you received: 20
Your code - not the driver. You just need to change your Serial.println() to Serial.print(), then put a newline in each message. You can do it in the sprintf, like this:
sprintf(temp, "*P%d000\n", deviceId);

Serial.print() just sends what is in the buffer, without adding a CR to it.
3 years 8 months ago #57262

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

  • Posts: 194
  • Thank you received: 20
Sorry for spamming. To be more clear, changge this code:
		  sprintf(temp, "*P%d000", deviceId);
		  Serial.println(temp);

to this:
		  sprintf(temp, "*P%d000\n", deviceId);
		  Serial.print(temp);

And do that for each message you send back to the driver.
3 years 8 months ago #57263

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

  • Posts: 215
  • Thank you received: 41
Hi Dave

The code that I sent through (see email with attachment) does have those changes already.

Cheers

Mike
3 years 8 months ago #57266

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

  • Posts: 194
  • Thank you received: 20
xthestreams,

I just made those changes to your published code and it works with the FlatMan driver on my Raspberry Pi.
[2020-07-23T20:20:32.519 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] Connecting to /dev/ttyACM0 @ 9600 "
[2020-07-23T20:20:32.521 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] Port FD 3 "
[2020-07-23T20:20:32.522 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] Connection successful, attempting handshake... "
[2020-07-23T20:20:32.523 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] CMD <>P000> "
[2020-07-23T20:20:32.541 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] RES <*P19000> "
[2020-07-23T20:20:32.544 MST INFO ][           org.kde.kstars.indi] - Flip Man :  "[INFO] Flip Man is online. "
[2020-07-23T20:20:32.545 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] Configuration successfully saved for DEVICE_PORT. "
[2020-07-23T20:20:32.561 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] Configuration successfully saved for DEVICE_BAUD_RATE. "
[2020-07-23T20:20:32.561 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] Configuration successfully saved for CONNECTION_MODE. "
[2020-07-23T20:20:32.562 MST INFO ][           org.kde.kstars.ekos] - "Flip Man" Version: "1.0" Interface: 33792 is connected.
[2020-07-23T20:20:32.563 MST DEBG ][           org.kde.kstars.ekos] - 3  devices connected out of  5
[2020-07-23T20:20:32.637 MST DEBG ][           org.kde.kstars.indi] - < Flip Man >: < FLAT_LIGHT_CONTROL >
[2020-07-23T20:20:32.646 MST DEBG ][           org.kde.kstars.indi] - < Flip Man >: < FLAT_LIGHT_INTENSITY >
[2020-07-23T20:20:32.651 MST DEBG ][           org.kde.kstars.indi] - < Flip Man >: < Status >
[2020-07-23T20:20:32.661 MST DEBG ][           org.kde.kstars.indi] - < Flip Man >: < Firmware >
[2020-07-23T20:20:32.665 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] CMD <>V000> "
[2020-07-23T20:20:32.665 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] RES <*V19001> "
[2020-07-23T20:20:32.666 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] CMD <>S000> "
[2020-07-23T20:20:32.668 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] RES <*S19010> "
[2020-07-23T20:20:32.668 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] CMD <>J000> "
[2020-07-23T20:20:32.669 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] RES <*J19000> "
[2020-07-23T20:20:33.556 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] CMD <>S000> "
[2020-07-23T20:20:33.572 MST DEBG ][           org.kde.kstars.indi] - Flip Man : "[DEBUG] RES <*S19010> "
The following user(s) said Thank You: Paul Muller
3 years 8 months ago #57268

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

  • Posts: 183
  • Thank you received: 23
Awesome - I'll make the changes at my end and if they fix this little bug then I will update the Git code for the sketch (*.ino) or either of you can, save some other poor fool from hitting their heads against a wall!
3 years 8 months ago #57270

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

Time to create page: 1.608 seconds