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.
7 years, 6 months ago.
problem using threads
I am using the rtos library of mbed for threading. I am building an occupancy system that consist of some sensor nodes and a base station. The sensor nodes get the occupancy information using the sensor and then transmit the information using the 802.15.4 radio to the base station.
The base station extracts the data. both the sensor node and the base station can send/receive data from each other.
so what i am doing is for my sensor node i am receiving the data in a thread and at the same time calling the occupancy() in main thread() function, this is because i do not want to miss any data sent by the base station.
Now the problem is at the sensor node side where i have a receive thread and a main thread() that gets the occupancy information from sensors. The receive thread keep on receiving the data but the main thread() does not execute after running 1 or 2 times.
what can the problem be ??