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

Mifare RFID Example Code With I2C LCD Output


  • Please log in to reply
2 replies to this topic

#1 Bainesbunch

Bainesbunch

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationFrance

Posted 18 January 2012 - 05:15 PM

Hello Folks, Here we have another piece of code that may be of use to other developers. It is basically a class that abstracts the basic functionality of an Mifare RFID reader. The device I have used (YHY502CTG) is self-contained and talks using UART level serial data and reads/writes to all Mifare cards. I have included the data sheet in the zip for reference. The sample application that it is a part of the download simply connects to the reader and requests its software revision and reader ID. It also uses the card present pin to trigger an interrupt that causes the device to start to read the present card. The class raises events when a card id read passing the card ID as a parameter. It also raises events for other things like error trapping and data transfer. It displays the data is reads onto 3 lines of a 4x20 LDC with the adafruites backpack attached talking via the I2C bus. I have used a re-compiled cut down version of the "MicroLiquidCrystal" library that I have included for completeness. It uses the "MCP23008LcdTransferProvider" to interface to tee LCD. The reader I have chosen has a lot more functionality than I have included in my abstraction. I only exposed the bits I needed. Please feel free to use this and if you have a need expand on the additional functions of the reader like electronic purse etc. and post it back. If you have any question please ask me and I will try and answer. Cheers Pete.

Attached Files


I was going to change the world, then I discovered Netduino.
The world will have to wait.

#2 logicalstep

logicalstep

    Member

  • Members
  • PipPip
  • 21 posts

Posted 18 January 2012 - 09:58 PM

Hi Pete, Thanks for the post I was looking into an RFID project myself! Can you tell me how you found programming in VB on the mircro framework? I still torn between learning C# and just going ahead an using VB which I'm more familiar with? Thanks Logicalstep

#3 Bainesbunch

Bainesbunch

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationFrance

Posted 18 January 2012 - 11:30 PM

Hi Pete,

Thanks for the post I was looking into an RFID project myself!

Can you tell me how you found programming in VB on the mircro framework? I still torn between learning C# and just going ahead an using VB which I'm more familiar with?

Thanks

Logicalstep


Hi Logicalstep,

firstly let us start be dispelling a few misunderstandings about VB.

  • VB dates back over 15 years and has been about a lot longer than c#.
  • C and C++ however have been about almost the same time.
  • When MS included it in their first manifestation of Visual Studio it suddenly became accessible to more people.
  • You can create Dlls in VB just search for my other posts where I added to Baxters original post on the CLR.

I am a dedicated VB programmer in the .net arena from asp.net to windows application .NET to .net Compact framework and finally to .NET Micro Framework.

There is very little that you cannot do in VB that you can in c# after all they both compile down to the CLR.

If you need help or pointer on how to do things feel free to drop me a PM or post to this thread.

Cheers Pete.
I was going to change the world, then I discovered Netduino.
The world will have to wait.




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.