hi everyone,
im using c language for my PIC 16f877A and basically im working on ultrasonic sensor... i am so confuse with the coding now as i am not so expert in programming..
- i would like to know is it possible for me to run 2 different sensors at the same time, right after a switch is pressed? i can only succeed in running one task at the time.
for example, the following code is functioning only for 1 task.
- where and how am i suppose to put the "void sensor2 (void);" into this code?
void ultrasonic_sensor (void);
void sensor2 (void);
void main(void)
{
...
...
...
while(1)
{
if (!switch)
{
ultrasonic();
break;
}
}
}
thanks a lot!!
im using c language for my PIC 16f877A and basically im working on ultrasonic sensor... i am so confuse with the coding now as i am not so expert in programming..
- i would like to know is it possible for me to run 2 different sensors at the same time, right after a switch is pressed? i can only succeed in running one task at the time.
for example, the following code is functioning only for 1 task.
- where and how am i suppose to put the "void sensor2 (void);" into this code?
void ultrasonic_sensor (void);
void sensor2 (void);
void main(void)
{
...
...
...
while(1)
{
if (!switch)
{
ultrasonic();
break;
}
}
}
thanks a lot!!