Control Arduino via Bluetooth - how it works
You can easily control the Arduino via Bluetooth. You can find out how to do this in this practical tip.
Control Arduino via Bluetooth - how it works
To operate your Arduino via Bluetooth, you need an HC-05 Bluetooth module.
- Connect TXD to pin 10 and RXD to pin 11. In addition, you connect the ground and 5V pin.
- First import the required library in the code with the command "#include" and create it with the command "SoftwareSerial mySerial (10, 11);" a new object.
- In the setup method, implement the "mySerial.begin (9600);" command to start the module.
- Now you can easily read out the received data with the command "a = mySerial.readString ()". Note: For this to work, you must first use the "String a;" have defined a new string.
- You can also use "mySerial.available ()" to check whether a signal has actually been received. Only then does it make sense to read the string.
In the next article, you will learn how to debounce a button on the Arduino.