helloi'm not at all new to arduinobut i have a question , before i made a like 3 project by arduino uno but when the arduino read the temperature and reading serial port it became to slow, it wasn't function wellmy question here is mega can run multiple sketch or task at the same time likereading color sensor+reading ultrasonic distance sensor and more??please replaywith my best regards
Thanks.for replay I mean that can arduino mega run 2 diffrenet sketch at the same time
Serial communication is slow... Depending on our application, one solution would be to read/write serial data less frequently (not every time through main loop). Computers deal with this problem by using a buffer (a small amount of separate-dedicated memory). The CPU reads & writes to the buffer at high speed. On the other side of the buffer, the data flows in & out at the communication speed. Here's a buffered UART chip.With the right hardware, the same thing can be done with a microcontroller (but I've never built anything like that.). For example, without buffers audio/video would never work on a multitasking computer because the audio/video needs to flow at a nice smooth-constant rate, even when the CPU (and data bus) is interrupted or multitasking. (The operating system is always multitasking, even if you are only running one application.)
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16