Use arduinomorse instead of Jled #38

Merged
W1CDN merged 9 commits from arduinomorse into program-cycle 2023-09-15 16:35:54 -05:00
Owner

Branching off a branch to see if a custom version of arduinomorse (https://github.com/markfickett/arduinomorse) is easier to work with than Jled.

Note that I have a working copy of arduinomorse locally in Sites/Arduino library testing/arduinomorse.

Todo:

  • start sending on schedule
  • repeat n times on cycle
  • wait right amount before starting again
  • add continuous
Branching off a branch to see if a custom version of arduinomorse (https://github.com/markfickett/arduinomorse) is easier to work with than Jled. Note that I have a working copy of arduinomorse locally in `Sites/Arduino library testing/arduinomorse`. Todo: - [x] start sending on schedule - [x] repeat n times on cycle - [x] wait right amount before starting again - [x] add continuous
W1CDN added the
enhancement
label 2023-09-13 20:13:41 -05:00
W1CDN changed title from Use ardiunomorse instead of Jled to Use arduinomorse instead of Jled 2023-09-13 20:13:54 -05:00
mattbk added 1 commit 2023-09-13 20:25:01 -05:00
mattbk added 1 commit 2023-09-13 21:06:20 -05:00
Author
Owner

Ugh, I can't get it to send on cycle.

Maybe try continuous first?

Ugh, I can't get it to send on cycle. Maybe try continuous first?
Author
Owner

I think Jled and arduinomorse were fighting for the gpio. I commented all the Jled stuff out and at least got one message out on startup.

I think Jled and arduinomorse were fighting for the gpio. I commented all the Jled stuff out and at least got one message out on startup.
mattbk added 1 commit 2023-09-13 21:54:48 -05:00
Author
Owner

I can start on schedule and run forever, then stop by switching the program to off. Seems like a good place to stop.

Repeating n times seems like a for or while loop.

Waiting the right amount of time might be a while loop with millis() around the outside??

Might need duration of the message to figure out repeats. Looked around a bit and then just asked: https://github.com/markfickett/arduinomorse/issues/13

I can start on schedule and run forever, then stop by switching the program to off. Seems like a good place to stop. Repeating n times seems like a `for` or `while` loop. Waiting the right amount of time might be a `while` loop with `millis()` around the outside?? Might need duration of the message to figure out repeats. Looked around a bit and then just asked: https://github.com/markfickett/arduinomorse/issues/13
mattbk added 1 commit 2023-09-14 12:44:22 -05:00
mattbk added 1 commit 2023-09-14 12:46:39 -05:00
Author
Owner

I did it without getting the duration, using millis(). It seems to start/end 1 second slow, though. Will figure that out next.

This has the bonus effect of sending right up until the end of each cycle (sending fractional messages) rather than leaving blank time if the message won't fit (as in the Jled implementation).

I did it without getting the duration, using `millis()`. It seems to start/end 1 second slow, though. Will figure that out next. This has the bonus effect of sending right up until the end of each cycle (sending fractional messages) rather than leaving blank time if the message won't fit (as in the Jled implementation).
Author
Owner

RTC isn't keeping time, again.

RTC isn't keeping time, again.
mattbk added 1 commit 2023-09-14 16:36:26 -05:00
Author
Owner

So cool. I wouldn't understand this if not for all the time with Jled, but it's a lot more nimble.

The last bit is to wire up these so they actually work:
image

So cool. I wouldn't understand this if not for all the time with Jled, but it's a lot more nimble. The last bit is to wire up these so they actually work: ![image](/attachments/7d48c2e3-507f-49b1-8d07-3a0f2694c098)
mattbk added 1 commit 2023-09-14 17:10:00 -05:00
Author
Owner

Woops, need to use a non-constant cycle ID and n transmitters.

Started on this, haven't committed yet. Need to shut down the sender when not using it. LED (gpio) stays on sometimes.

Woops, need to use a non-constant cycle ID and n transmitters. Started on this, haven't committed yet. Need to shut down the sender when not using it. LED (gpio) stays on sometimes.
Author
Owner

Sending extra space at beginning and end because my math/logic isn't right.

Sending extra space at beginning and end because my math/logic isn't right.
Author
Owner

Need to take a break, but this doesn't work if yourCycleID == 1, because there is no extra space at the beginning, so it shows up yourInputStepLength early. So I need to draw a picture of the timing (or use a spreadsheet).

start_millis = millis() + ((yourInputCycleID - 1) * yourInputStepLength);
top_millis = start_millis + yourInputStepLength;
// Subtract 2 rather than 1 here to account for start_millis duration at beginning of repeat.
pause_until_millis = stop_millis + (yourInputStepLength * (yourInputNtransmitters - 2)); 
Need to take a break, but this doesn't work if `yourCycleID == 1`, because there *is* no extra space at the beginning, so it shows up `yourInputStepLength` early. So I need to draw a picture of the timing (or use a spreadsheet). ``` start_millis = millis() + ((yourInputCycleID - 1) * yourInputStepLength); top_millis = start_millis + yourInputStepLength; // Subtract 2 rather than 1 here to account for start_millis duration at beginning of repeat. pause_until_millis = stop_millis + (yourInputStepLength * (yourInputNtransmitters - 2)); ```
mattbk added 1 commit 2023-09-14 21:02:34 -05:00
mattbk added 1 commit 2023-09-15 12:22:36 -05:00
Author
Owner

Got it. Pumped for this. Will merge this when I have time today.

Add these to issue queue:

  • make sure user can't input larger cycle ID than number of transmitters - #42
  • why are cycles starting ~1s too late? - #41
Got it. Pumped for this. Will merge this when I have time today. Add these to issue queue: - make sure user can't input larger cycle ID than number of transmitters - #42 - why are cycles starting ~1s too late? - #41
W1CDN merged commit a93498ac84 into program-cycle 2023-09-15 16:35:54 -05:00
W1CDN deleted branch arduinomorse 2023-09-15 16:36:02 -05:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: W1CDN/vulpes#38
No description provided.