First of all, I have seen many topics that talks about serial communication in Arduino but I could not find an answer for my question.
I have seen many Arduino boards that can control many sensors and motors.
However, assuming that I connected an Arduino board to my PC (USB cable) and then connected 10 sensors and 10 motors to the Arduino board. Would it be possible for me to send and receive data to/from all these sensors and motors using "avr/io.h" library(C language) in each second without any delay or errors ?
On other words, can I get the output from all sensors , send input to motors, receive output from motors using the USB cable in less than 1 second ?
yes you can control & monitor BUT you cannot do both in same time. there must be some delay. say 500ms but there has to be delay. you have to monitor the sensors & actuators ONE BY ONE, not at-a-time. In most cases you cant even detect the small delay in between them.
nightboy:
Yes you are right but is it possible(with delay) to get it done in less than one second ?
No way to tell based on the information given; You say 10 sensors but don't identify what sensors they are. Analog sensors take much longer to read than digital sensors.
Kindly share what are you planning to do with your project.
you have to go through the datasheets(device specification document) of the components you are trying to use in your project. various components takes different time to respond, they use different protocols, they draw different amount of current & etc etc. In short, you have to know the nature of the components you are using then you can determine if it is possible to do what you want to do or not.
Kindly share what are you planning to do with your project.
Well, right now I am just planning and I have not decided what I am going to do. It could be a robot and it could be something else (Lab tools).
My goal right now is to determine all limitations in microcontrollers board.
Arduino boards are very popular and have many addons(shields) but can I use them in controlling many components from a PC without many errors and delays ?
Well, that's what am I trying to get now.
MAY or MAY NOT take 1 second
Do you think that the average would be less than 2 seconds ?