Skip to content

Files

Latest commit

author
Vinício Araújo
Dec 20, 2023
5e8227c · Dec 20, 2023

History

History

example_dht

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 20, 2023
Dec 20, 2023
Dec 20, 2023

About

This example use Arduino and build-in LED to blink, by choosing the time on/off on Simulink.
What is covered:

  • Integration between Arduino and Stateflow;
  • Use of build-in Arduino Libraries in Simulink.

Requeriments

Software

  • MATLAB Version 9.13 (R022b)
  • Simulink R2022b 10.6 (R022b)
  • MATLAB Support Package for Arduino Hardware (version 22.2.2)
  • Simulink Support Package for Arduino Hardware (version 22.2.4)
    Maybe work with newer versions.

Hardware

  • x1 - Arduino Uno
  • x1 - DHT11 Sensor

Connections

Files:

  • main.slx: Model with the main model/logic of the example.

Blocks

  • Serial_Communication: This block Enables the Serial Communication. If the communication is ok, enable the DHT11.
  • DHT11: After get the OK from previous block, enable messages with Temperature and Humidity in Serial Port.

How to use

  • Check How to Use Section and make all initial config.
  • Open main.slx.
  • Hardware > Build, Deploy & Start.