Why do I need a processing code when I pair Arduino with bluetooth

In summary, The use of a "processing" code is necessary when pairing an Arduino with a Bluetooth device due to information security concerns. This code ensures that both the laptop and the device are authorized to communicate with each other, providing bidirectional security. The processing code controls the devices on the laptop while the Arduino code controls the signals to and from the Arduino.
  • #1
marellasunny
255
3
Why do I need a "processing" code when I pair Arduino with bluetooth

I have a need to connect my [Arduino+Bluetooth dongle JY-MCU V1.02] to my laptop in-built bluetooth device.Most forums suggest using a processing code to go ahead and do this http://www.instructables.com/id/Success-Using-the-JY-MCU-linvor-Bluetooth-Module/?ALLSTEPS.
"Demonstration of a Processing client searching for and connecting to a service."
Name of processing library: Bluetoothdesktop library by extrapixel.

Now,I am a mechanical engineer with very little/no idea of how the processing code goes about in establishing the bluetooth device on my laptop as master. In simple words,it looks like the processing code controls the devices in-built in my laptop whereas the arduino code controls the signals to and from the arduino.Is that right?
 
Engineering news on Phys.org
  • #2
Fair question!

The short answer is: information security. If you own the laptop, you might not want to go connecting to any random (potentially hostile, malware-laden) bluetooth device that wanders into range. Likewise if you own a bluetooth device (say, your insulin pump) you might not want anyone with a laptop to gain control of it. Entering the code secures ONE of those connection directions (usually convinces the device that the laptop is an "authorized" thing to talk to) but in an ideal world, both the laptop and the device would generate a code, and you wouldenter each code on the other device for bidirectional security.
-Jeff
 

1. Why do I need a processing code when I pair Arduino with bluetooth?

Processing code is necessary when pairing Arduino with bluetooth because it acts as the intermediary between the Arduino board and the connected device. The processing code receives the data from the Arduino and then sends it to the connected device via bluetooth. It also allows for more complex data manipulation and visualization.

2. Can't I just use the Arduino code to send data over bluetooth?

While it is possible to use the Arduino code to send data over bluetooth, it is not recommended. The Arduino code is optimized for controlling hardware, not for communication. Using the processing code allows for a more efficient and reliable transfer of data over bluetooth.

3. What is the advantage of using processing code for bluetooth communication?

The advantage of using processing code for bluetooth communication is that it provides a more versatile and customizable platform for data transfer. It also allows for easier integration with other programs and applications, making it more suitable for complex projects.

4. Do I need to have programming experience to use processing code for bluetooth communication?

While having some programming experience may be helpful, it is not necessary to use processing code for bluetooth communication. There are many resources and tutorials available online that can guide beginners through the process. Additionally, the processing code for bluetooth communication can be easily modified and adapted for different projects.

5. Is it possible to use processing code for bluetooth communication with other microcontrollers besides Arduino?

Yes, processing code can be used for bluetooth communication with other microcontrollers besides Arduino. As long as the microcontroller is capable of connecting to bluetooth and transmitting data, it can be used with processing code. However, some modifications may be needed to adapt the code to the specific microcontroller being used.

Similar threads

  • Computing and Technology
Replies
16
Views
1K
  • Electrical Engineering
Replies
5
Views
2K
  • Computing and Technology
Replies
15
Views
4K
  • Programming and Computer Science
Replies
2
Views
377
  • Electrical Engineering
Replies
6
Views
3K
  • Computing and Technology
Replies
1
Views
1K
Replies
1
Views
2K
  • DIY Projects
Replies
7
Views
2K
  • Programming and Computer Science
Replies
17
Views
1K
  • DIY Projects
Replies
5
Views
2K
Back
Top