External Mode Button?

I am looking at putting the Spark module into a product. There are two things that I need to do this. The first is a Light Pipe so I can see the LED from the case. The other is the ability to have an external MODE button. The light pipe should be easy. The mode button is harder.

I was thinking it would be good to be able to program one of the other pins as a secondary Mode button where either can work. The reason for this is that I am looking at a product that would be in an IP66 case, and this can be done if the unit is sealed. If it needs to be opened, such as to press a Mode button, there are other issues to be solved.

Any thoughts?


1 Like

Sounds possible and solvable for sure!

The light pipe just requires some sourcing to find it.

As for another mode button, we will need to touch the bootloader or just some modification to define another MODE button and I’m sure someone in the forum can help :slight_smile:

You’re good to go! Really hope to see your project come live!

1 Like

I now have my product basically complete and ready for the market, at least here in Australia initially.

I found a Light Pipe that works really well… It is from BIVAR, and is a PLP5-125. For being not much more than an LED without the LED, they are not cheap, at about $0.30/10k

As for the external mode button, I have done a lot of thinking. The best solution from my point of view would be to be able to save a flag somewhere in Flash to configure which external pin to use as an external mode button. The ideal would be to have this function put into the core functionality. That way, if you wanted to use an external pin as a MODE button, all you would need to do is to write a byte or two to Flash indicating which pin would be used as an external MODE button, and the code would just work.

It looks like a lot of the code is in core-common-lib/SPARK_Firmware_Driver. I would love to work with anyone to get this implemented, but I dont think I can do it myself.