Skip to content

alibouhjira/arduino-air-conditioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

The goal of the following exercise is to implement a statechart on the Linux OS.

We will use the sc_minilib library :

https://gitlab-etu.fil.univ-lille.fr/cle-2023/sc_minilib

which is already included in this repository as a submodule.

As always, fork this repository in your private namespace, and add the teacher as member of your project. Then clone it with the following command:

  git clone --recurse-submodules <the url of your project>

Compiling the library and executing the examples

To compile and execute the examples of the library, create a build_sc directory. Then:

   mkdir build_sc
   cd build_sc
   cmake ../sc_minilib
   make

To execute the examples, type:

   ./examples/fan/fandemo
   ./examples/hierarchy/hierarchy
   ./examples/coffee/coffee

Compile your program

To compile and execute your program, create a directory build_ac and then:

   mkdir build_ac
   cd build_ac
   cmake ..
   make

This will create an executable ac that you can run with:

   ./ac 

Exercise

The goal of the exercise is to implement the AC system that you designed in the previous TP, with the sc_minilib library.

To simulate the automatic mode, you can change the external temperature with an appropriate command. For example, you can use the following commands:

  • key "*" to turn on/off the system;
  • key "m" to switch to manual mode and change between "Heating" and "Cooling";
  • key "+" and "-" to increase/decrease the desired temperature;
  • key "t" to enter a value of the current tempeature.

Optional: To better show the results on the screen, you can use the ncurses library:

This allows you to interact with the system in a more natural way (e.g. by simple keypresses and output at fixed positions in the screen).

You can also use a graphical library like Gnome/GTK, if you feel competent enough to do it (but I cannot give you any help on that).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published