Components and supplies
Ultrasonic Sensor - HC-SR04 (Generic)
Temperature Sensor
Arduino UNO
LED (generic)
Apps and platforms
ARTe (Arduino Real-Time extension)
Project description
Code
Multitasking-RealTime-Arduino-System
This simple project shows how Arduino can be used with a real time operating system (Erika). A special version of Arduino called ARTe was used for software development ( http://retis.sssup.it/?q=arte ). ARTe (Arduino Real-Time extension) is an extension to the Arduino framework that supports multitasking and real-time preemptive scheduling. Thanks to ARTe, the user can easily specify and run multiple concurrent loops at differents rates, in addition to the single execution cycle provided by the standard Arduino framework. Today ARTE supports the most popular platforms: Arduino UNO and Arduino DUE. In addition to the single loop present in the standard Arduino approach, the user can easily specify a number of concurrent loops to be executed at specific rates. Concurrency and real-time scheduling is provided by the ERIKA Enterprise (http://erika.tuxfamily.org/drupal/) open-source real-time kernel. Loops can use the standard Arduino libraries, which have been enhanced to guarantee mutual exclusion in the access of shared data structures. The impact of ARTe in terms of footprint and runtime overhead has beed evaluated by extensive tests and resulted to be negligible. In this project was used to run 3 periodic processes that handle different activities. A process for managing every 3 seconds the acquisition of the distance through the sensor HC-SR04. Another process for flashing a LED every 7 seconds. A final process to read the temperature returned by the LM35 sensor expressed in degrees Celsius is executed every 11 seconds. All processes are managed in real time mode.
Multitasking and Real-Time Arduino Processing
arduino
This simple project shows how Arduino can be used with a real time operating system (Erika). A special version of Arduino called ARTe was used for software development ( http://retis.sssup.it/?q=arte ). ARTe (Arduino Real-Time extension) is an extension to the Arduino framework that supports multitasking and real-time preemptive scheduling. Thanks to ARTe, the user can easily specify and run multiple concurrent loops at differents rates, in addition to the single execution cycle provided by the standard Arduino framework. Today ARTE supports the most popular platforms: Arduino UNO and Arduino DUE. In addition to the single loop present in the standard Arduino approach, the user can easily specify a number of concurrent loops to be executed at specific rates. Concurrency and real-time scheduling is provided by the ERIKA Enterprise (http://erika.tuxfamily.org/drupal/) open-source real-time kernel. Loops can use the standard Arduino libraries, which have been enhanced to guarantee mutual exclusion in the access of shared data structures. The impact of ARTe in terms of footprint and runtime overhead has beed evaluated by extensive tests and resulted to be negligible. In this project was used to run 3 periodic processes that handle different activities. A process for managing every 3 seconds the acquisition of the distance through the sensor HC-SR04. Another process for flashing a LED every 7 seconds. A final process to read the temperature returned by the LM35 sensor expressed in degrees Celsius is executed every 11 seconds. All processes are managed in real time mode.
Multitasking-RealTime-Arduino-System
This simple project shows how Arduino can be used with a real time operating system (Erika). A special version of Arduino called ARTe was used for software development ( http://retis.sssup.it/?q=arte ). ARTe (Arduino Real-Time extension) is an extension to the Arduino framework that supports multitasking and real-time preemptive scheduling. Thanks to ARTe, the user can easily specify and run multiple concurrent loops at differents rates, in addition to the single execution cycle provided by the standard Arduino framework. Today ARTE supports the most popular platforms: Arduino UNO and Arduino DUE. In addition to the single loop present in the standard Arduino approach, the user can easily specify a number of concurrent loops to be executed at specific rates. Concurrency and real-time scheduling is provided by the ERIKA Enterprise (http://erika.tuxfamily.org/drupal/) open-source real-time kernel. Loops can use the standard Arduino libraries, which have been enhanced to guarantee mutual exclusion in the access of shared data structures. The impact of ARTe in terms of footprint and runtime overhead has beed evaluated by extensive tests and resulted to be negligible. In this project was used to run 3 periodic processes that handle different activities. A process for managing every 3 seconds the acquisition of the distance through the sensor HC-SR04. Another process for flashing a LED every 7 seconds. A final process to read the temperature returned by the LM35 sensor expressed in degrees Celsius is executed every 11 seconds. All processes are managed in real time mode.
Multitasking and Real-Time Arduino Processing
arduino
This simple project shows how Arduino can be used with a real time operating system (Erika). A special version of Arduino called ARTe was used for software development ( http://retis.sssup.it/?q=arte ). ARTe (Arduino Real-Time extension) is an extension to the Arduino framework that supports multitasking and real-time preemptive scheduling. Thanks to ARTe, the user can easily specify and run multiple concurrent loops at differents rates, in addition to the single execution cycle provided by the standard Arduino framework. Today ARTE supports the most popular platforms: Arduino UNO and Arduino DUE. In addition to the single loop present in the standard Arduino approach, the user can easily specify a number of concurrent loops to be executed at specific rates. Concurrency and real-time scheduling is provided by the ERIKA Enterprise (http://erika.tuxfamily.org/drupal/) open-source real-time kernel. Loops can use the standard Arduino libraries, which have been enhanced to guarantee mutual exclusion in the access of shared data structures. The impact of ARTe in terms of footprint and runtime overhead has beed evaluated by extensive tests and resulted to be negligible. In this project was used to run 3 periodic processes that handle different activities. A process for managing every 3 seconds the acquisition of the distance through the sensor HC-SR04. Another process for flashing a LED every 7 seconds. A final process to read the temperature returned by the LM35 sensor expressed in degrees Celsius is executed every 11 seconds. All processes are managed in real time mode.
Downloadable files
Circuit Diagram
Electronic circuit of the components used. This schema has been designed to work properly with the implemented Arduino code. If the layout of the components is changed, you must change the pin statement in the Arduino code.
Circuit Diagram
Comments
Only logged in users can leave comments