[HELP] How to pass DHT22 data from Arduino to Simulink?
5 次查看(过去 30 天)
显示 更早的评论
Currently Im doing a mini project that needed to read temperature and humidity using DHT22 (connected to Arduino Mega 2560). However, when I try to deploy the block simulink to the Arduino Mega 2560, it seems to have error that display "Failed to generate all binary output". Btw, I'm using DHT additional library on simulink: https://www.mathworks.com/matlabcentral/fileexchange/62878-arduino-additional-sensors-library-dht-lps331 . I tried to deploy a simple block which is to blink an LED and it works fine. If anyone could help me with my problem Id really appreciate it.
Below is the error shown:
### Starting build procedure for model: simul1
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: D:\FYP\simulink\simul1_ert_rtw
### Invoking Target Language Compiler on simul1.rtw
### Using System Target File: C:\Program Files\MATLAB\R2017b\rtw\c\ert\ert.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
.
### Caching model source code
### Writing header file simul1_types.h
### Writing header file simul1.h
### Writing source file simul1.c
.
### Writing header file simul1_private.h
### Writing header file rtwtypes.h
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
.
### Writing header file rtGetNaN.h
### Writing source file rtGetNaN.c
### Writing source file simul1_data.c
### Writing header file rtmodel.h
### Writing source file ert_main.c
### TLC code generation complete.
### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: Arduino AVR v1.8.1 | gmake (64-bit Windows)
### 'D:\FYP\simulink\simul1_ert_rtw\simul1.mk' is up to date
### Building 'simul1': "C:\PROGRA~1\MATLAB\R2017b\bin\win64\gmake" -f simul1.mk all
D:\FYP\simulink\simul1_ert_rtw>cd .
D:\FYP\simulink\simul1_ert_rtw>if "" == "" ("C:\PROGRA~1\MATLAB\R2017b\bin\win64\gmake" -f simul1.mk all ) else ("C:\PROGRA~1\MATLAB\R2017b\bin\win64\gmake" -f simul1.mk )
gmake: *** No rule to make target `C:/Users/User/DOCUME~1/MATLAB/Add-Ons/Collections/Arduino', needed by `dht_arduino.o'. Stop.
D:\FYP\simulink\simul1_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
D:\FYP\simulink\simul1_ert_rtw>An_error_occurred_during_the_call_to_make
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Creating HTML report file simul1_codegen_rpt.html
### Build procedure for model: 'simul1' aborted due to an error.
Error:Error(s) encountered while building "simul1":
### Failed to generate all binary outputs.
0 个评论
回答(1 个)
Madhu Govindarajan
2018-8-15
Here is a link that I found - https://www.mathworks.com/matlabcentral/answers/95399-why-is-the-build-process-failing-for-a-shipped-model-in-simulink-or-for-a-model-run-in-accelerator-m
Solution #2 in this page seems to have worked for a few folks. Can you give that a try?
Regards, Madhu
2 个评论
Madhu Govindarajan
2018-8-15
You can always open MATLAB as and administrator by right clicking on MATLAB icon and selecting 'Run as administrator'. This should give you necessary access. If this does not resolve the issue, I suggest you send a private message to the owner as well to see if they can provide some insight about the library and this specific block.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!