Niket
Published © MIT

Introduction to FreeRTOS - Tutorial 1

What is FreeRTOS and why is it important?

AdvancedProtip22,262
Introduction to FreeRTOS - Tutorial 1

Things used in this project

Hardware components

thingSoC ESP32 WiFi Module
thingSoC ESP32 WiFi Module
ESP32 Devkit V1
×1

Software apps and online services

FreeRTOS

Story

Read more

Code

AnalogMotorTask

C/C++
Analog Motor Interfacing Example
analogMotorTask()
{
  // This occurs only once
  // Initialization of Analog and Motor here
  initAnalogPin();
  initMotor();

  // This occurs once every second
  while(1)
  {
    // Read Analog Input
    analogRead();
    // Signal the Motor
    signalMotor();
    // Block AnalogMotorTask function for 1 second
    vTaskDelay(1000);
  }
}

SendSMS

C/C++
Send SMS Example
sendSMS()
{
  // This occurs only once
  // Initialization of GSM here
  initGSM();

  // This will occur every 20 seconds
  while(1)
  {
    // Send SMS
    sendingSMS();
    // Block sendSMS function for 20 seconds
    vTaskDelay(20000);
  }
}

Credits

Niket

Niket

7 projects • 24 followers
Embedded Systems Enthusiast. Learning and making projects in my free time.

Comments