Elevator v2.0
Elevator Documenation
Loading...
Searching...
No Matches
main.c File Reference
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "driver/uart.h"
#include "driver/gpio.h"
#include "driver/adc.h"
#include "sdkconfig.h"
#include <string.h>
#include "esp_log.h"
#include "inc/accelerometer.h"
#include "inc/pressure_sensor.h"
#include "inc/led.h"
#include "inc/servo.h"
#include "inc/button.h"
#include "inc/serial_communication.h"
#include "inc/elevator.h"
#include "inc/HAL_driver.h"
Include dependency graph for main.c:

Functions

void task1 (void *pvParameter)
 task1 will run the dispatcher that will send data to task 2 More...
 
void task2 (void *pvParameter)
 task 2 will receive data from task 1 and update the elevator for the FSM to run More...
 
void task3 (void *pvParameter)
 task 3 will run the FSM More...
 
void elevatorButtonInterrupt (void *arg)
 elevatorButtonInterrupt interrupt routine that will update the elevator floor from the cart More...
 
void task4 (void *pvParameter)
 task4 read all the sensors of the elevator More...
 
void task5 (void *pvParameter)
 task5 debugging task will print data to UART 2 More...
 
void app_main (void)
 

Variables

Accelerometer acc
 
PressureSensor pressSens
 
Servo SG90
 
SerialComm externalSerial
 
Led floorLed []
 
Led emergencyLed
 
Led arrow []
 
Button elevatorButton []
 
SerialComm dispatcher
 
Button emergencyButton
 
Button hc_sr501
 
Elevator myElevator
 
int floorLedSize
 
int arrowSize
 
int elevatorButtonSize
 
Button dispatcherCallButton []
 
int dispatcherCallButtonSize
 
QueueHandle_t myQueue
 
QueueHandle_t dispatcherQueue
 

Function Documentation

◆ app_main()

void app_main ( void  )

◆ elevatorButtonInterrupt()

void elevatorButtonInterrupt ( void *  arg)

elevatorButtonInterrupt interrupt routine that will update the elevator floor from the cart

Parameters
argarguments pass to the task

◆ task1()

void task1 ( void *  pvParameter)

task1 will run the dispatcher that will send data to task 2

Parameters
pvParameterarguments pass to the task

◆ task2()

void task2 ( void *  pvParameter)

task 2 will receive data from task 1 and update the elevator for the FSM to run

Parameters
pvParameterarguments pass to the task

◆ task3()

void task3 ( void *  pvParameter)

task 3 will run the FSM

Parameters
pvParameterarguments pass to the task

◆ task4()

void task4 ( void *  pvParameter)

task4 read all the sensors of the elevator

Parameters
pvParameterarguments pass to the task

◆ task5()

void task5 ( void *  pvParameter)

task5 debugging task will print data to UART 2

Parameters
pvParameterarguments pass to the task

Variable Documentation

◆ acc

Accelerometer acc
extern

◆ arrow

Led arrow[]
extern

◆ arrowSize

int arrowSize
extern

◆ dispatcher

SerialComm dispatcher
extern

◆ dispatcherCallButton

Button dispatcherCallButton[]
extern

◆ dispatcherCallButtonSize

int dispatcherCallButtonSize
extern

◆ dispatcherQueue

QueueHandle_t dispatcherQueue

◆ elevatorButton

Button elevatorButton[]
extern

◆ elevatorButtonSize

int elevatorButtonSize
extern

◆ emergencyButton

Button emergencyButton
extern

◆ emergencyLed

Led emergencyLed
extern

◆ externalSerial

SerialComm externalSerial
extern

◆ floorLed

Led floorLed[]
extern

◆ floorLedSize

int floorLedSize
extern

◆ hc_sr501

Button hc_sr501
extern

◆ myElevator

Elevator myElevator
extern

◆ myQueue

QueueHandle_t myQueue

◆ pressSens

PressureSensor pressSens
extern

◆ SG90

Servo SG90
extern