Hello, thanks for clicking. I'm looking for a feasibility / difficulty rating on this idea:
I have two different working codes that read data off a multiplexer connected to a large number of sensors, and then transmits that data.
Code 1 uses Serial Bluetooth to transmit the data, and there is a corresponding app designed to receive this data. Everything works fine.
Code 2 uses Wifi connection to transmit the same data to a website. The same app can also receive this data and it works fine.
I'm considering writing a 3rd code that will:
A) Add a function in the app that allows the user to select which method they would like to use to receive the data
B) Upon receiving the user's preference, execute Code 1 or 2.
Pretty simple right? I'm also considering a possibly easier approach:
just connecting a 3.3V source to a GPIO pin with a switch in between. Then I could theoretically just do a digital read on that pin, and if it reads high have it execute code 1, if low it will execute code 2.
Are these feasible? I'm used to transmitting from my mcu to the app not from the app to my mcu. How hard is it to do that? Am I better off just adding a switch?
Is there a better way to do this?
Appreciate any input.