Answer the question
In order to leave comments, you need to log in
How to send and read from serial port at the same time?
Arduino is configured so that if you apply to the Serial Port /dev/ttyACM0
:
1 - turn on the LED
2 - turn off
3 - beeps for 1 second
for them, I use
echo "digit" > /dev/ttyACM0
and now you need to simultaneously apply to arduino - 4 and read the answer as a number that indicates the level of light read from the light sensor.
There is a solution - screen, but I need to send one command to port - 4 and get a response.
Answer the question
In order to leave comments, you need to log in
forum.arduino.cc/index.php?topic=54268.0
3 minutes of google. Call your ISP and ask to unblock Google.
echo 4 > /dev/ttyACM0 && dd if=/dev/ttyACM0 count=1 bs="длина ответа"
Does it bother you that serial is a serial port? You cannot read and send at the same time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question