Morse code with flashlight

Any ideas on how to implement morse code with the flashlight? The problem I'm currently running into is that it's not possible to "wait" half a second between switching modes on the flashlight... I was thinking of implementing something with System.Timer, but I'm not sure it's the best approach

  • I think this would be very cool. Yes, I think the System.Timer would be the best (and only) approach. I think it would be cool to see the final product if you end up releasing it to the store!

  • You can't just spin and wait it that to change.  The watch dog could kill your app.

    You might want to look at using Toybox.Timer and set a one-shot for the time you need for a dot, dash, and gap so you aren't looping.

    But you might want to use a continuous one as you probably want it for things like updating the display, etc

  • Thank you for asking this question. I'm also very interested in this topic. Besides that, I've recently been learning the basics of Morse code. I've been using tools like Morse code translator to help me learn.

  • Hey! I actually made it and you can check it out on Connect IQ it’s called Morser

  • I thought I don't see it because my device doesn't have flashlight, but in the description you wrote either flashlight or beeper, so why isn't it available on all devices that have vibration?

  • I thought I don't see it because my device doesn't have flashlight

    Yeah it looks like the app is only available for devices which have a real flashlight, except Fenix 8.

    > Remove Fenix 8 watches from allowed list, because of instability

    in the description you wrote either flashlight or beeper, so why isn't it available on all devices that have vibration

    Not that it changes your point, but by "beeper" I think they mean the basic piezoelectric speaker that most Garmins have (which makes beeps). Some Garmins have a real speaker which can do more than beep (like Fenix 8 and Venu 2 Plus), while some Garmins do not have any kind of speaker (Vivoactive series).

    I think all Garmin watches have vibration though. (I don't think vibration of your own Garmin watch would be a very effective way to transmit morse code to someone else tho.)

    (Yeah, I'm guessing you meant "a beeper" or "a speaker" when you said "vibration", but just in case...)

    EDIT: my point still stands that beeping is not the same as vibration

  • I could still hear the beeps and flash my real flashlight...

  • Any ideas on how to implement morse code with the flashlight? The problem I'm currently running into is that it's not possible to "wait" half a second between switching modes on the flashlight... I was thinking of implementing something with System.Timer, but I'm not sure it's the best approach

    I'm actually looking into something very similar, and I have the same question. My first thought was also to use a timer-based approach, since Morse code is really just a sequence of timed on/off intervals. The tricky part seems to be coordinating the flashlight state changes without blocking the rest of the application or running into timing issues. I also have the same question about whether System.Timer is the best option here or if there's a cleaner way to queue the signals and let them play back asynchronously. In a way, this is exactly the kind of problem a Morse code translator has to solve internally taking a message, breaking it down into dots, dashes, and pauses, and then ensuring those signals are emitted with precise timing so they can be interpreted correctly on the receiving end. It feels like there should be a straightforward pattern for handling dots, dashes, and pauses, but getting the timing right with hardware controls can be surprisingly challenging. I'd be interested to hear what approach others have used successfully.

  • Hey! So I actually solved this and it's working pretty good so far. It's called Morser on connect iq. If you want some details about implementation I'll be happy to share!