problem with ultrasonic toolbox for arduino
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ayoub indjaren
am 27 Mär. 2022
Beantwortet: MathWorks MATLAB Hardware Team
am 23 Nov. 2023
Hi everyone, I'm facing this problem where i want to use the ultrasonic library in matlab for interfacing with arduino but it doesn't seem to work . I have searched around the internet for hours and still cannot find the solution. I am really gonna very grateful for any suggestion.
thanks.
this is the result i get
a = arduino('COM3', 'Uno', 'Libraries', 'JRodrigoTech/HCSR04')
Updating server code on board Uno (COM3). Please wait.
Cannot program board Uno (COM3). Please make sure the board is supported and the port and board type are correct.
0 Kommentare
Antworten (2)
Vidip
am 23 Nov. 2023
I understand that you are facing an issue with programming the board or uploading the required code to the Arduino Uno. This could be due to several reasons like incorrect board type, incorrect COM port, for that you need to verify that the COM port specified in the ‘arduino’ function call (COM3 in this case) is the correct port to which the Arduino board is connected. You can check the COM port in the Arduino IDE or by using the ‘deviceinfo’ function in MATLAB.
You can go through the below documentation link to make sure you have established a proper connection between ultrasonic sensors and Arduino through MATLAB.
For further information, refer to the documentation link below:
0 Kommentare
MathWorks MATLAB Hardware Team
am 23 Nov. 2023
Hi,
You can use the following code to work with Ultrasonic sensor
>> arduinoObj = arduino('<COM PORT>','Uno',"Libraries","Ultrasonic")
>> ultrasonicObj = ultrasonic(arduinoObj,'<TRIG Pin>','<ECHO Pin>')
Refer to this link to know more,
https://in.mathworks.com/help/supportpkg/arduinoio/ref/arduinoio.ultrasonic.html?msclkid=73d5c767ae5911ec9f90682f469bce0c
Feel free to contact MathWorks Technical Support to get help on resolving any errors.
https://www.mathworks.com/support/contact_us.html
Thanks,
MATLAB Hardware Team
MathWorks
0 Kommentare
Siehe auch
Kategorien
Mehr zu MATLAB Support Package for Arduino Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!