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.

vele0011

Member Since 05 Aug 2012
Offline Last Active Nov 18 2012 03:32 AM
-----

Posts I've Made

In Topic: serial port connection PLEASE!!

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(); } } } }

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.