Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

serial port connection PLEASE!!


  • Please log in to reply
7 replies to this topic

#1 dannykyle

dannykyle

    New Member

  • Members
  • Pip
  • 4 posts

Posted 27 June 2012 - 08:46 PM

hello there. i purchased the netduino go thinking that it would be a simple solution for me to take some measurements for a science project i am working on. it is essential for me to be able to interface the device with Wolfram Mathematica, which interfaces directly with dotNET and Csharp. i have been trying for hours and hours and hours now just to get the damned thing connected, and i am ready to throw it out the window. here are the problems: -mathematica will only interface with serial port or a HID USB device....neither of these are available to me with the netduino go. -the serial port on my computer is a socket on the motherboard with no pinout. -i do not know what a "UART" is, but i have been trying to use pins 0 and 1 on the shield base with no success. -i do not code, and so i do not know how to "open up a port" on the netduino. -i barely know anything at all about electronics. i am not opposed to learning any of these things, but i first must get it connected! i just want it CONNECTED! is that too much to ask? (the regular usb connection and my "hello world" first program came out just fine.) ...weren't you saying something about "virtual serial port"? is there any other help you can offer (for dummies)? thank you.

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 June 2012 - 12:06 AM

Hi dannykyle, SerialPort (UART = serialport) is a feature which is supported on the Shield Base if you deploy code to it directly. But if you're just getting started with electronics, I'd avoid that. We'll be adding the capability for the Netduino Go mainboard to use pins D0/D1 on the shield base (currently beta) as a serial port soon as well. Sorry if this has caused you any trouble. In the meantime, let's solve your issue. You have a serial port on your computer... Is it a 9-pin connector coming out the back of your PC (5 pins on top row, 4 pins on bottom row)? Or is it literally just a few pins on the motherboard itself? Chris

#3 JonnyBoats

JonnyBoats

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts
  • LocationPhillips, ME

Posted 28 June 2012 - 02:54 AM

Hi dannykyle,

First off, welcome to the Netduino community. Once you get over your initial frustrations I believe you will have lots of fun learning with your Netduino.

If you find that your computer does not have a serial port connector, don't dispair. Their are other options.

In particular there are USB to serial converters that plug into a USB port on your computer. One thing to be careful of though is the voltage. "standard" serial uses 12 volts which is too high for a Netduino.

This cable might work for you as it uses Netduino compatible voltages: https://www.adafruit.com/products/70

Alternatively this might be even better: FTDI friend There is even a full tutorial on how to use it.

#4 dannykyle

dannykyle

    New Member

  • Members
  • Pip
  • 4 posts

Posted 28 June 2012 - 03:54 AM

thank you both for your replies. i, too, believe that i will really enjoy using this thing once i get over this first bump. i have considered buying another device for interfacing, but i seem to be predisposed to doing things the hard way. on my motherboard there is a 'COM1' rectangular 10 pin (minus one) socket. 5 pins on top, 4 on bottom. like this: http://vip.asus.com/...SLanguage=en-us http://www.frontx.com/cpx102_2b.html i experimented today with pins D0 and D1 on the shield base connected to (what i think are) pins 2 and 3 of this socket. i got some lights and strange characters to come up on the program http://realterm.sourceforge.net/ but i do not know what the pinout is, nor which pins need to be connected, nor how to confirm the connectivity. once all of that is done, i am confident i can trudge through the rest on my own. your help is appreciated. danny

#5 JonnyBoats

JonnyBoats

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts
  • LocationPhillips, ME

Posted 28 June 2012 - 06:23 PM

Danny,

Do you have a volt meter or multimeter?

If so, you should measure the voltage present on your motherboard's pins. Most serial interfaces use 12 volts which is too much for a Netduino. Please be careful.


thank you both for your replies. i, too, believe that i will really enjoy using this thing once i get over this first bump.

i have considered buying another device for interfacing, but i seem to be predisposed to doing things the hard way.

on my motherboard there is a 'COM1' rectangular 10 pin (minus one) socket. 5 pins on top, 4 on bottom. like this:

http://vip.asus.com/...SLanguage=en-us
http://www.frontx.com/cpx102_2b.html

i experimented today with pins D0 and D1 on the shield base connected to (what i think are) pins 2 and 3 of this socket. i got some lights and strange characters to come up on the program http://realterm.sourceforge.net/

but i do not know what the pinout is, nor which pins need to be connected, nor how to confirm the connectivity.


once all of that is done, i am confident i can trudge through the rest on my own.


your help is appreciated.


danny



#6 dannykyle

dannykyle

    New Member

  • Members
  • Pip
  • 4 posts

Posted 29 June 2012 - 12:13 PM

thanks for the warning! i had been measuring the DC volts during my testing and noted around 7vDC several times. i have just got a blinking LED on both of those pins, tho, so they are not blown up. i have decided to move forward with learning the basics of programming this device. although the commands will be somewhat different when i get it working in mathematica, i susepect that they will be more or less the same. so for now i will just hope that the solution will present itself when i am fully ready to integrate the go! into my project. thanks for the help, johnny

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 June 2012 - 01:32 AM

dannykyle -- from your measurements, it sounds like the serial pins are probably RS232 level (which use opposite negative and positive voltages). With that, you'd want to connect them through an RS232 level shifter chip. Chris

#8 vele0011

vele0011

    New Member

  • Members
  • Pip
  • 1 posts

Posted 07 August 2012 - 12:53 AM

Hi I seem to have trouble with the uart as well. I have my netduino rx and tx connected to a xbee using sparkfun's xbee explorer. I tried connecting the xbee to a com port, as well as trying to have it talk to another xbee. Still not luck? Any suggestions? using System; using System.Net; using System.Text; using System.Net.Sockets; using System.IO.Ports; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.NetduinoPlus; namespace uart_test { public class Program { public static void Main() { SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One); port.Open(); string message = "Hello World"; //Debug.Print("Com opened"); byte[] bytes = Encoding.UTF8.GetBytes(message); while (true) { port.Write(bytes, 0, bytes.Length); Thread.Sleep(1000); port.Close(); } } } }




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.