Arduino Uno DHT22 libraries fail

1 view (last 30 days)
i'm using matlab 2020a. i've followed every instruction on
but somehow everytime i run
a = arduino('COM3', 'Uno', 'Libraries', 'Adafruit/DHT22');
i got an error
"Cannot program board Uno (COM3). Please make sure the board is supported and the port and board type are correct. For more information, see Arduino Hardware Troubleshooting."
i tried to run listArduinoLibraries and the name of the libraries is there
is there anything that i can do with this?
  2 Comments
MathWorks MATLAB Hardware Team
Hi Muhammad Hilmi Al Farid Ni'man,
Can you please confirm if you have copied the Arduino library folders namely Adafruit_Sensor and DHT to the libraries folder whose path is given by
>> fullfile(arduinoio.IDERoot, 'portable', 'sketchbook', 'libraries')
NOTE: The links to these Arduino libraries' zip packages are available at the FEX page https://www.mathworks.com/matlabcentral/fileexchange/72441-dht22-add-on-library-for-arduino
See Step 1-3 of 'To install the Adafruit Sensor library:' and 'To install the Adafruit DHT library:' on the same page. You will be required to rename the unzipped archives to 'Adafruit_Sensor' and 'DHT' before adding them to the libraries folder.
Once these are added to the libraries, you should be able to create the arduino object.
Muhammad Hilmi Al Farid Ni'man
thanks for answering, i already solve the problem. so my arduino libraries is located in hidden file so everytime i tried to install it, it fail. thanks

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Support Package for Arduino Hardware in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!