After a moment the device "HC06" will appear, for example - see the image in this step. Wireless Sensor Network (WSN) can use Arduino, Raspberry PI, or Panda 10. Use an ESP32/Arduino to connect Bluetooth devices to the Watson IoT. To do this, enter the Bluetooth menu inside Settings, then search for new devices. The Internet of Things with ESP32 - the Wi-Fi and Bluetooth system on a chip.
Once the app has been installed, you will need to pair your Bluetooth module to the smartphone. We used " Bluetooth Terminal" by qwerty as it was free and worked, however you can choose your own. In our demonstration we'll use terminal emulation software on the Android smartphone. You can see how simple it is for the Arduino to take action based on the character received - but where does this text come from? This is then interrogated using the if functions starting from line 23.
#ARDUINO WIFI VS BLUETOOTH IPHONE 6 SERIAL#
The sketch waits for a character of text to be sent from the Bluetooth module to the software serial port, and this is stored in the variable char a at line 22. You can see in line two of the sketch that the software serial port has been defined with the name "BT", and that any references to the module for serial communication in the sketch are now BT.begin, BT.println and so on. The sketch is quite simple, it uses a software serial port to communicate with the Bluetooth module in the same way that you would normally do so with normal Arduino serial port.
Once you have connected the hardware, enter the sketch below into the Arduino IDE and upload it to your board.