Bluetooth dating application
If the module is being used for the first time, you'll want to change the name, passcode etc.
To do this the module should be set to command mode.
The complete code is available at the end of this article in the "download code" button.
No extra library is used to connect to the Bluetooth module because the RX and TX pins of the Arduino are shorted with those of the module.
To program the module, a set of commands known as AT commands are used.
Do remember to remove the jumpers while uploading code to the Arduino if you have selected Pin 0 and 1 as Serial pins.
To use the DHT-11, the DHT library by Adafruit is used.
Take a look at the previous article for a quick intro about Android apps and also the layout for this app. Since the extra hardware this app will be using is the onboard Bluetooth adapter, it will have to be mentioned in the Manifest.
If your Bluetooth will not be turned on then, it will ask your permission to enable the Bluetooth.
To run the app from Android studio, open one of your project's activity files and click Run icon from the tool bar.