Bind any two tasks to any two switches of SRA-Board.
This project uses the ESP-IDF development framework.
It uses FreeRTOS.
.
├── CMakeLists.txt
├── README.md
├── include
│ └── multicode_esp.h
└── main
├── CMakeLists.txt
├── component.mk
└── main.c
Struct is used to store User's Input
typedef struct{
int switchno1;
int switchno2;
fptr funtask1;
fptr funtask2;
}bind;
Task is made from the data given by the user and the task is then, bound to the switches of SRA Board.
Install ESP-IDF : https://github.com/espressif/esp-idf
SRA-Board Component: https://github.com/SRA-VJTI/sra-board-component.git
Clone the project
Make a Components folder in your project and clone multi_code_esp and SRA Board component in it.
- git clone https://github.com/AryanNanda17/multi_code_esp.git --recursive
- git clone https://github.com/SRA-VJTI/sra-board-component.git
-Call bindTask function and bind your tasks to switches sra-board.
It takes four Parameters.
First Parameter- Switch number you want your first task to be bound with.
Second Parameter- Switch number you want your second task to be bound with.
Third Parameter- Task 1 function.
Fourth Parameter- Task 2 function.
void bindTask(int n1,int n2, void (*inputfun1)(), void (*inputfun2)())
-Create a Task of manageTask
Once the tasks have been bound, the user needs to start the main management of the tasks using the buttons by simply creating a task of the function manageTasks()
xTaskCreate(manageTasks, "multi_code_esp", 4096, NULL, 1, NULL);
Building the project
get_idf
idf.py build
Flash
idf.py -p (PORT) flash monitor
- SRA VJTI
- SRA Wall-E Workshop
- Special thanks to Zain Siddavatam