Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 7 months ago.
how to clear this below error
- include "mbed.h"
- include "rtos.h" DigitalOut pin(p20); DigitalOut pin1(p21); DigitalOut pin2(p22); DigitalOut pin3(p18);
void sensor_thread(void const *args) { if(pin3) { Thread thread(motor_thread); } } void motor_thread(void const *args) { while (true) { pin1=1; pin2=0; wait(2); pin1=0; pin2=1; wait(2); } }
int main() { Thread thread(sensor_thread);
} Error: Identifier "motor_thread" is undefined in "main.cpp", Line: 14, Col: 18