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 09 Apr 2011
Offline Last Active Jun 16 2011 09:41 AM

Topics I've Started

UART Flow Control

07 June 2011 - 07:59 PM

I have problem with flow control in serialPort. I am using FTDI cabel and I have connected it in this way : Tx<->Rx, CTS <-> RTS.I set handshake as request to send. In uC side I dont recive data because of I want to full up buffer. On PC side I send a lot of data in loop. I expected some error or stop of program on Write method, but PC all the time can to send data though full receiver buffor.
        public static SerialPort RS;
        public static void Main()
            RS = new SerialPort("COM1", 9600);
            RS.Handshake = Handshake.RequestToSend;
            //RS.DataReceived += new SerialDataReceivedEventHandler(RS_DataReceived);

        static void RS_DataReceived(object sender, SerialDataReceivedEventArgs e)
            byte[] inpuBuffer = new byte[RS.BytesToRead];
            RS.Read(inpuBuffer, 0, inpuBuffer.Length);

private static SerialPort RS;       
        static void Main(string[] args)
            RS = new SerialPort("COM3", 9600);
            RS.Handshake = Handshake.RequestToSend;
            RS.WriteTimeout = Timeout.Infinite;
            RS.DataReceived += new SerialDataReceivedEventHandler(RS_DataReceived);
            RS.ErrorReceived += new SerialErrorReceivedEventHandler(RS_ErrorReceived);
            RS.DtrEnable = true;
            RS.RtsEnable = true;

            byte[] bytes = new byte[1024];

            for (int i = 0; i < bytes.Length; i++)
                bytes[i] = (byte)i;

            while (true)
                RS.Write(bytes, 0, bytes.Length);

        static void RS_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
            throw new NotImplementedException();

        static void RS_DataReceived(object sender, SerialDataReceivedEventArgs e)
            //throw new NotImplementedException();

Creating Enum instances using Reflection

29 May 2011 - 11:33 AM

Hi! Is it possible to create an instance of enum by using reflection ? I can't to get access to constructor of my Enum and I can't create it. I tried TypeOfMyEnum.GetConstructor( new Type[]{}), TypeOfMyEnum.GetConstructor( new Type[]{typeof(Int32)}) , TypeOfMyEnum.GetMethod(".ctor")... and result is null

Reflection, Geting property

28 May 2011 - 08:35 AM

Hi! I am trying to get an indexer of ArrayList by reflection. Access to indexer is by property, but I can't to find GetProperty Method. Can somebady help my? I saw using of GetProperty in this post http://forums.netdui...internal-flash/ . I am using Reflection namespace ...

Time conversion between MF and Full .Net

15 May 2011 - 03:01 PM

I have a problem with Time conversion between platforms. I get a Ticks filed from object created in full .Net and then I create new DateTime object in MF using this value. In new object is completely diffrent date and time. Can somebody tell me how to solve this problem?

No description of classes in VS

14 May 2011 - 06:40 AM

Welcome! I have some problem with my Visual Studio. I use VS 2010 express. When I working on Windows Form Aplication I can see class, methods,fields description but if I working on Micro Framework Apllication I can't see this. I have mean description which is generating in xml coments which starts with '///'. I am Sorry for my English. It is not my national language.

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.