arduino-serial
arduino-serial copied to clipboard
getting error message every time
Hi,
Am using your library with an arduino uno. Have set baud rate same between arduino and my pc
Have made tiny change in arduinoserial.py as per below to get it to run on python3: Line 116 was: buf = buf + n
and is now buf = buf + str(n)
but I always get this error: File "/home/vince/ArduinoPython/arduinoserial.py", line 111, in read_until n = os.read(self.fd, 1) BlockingIOError: [Errno 11] Resource temporarily unavailable
I'm sure that the arduino is sending as I've tried the serialmonitor on it
Any ideas? Vince
I think you have kept your Arduino IDE open where the UART port already communicating with your system. So it is showing the resources as busy. First try to stop the Arduino IDE and try the code. It should work. Let me know your findings.
Could you solve your problem. Please update. It helps a lot for me to become confirmed on it.
yes, tested this, it is fixed now Thanks! Vince
On Sun, 3 May 2020 at 22:13, ASHRAFUL HUSSAIN KHAN [email protected] wrote:
Could you solve your problem. Please update. It helps a lot for me to become confirmed on it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wiseman/arduino-serial/issues/2#issuecomment-623183080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVOPU4AXYPWIHXR5ZMIOJLRPXM57ANCNFSM4GHSITIA .
Hello, I'm having this issue but there is nothing else talking to the arduino, and pyserial and the serialmonitor seem to communicate with it just fine. Any idea how I could solve it? Thanks in advance. (I'm under linux mint and with python 3.8)
Getting the same error...
me too. can't connect to serial port. Important to say that I'm trying to connect to a virtual serial port created by a USB 4G modem. Minicom, pyserial, echo works ok.
Please note that the Serial port will be opened only in one place. i.e Arduino IDE, Putty, Minicom, etc., or any other serial terminals you might have. If the serial port is open() ed by any of the serial terminals you will not get access to it unless you properly close the serial connection. Case 1: In case you are using Minicom or any other Unix terminal-based serial monitor then there might be chances that you have not closed the terminal properly. You might have pressed the Ctrl + C or Ctrl + X or Ctrl + Z etc which doesn't close the serial terminal application properly. Instead, use the proper method to close the terminal. For Example: For Minicom use Ctrl + A, then press X to close the terminal. Case 2: You are using pyserial in python or any other serial library based on your choice of programming language. Most probably you have not closed the port properly and trying to open it again. I can comment on this if you could share your code. I can review C, C++, Python, and Rust. But the concept lies the same for all languages. FYI: close() function be used when you open a port.
Bottomline: Use only one application to use the port. Either it is your custom application or a Serial Monitor.