Society of Robots - Robot Forum

Software => Software => Topic started by: jamort on July 12, 2009, 04:59:48 AM

Title: doing things together in c/c++
Post by: jamort on July 12, 2009, 04:59:48 AM
this is something thats probably simple but i never learned how to doit if its even posible....
so say I wasnted to keep checking sensor inputs could I do them at the same time or would I have to do a loop and have it going that way...?
Title: Re: doing things together in c/c++
Post by: SmAsH on July 12, 2009, 05:22:06 AM
so you want to be able to set something up so it checks the sensor inputs every certain amount of time?
or do you want to know if you can read inputs simultaneously?
Title: Re: doing things together in c/c++
Post by: jamort on July 12, 2009, 06:54:45 AM
preferably simultaniously.... i already know how to do time
Title: Re: doing things together in c/c++
Post by: SmAsH on July 12, 2009, 07:14:49 AM
if its analogue, no. you have to read them one after the other unless the mcu has more than one processor...
im not sure of this but i can remember reading it somewhere on sor.
Title: Re: doing things together in c/c++
Post by: Razor Concepts on July 12, 2009, 09:35:47 AM
Yep, you can only read analog inputs one at a time... but they are read so fast you probably wont have any problems with it.
Title: Re: doing things together in c/c++
Post by: jamort on July 12, 2009, 10:00:25 AM
thats wat i figured.... I was just checking