Netduino home hardware projects downloads community

Jump to content

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


Member Since 07 Aug 2015
Offline Last Active Jun 22 2016 02:39 PM

Topics I've Started

How to communicate to your PC using the serial port?

22 June 2016 - 02:34 PM

I can't seem to get Serial Communication with USB working. To clarify my problem, here is the code on my netduino 3


public class Program
        static SerialPort _serial;
        private static Lcd _lcd;
        public static void Main()
            _serial = new SerialPort(SerialPorts.COM1, 9600, Parity.None, 8, StopBits.One);
            _serial.DataReceived += _serial_DataReceived;

            var lcdProvider = new GpioLcdTransferProvider(Pins.GPIO_PIN_D12,    // RS
                                                        Pins.GPIO_PIN_D11,    // ENABLE
                                                        Pins.GPIO_PIN_D5,     // DB4
                                                        Pins.GPIO_PIN_D4,     // DB5
                                                        Pins.GPIO_PIN_D3,     // DB6
                                                        Pins.GPIO_PIN_D2);    // DB7

            _lcd = new Lcd(lcdProvider);

            _lcd.Begin(20, 2);
            _lcd.SetCursorPosition(0, 1);

            _lcd.SetCursorPosition(0, 1);

            while (true)
                _lcd.SetCursorPosition(0, 0);


        private static void _serial_DataReceived(object sender, SerialDataReceivedEventArgs e)

            // create a single byte array
            byte[] bytes = new byte[1];

            // as long as there is data waiting to be read
            while (_serial.BytesToRead > 0)
                // read a single byte
                _serial.Read(bytes, 0, bytes.Length);
                // send the same byte back

                _serial.Write(bytes, 0, bytes.Length);

                string data = Convert.ToBase64String(bytes);



and this is the code on the PC application that's running:


public partial class MainWindow : Window
        private SerialPort serial;

        public MainWindow()
            AssettoCorsa assettoCorsa = new AssettoCorsa();
            assettoCorsa.PhysicsUpdated += AssettoCorsa_PhysicsUpdated;

            serial = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
            serial.DataReceived += Serial_DataReceived;


        private void Serial_DataReceived(object sender, SerialDataReceivedEventArgs e)
            // wait a little for the buffer to fill

            // create an array for the incoming bytes
            byte[] bytes = new byte[serial.BytesToRead];
            // read the bytes
            serial.Read(bytes, 0, bytes.Length);
            // convert the bytes into a string
            string line = System.Text.Encoding.UTF8.GetString(bytes);

            // write the received bytes, as a string, to the console
            System.Console.WriteLine("echo: " + line);

        private void AssettoCorsa_PhysicsUpdated(object sender, PhysicsEventArgs e)
            Console.WriteLine(e.Physics.Gear + @"-------" + e.Physics.SpeedKmh);
            if (serial.IsOpen)

But when I send data, nothing happens on the Netduino. The ports are open though


No response from device

21 October 2015 - 09:36 AM

I'm trying to update my Netduino Mini to the latest firmware but I think the topic is quite outdated.

?The link on how to "Flash TinyBooterDecompressor.bin using SAM-BA v2.12+" does not work anymore, and when I do something with MFDeploy all I get is that my device is not responding. I can connect, but can't get my Device Capabilities, or deploy the tiny clr files.


?Is there an updated tutorial on how to upgrade?

A few questions about the Netduino 3 Wifi

07 August 2015 - 07:14 PM

Hello, I recently bought the Netduino 3 Wifi and I have a few questions about it. This is my first Netduino device so please excuse me if my questions sound a bit noobish.
1. Is it possible to do P2P communication using Wifi? I'd like to send commands directly to it with my phone.

2. How do I make it connect to my Wifi network at home (WPA and AES). I tried using MFDeploy but for some reason it cannot get a correct IP address. I think there must be something wrong with my settings. I chose WPA and PEAP (Im not sure about that one).

3. Is there a site where I can find a bunch of samples? I looked a bit on the forum but I couldn't find any specifically for the 3 Wifi version.

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.