Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4026064
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:55:26+00:00 2026-05-20T10:55:26+00:00

I have an Arduino microcontroller listening on COM3. Using the arduino IDE and the

  • 0

I have an Arduino microcontroller listening on COM3. Using the arduino IDE and the Serial monitor works fine to send and receive data.

I would like to send and receive data from Python, but it’s not immediately obvious how to do so. (I’d also be fine doing it in C# if it was substantially easier.)

I found arduino_serial.py, but it only works for Unix. Fortunately, I have a Ubuntu 10.10 VBox set up. However, I have no idea if that VM can access serial ports or if special steps are required to do so.

I also found pySerial, which looks pretty legitimate. However, I’m also unsure how to use it. It wants serial port names. How do I find out what valid values for these are?

For example, pySerial mentions that you can “Open named port at “19200,8,N,1”, 1s timeout” with the following command:

>>> ser = serial.Serial('/dev/ttyS1', 19200, timeout=1)

But I have no idea how you would know that /dev/ttyS1 was a valid port name.

Is there good documentation for getting started on this?

Update: I’m using Ubuntu with arduino_serial, but still having trouble.

This program is running on the Arduino:

void setup() { 
  Serial.begin(9600);
}

void loop() { 
  if (Serial.available()) {
    Serial.print((char)Serial.read());
  }
}

I see that a port called tty0 is available:

foo@bar:~/baz$ dmesg | grep tty
[    0.000000] console [tty0] enabled

I then try to connect with arduino_serial:

foo@bar:~/baz$ sudo python
[sudo] password for foo: 
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import arduino_serial
>>> sp = arduino_serial.SerialPort("/dev/tty0", 9600)
>>> sp.write("foo")
>>> sp.read_until("\n")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "arduino_serial.py", line 107, in read_until
    n = os.read(self.fd, 1)
OSError: [Errno 11] Resource temporarily unavailable

Why am I getting this error? What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:55:27+00:00Added an answer on May 20, 2026 at 10:55 am

    I have a project called Yaam on CodePlex that uses C# to send data through the serial port. Check that out for an example. On the C# side (see Yaam\Yaam.xaml.cs), simply use the SerialPort class in the System.IO.Ports namespace. Once you instantiate the object and set the properties (baud rate, com port, etc), simply call.Open() . There are also plenty of other examples on the web. Take a look at these:

    • http://jtoee.com/2009/02/talking-to-an-arduino-from-net-c/
    • http://www.instructables.com/id/Interfacing-your-arduino-with-a-C-program/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to read serial data from my Arduino using Java. I have followed
I am fetching data from the following database: I have arduino-box that send that
I have a problem automagically detecting my Arduino's serial port in Python, using Mac/Linux.
I have an Arduino board connected to my PC's serial port. The board sends
I have the following code on my Arduino that constantly checks for a serial
I have to connect the Arduino board I got with Java and get data
I have Firmata working fine on an Arduino Uno, communicating over cable USB to
I have a Python script that writes data packets to an Arduino board through
I have an Arduino Duemilanove on which I would like to use the internal
Currently our application connects to an Arduino over a serial port. We send some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.