Most of us know how to pair 2 Bluetooth devices.
Many of us also know how to pair a sensor to a repeater or controller running a matching decoding chip.
I am using an AVR chip (Arduino) for my controller. I can either manually store the sensor's code in EEPROM or on an SD card.
I am looking for recommendations for "pairing" a sensor with the Arduino, bearing in mind my sketch would already be loaded.
Firstly I imagine I would need a hardware switch to select "pairing mode" and possibly even "un-pairing mode".
In pairing mode, first thing would be to check if the sensor's code already exists and if not, add it otherwise just signal "pairing complete".
Un-pairing would effectively work the other way round.
First idea is to always start-up giving pairing/un-pairing option. If I use a time limit, either mode can be from a single pushbutton/input. No selection will default to normal mode.
I am still trying to wrap my head around this, but any suggestion on how best to code this option? I was thinking of using a series of prompts once a mode is selected. A reset button will allow re-boot and exiting pairing/un-pairing mode.
Not looking for code just pitfalls to avoid - memory over-use being one.
Actually just writing this post has given me a much clearer idea of what I want to do.
Still, TIA for any further guidance.