Bluetooth modules are a type of wireless communication modules that can be added to a project as through serial or SPI communication protocols.
The advantage of using Bluetooth modules is that they are easy to set up and use.
The SPP-C module uses serial protocol for communication.
All Bluetooth modules that use serial communication protocol , support AT Commands, which are listed in the datasheet of each product.
C Bluetooth Module" width="600" height="600" />
Download the datasheet of SPP-C module here.
This module has 6 pins:
You can see the pinout of this module here.
Arduino UNO R3 | × | 1 |
SPP-C Bluetooth Serial Wireless Module | × | 1 |
Male to Female jumper wire | × | 1 |
Arduino IDE |
The following circuit shows how you should connect Arduino to SPP-C module. Connect wires accordingly.
Install the following library on your Arduino IDE.
If you need more help with installing a library on Arduino, read this tutorial: How to Install an Arduino Library
Upload the following code to the Arduino board.
/* Modified on March 09, 2021 Modified by MohammedDamirchi from https://github.com/PaulStoffregen/SoftwareSerialHome*/ #include SoftwareSerial mySerial(10, 11); // RX, TX void setup() < // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) < ; // wait for serial port to connect. Needed for native USB port only >// set the data rate for the SoftwareSerial port mySerial.begin(9600); > void loop() < // run over and over if (mySerial.available()) < Serial.write(mySerial.read()); >if (Serial.available())
This code is to test the connection between the Arduino serial monitor and the device connected to the Bluetooth module.