HC-05 Bluetooth Module is connected to Arduino but cannot initialize 'arduino' object
4 views (last 30 days)
Show older comments
MathWorks Support Team
on 9 Nov 2022
Edited: MathWorks Support Team
on 1 Apr 2024
I am trying to establish a connection to my Arduino Uno HC-05 Bluetooth Module. I have followed a similar setup approach to the one described here:
and have now been able to pair and connect to the Arduino Uno with the HC-05 module.
I can perform some basic commands, so it is communicating:
>> bluetoothlist
Run blelist to search for nearby Bluetooth Low Energy peripheral devices.
ans =
1×4 table
Name Address Channel Status
________________ ______________ _______ ___________
"DSD TECH HC-05" "001403050888" 1 "Connected"
I am able to toggle an LED on the Arduino board over Bluetooth using the following code on the MATLAB side and corresponding code on the Arduino side:
bt = bluetooth ("DSD TECH HC-05",1);
fopen(bt);
fprintf(bt,'1');
However, whenever I try to create an Arduino object, I receive the following error:
Unable to find Arduino hardware at HC-05. First argument must be a valid Serial port, Bluetooth
address/name or IP address/hostname.
I have tried various arguments and I am still unable to create this object.
Accepted Answer
MathWorks Support Team
on 1 Apr 2024
Edited: MathWorks Support Team
on 1 Apr 2024
This issue indicates that the Arduino Uno has not been configured with the correct libraries. Follow the instructions at the following link to configure your Arduino hardware:
You may need to download additional drivers during this process, such as FTDI drivers.
Once the Arduino hardware is configured, refer to the following link for additional setup and troubleshooting steps:
0 Comments
More Answers (0)
See Also
Categories
Find more on Troubleshooting in MATLAB Support Package for Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!