Selecting the best Bluetooth module for my Arduino Leonardo Microcontroller (which is compatible with both IOS and Android and can be connected to via phone settings).
How to password-protect the bluetooth microchip (code-wise).
How to Arduino-IDE code the Bluetooth module so that, upon successful connection between it and a phone, it asks the microcontroller to send an output voltage (i.e. on pin 5).
sounds like: Make the work for me and that is not supported here.
What have You achieved so far?
What would "the best Bluetooth module" be? What is good and what is not?
Password protect the chip? Impossible. Password protecting the code? Can be done.
Coding a BT module. Start by using example code and learn.
No Arduino is outputting analog voltage, only On/Off or PWM.
Why? You can protect the code in the microcontroller but not with a passowrd. Check the datasheet of the 32U4 microcontroller.
Have a look at Robin's Serial Input Basics - updated. That's the Arduino receive side of things. You can test that with Serial and once you're satisfied that it works 100% switch to Serial1 which would be used for the Bluetooth and write the phone app (or use an existing one).
@sterretje Thank you for all this valuable advice!
Will definitely study Robin's Serial input basics. By Serial1 are you referring to tx/rx? (I'm new to Arduino)
Also I've probably misled you with the 2nd question. What I meant to ask was "how can the Bluetooth microchip be pass/pin-protected? Is it through a command in Arduino?
Yes, the Leonardo differs from e.g. the Uno from that perspective.
Can't remember for sure, too long ago that I played with it. From memory, it was done with Arduino code. It might also depend on the bluetooth module that you use.