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.

Flores

Member Since 04 Aug 2010
Offline Last Active Apr 26 2014 06:43 PM
-----

Posts I've Made

In Topic: Serial to PC just wont work, What am I Doing Wrong

06 April 2011 - 08:53 AM

If the cable is the problem, and you want a cheap solution for converting the signals you could use the TI MAX232. Works for me.

In Topic: If you were to get two netduinos to talk to each other, what would you use?

13 January 2011 - 08:55 PM

Connect pin 1 on netduino 1 to pin 2 on netduino 2, pin 2 on netduino 1 to pin 1 on netduino 2, and connect the grounds.

On the sender:

  1:          public static void Main()
   2:          {
   3:              SerialPort port = new SerialPort(SerialPorts.COM1,115200);
   4:              OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
   5:   
   6:              port.Open();
   7:   
   8:              while (true)
   9:              {
  10:                  led.Write(true);
  11:                  port.Write(buff, 0, buff.Length);
  12:                  Thread.Sleep(100);
  13:                  led.Write(false);
  14:                  Thread.Sleep(900);
  15:                  buff = Encoding.UTF8.GetBytes(DateTime.Now.TimeOfDay.ToString());
  16:              }
  17:          }

On the receiver:

  1:          public static void Main()
   2:          {
   3:   
   4:              SerialPort serial = new SerialPort(SerialPorts.COM1, 115200);
   5:              serial.ReadTimeout = 8;
   6:              serial.DataReceived += new SerialDataReceivedEventHandler(serial_DataReceived);
   7:              serial.Open();
   8:              while (true)
   9:              {
  10:   
  11:                  Thread.Sleep(Timeout.Infinite);
  12:              }
  13:   
  14:          }
  15:   
  16:          static void serial_DataReceived(object sender, SerialDataReceivedEventArgs e)
  17:          {
  18:              int bytesReceived = ((SerialPort)sender).BytesToRead;
  19:              byte[] bytes = new byte[bytesReceived];
  20:              ((SerialPort)sender).Read(bytes, 0, bytes.Length);
  21:              string received = new string(System.Text.Encoding.UTF8.GetChars(bytes));
  22:              Debug.Print(received); 
  23:   
  24:          }

In Topic: If you were to get two netduinos to talk to each other, what would you use?

13 January 2011 - 08:48 PM

Serial.. by far the easiest.

In Topic: Shield Request: Self-upgrade shield

07 November 2010 - 08:28 AM

You don't state this directly.. but this would allow upgrades by network, right?

In Topic: Drive more leds with Netduino

30 October 2010 - 01:29 PM

Then you have to use a transistor for each output.

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.