×

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 made one the other day, similar to yours, but instead of printf of decimal numbers I just used strings. Works fine, however I used FlipFlat as the id, and I did have trouble with the driver. It seems sometimes it sends newline and sometimes it sends return. I had to code for both.

Dave
3 years 8 months ago #57247

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

  • Posts: 183
  • Thank you received: 23
Thanks @Dallmon, did you change the driver or the sketch to get it to work reliably.

I think you are seeing the same problem, it appears to be a NL vs CR problem unless I am mistaken - the protocol as I read it expects NL for commands and CRs for results.

I haven't written code of any sophistication in 20 years so Googling my little heart out in teh hope of being able to solve the problem and contribute a working patch back to the trunk.
3 years 8 months ago #57248

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

  • Posts: 215
  • Thank you received: 41
Thats right we used strings with SGpro and it worked OK with home made code. However I am happy with how it works now in indi with the flip_flat driver.
3 years 8 months ago #57249

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

  • 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.

Time to create page: 1.088 seconds