frestuccTheNino
Published © GPL3+

Getting Started with Real-Time Multi-Tasking in ARTe

Free and easy-to-use Real-Time Multi-Tasking extension for Arduino IDE based on ERIKA Real-Time Operating System

BeginnerProtip6,077
Getting Started with Real-Time Multi-Tasking in ARTe

Things used in this project

Hardware components

Arduino Due
Arduino Due
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Blinking led and Hello World with ARTe

Arduino
The sketches make the embedded led blink every 100 ms while serial port send "Hello ARTe" string every second
int led = 13; //built-in led
void setup() 
{
  pinMode(led,OUTPUT);
  Serial.begin(9600);
}

void loop() { //background activity, lower priority task, empty in this example
}

void loop1(100) //this loop is executed every 100 ms
{
  static int ledstatus = 1;
  if(ledstatus == 0)
  {
    digitalWrite(led,HIGH);
    ledstatus = 1;
  }
  else
  {
    digitalWrite(led,LOW);
    ledstatus = 0;
  }
}

void loop2(1000) // this loop is executed every second
{
  Serial.println("Hello ARTe!");
}
  

  

Credits

frestucc

frestucc

0 projects • 2 followers
TheNino

TheNino

0 projects • 0 followers

Comments