Author Topic: doing things together in c/c++  (Read 2358 times)

0 Members and 1 Guest are viewing this topic.

Offline jamortTopic starter

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 2
doing things together in c/c++
« 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...?
my english teacher once said, "dont talk about what you dont know in public...."

so I replied the truth, " Exactly why I dont ever talk about English."

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: doing things together in c/c++
« Reply #1 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?
Howdy

Offline jamortTopic starter

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 2
Re: doing things together in c/c++
« Reply #2 on: July 12, 2009, 06:54:45 AM »
preferably simultaniously.... i already know how to do time
my english teacher once said, "dont talk about what you dont know in public...."

so I replied the truth, " Exactly why I dont ever talk about English."

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: doing things together in c/c++
« Reply #3 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.
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: doing things together in c/c++
« Reply #4 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.

Offline jamortTopic starter

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 2
Re: doing things together in c/c++
« Reply #5 on: July 12, 2009, 10:00:25 AM »
thats wat i figured.... I was just checking
my english teacher once said, "dont talk about what you dont know in public...."

so I replied the truth, " Exactly why I dont ever talk about English."

 


data_list