User Tools

Site Tools


getting_started:tutorials:hal2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
getting_started:tutorials:hal2 [2017/05/03 07:39] grafgetting_started:tutorials:hal2 [2024/06/10 17:57] (current) ursgraf
Line 1: Line 1:
-====== Reading from Mouse ====== +====== Using the HAL with Watchdog Timer ====== 
-In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run ''examples/controlsystem/mouseTest''. +In the EEROS library you will find a directory with examples. For this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/hal/HalTest3.cpp|HalTest3.cpp]] 
-This examples reads four axis of a mouse together with three buttons and outputs the results periodicallyFurther, the safety system checks for the middle button to be pressedThis causes a level changeAs soon as the button is released the safety system changes back to the first level.\\ + 
-In order to read from the proper mouse events you can install and run the ''evtest'' program. +The system uses real hardware inputs and output with [[eeros_architecture:hal:hardware_libraries#flink|]]. You also need to install the necessary wrapper library for flink, see [[getting_started:install_wrapper|]].  
 + 
 +Open a shell in the build directory of your EEROS library and run  
 <code> <code>
-sudo apt-get install evtest +./halTest3 -c HalTest3ConfigFlink.json  // for flink
-$ sudo evtest+
 </code> </code>
-This programm will list all connected devices together with the associated event numberPlease adapt the program accordinglyIt might be necessary to run it with root priveledges.+ 
 +This examples creates a small control system. The state of a peripheral input is mirrored to a peripheral output. The time domain of the control system is checked with a watchdog timer. Omit adding the watchdog block to the time domain (comment line 27 out), recompile the example and observe what is happeningThe watchdog timeout is set in the configuration file to 4.5s. The periodic task will once per second printout the state of the watchdog. As soon as the watchdog times out, the safety system will switch to its off state due to the critical input being ''false''
getting_started/tutorials/hal2.1493789964.txt.gz · Last modified: 2017/05/03 07:39 by graf