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

How to get start creating C# driver for Netduino


  • Please log in to reply
3 replies to this topic

#1 embarus

embarus

    New Member

  • Members
  • Pip
  • 6 posts
  • LocationThailand

Posted 29 July 2012 - 07:30 AM

Hello everyone I wonder if I want to plug some Arduino Sheild with Netduino and the example code show only C code. How can I start writing C# driver since I can not find any article for getting start with creating driver for Netduino. Please could you give me some suggestion, resource, simple code or example to create simple driver for C#. Maybe example for https://www.sparkfun.com/products/255 driver. Thank you.


codesanook.com my blog written in Thai language


sonsod.com live and online computer institute

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 29 July 2012 - 07:52 AM

A piece of hardware, like that LCD, has a datasheet explaining how it should be driven. Most hardware uses protocols like I²C, SPI, UART, Onewire, etc. A driver is just a class in C# that communicates with the right pins and the right protocol. I wrote a lot of drivers myself, open source. For the display; please check out http://netmftoolbox....ware.Hd44780Lcd If you download the whole package, you can see how drivers can be written.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 embarus

embarus

    New Member

  • Members
  • Pip
  • 6 posts
  • LocationThailand

Posted 29 July 2012 - 08:11 AM

Hi Stefan. Thank you very much for fast reply. Your suggestion is very useful. I just only understand how to connect external device with protocol provided (I²C, SPI, UART, Onewire etc) and get device spec from data sheet.


codesanook.com my blog written in Thai language


sonsod.com live and online computer institute

#4 Nico

Nico

    New Member

  • Members
  • Pip
  • 9 posts
  • LocationBuenos Aires - Argentina

Posted 29 July 2012 - 04:43 PM

Hi embarous,

If you want to keep things as easy as possible, I'd humbly suggest to switch to a Serial Enabled 16.x LCD. You'll only need to write a driver that internally just deals with UART and the most important thing: avoid using lots of IO... :)
"Just by looking how time goes by through patient eyes, will make no sense. Go ahead and do it..."
"Ver como el tiempo pasa a través de tus pacientes ojos no tiene sentido. Ve y hazlo..."




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.