Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

ABElectronics_Win10IOT_Libraries as base for .net core Library

15/02/2020

Posted by:
kyPi2017

kyPi2017 Avatar

Hi,


Can you advise please on implementing a .net core library - using the Win10IOT Library as reference.

ABElectronics_Win10IOT_Libraries

the code use some "OS specific" libs like:
using Windows.Devices.I2c;
using Windows.Devices.Spi;
using Windows.Devices.Gpio;
and i'm guessing the community may already have a solution for i2c and spi written in .net core
but didint find anything for GPio

Can you please advise on how to implement a .net core Library ?
i have almost all your boards (io, expander, rtc, servo..) so i can test it.

Thanks

15/02/2020

Posted by:
andrew

andrew Avatar

Hi

I found a System.Device.Gpio library that may work for porting our Win10IOT library to .net core.

System.Device.Gpio supports I2C, SPI and GPIO so it should hopefully work as a replacement for the Windows.Devices library.

I don't have a lot of experience with .net core but I will look next week at the feasibility of porting our Win10IOT library to .net core. In theory for all of the I2C-based boards, it should just be a case of updating the ABE_Helpers.cs class to use System.Device.Gpio instead of Windows.Devices.

15/02/2020

Posted by:
kyPi2017

kyPi2017 Avatar

Hi andrew

That good news, thank you for your quick reply and support.

i believe .net core support will be usefull so we can still use debian of RPI but code with C#/.net core

Thank you !

21/02/2020

Posted by:
kyPi2017

kyPi2017 Avatar

Hi Andrew,

do you have any news on porting the asp.net core library ?

THANKS !

21/02/2020

Posted by:
andrew

andrew Avatar

Hi

I am working on it at the moment. So far the ADC Pi and ADC Differential Pi are working. RTC Pi, IO Pi and Servo Pi need testing and the ADC DAC Pi and Expander Pi are still to do.

The documentation for the System.Device.Gpio library is pretty sparse so it is taking a bit longer than expected but hopefully, I should have a working set of libraries for most of our boards sometime next week.

21/02/2020

Posted by:
kyPi2017

kyPi2017 Avatar

That is great news !

I really appreciate what you are doing.

I think this will open new oppurtonities to deploy to rpi.

Many Thanks !

looking forward to use that library when done.

27/02/2020

Posted by:
andrew

andrew Avatar

I have uploaded a new .NET Core library to our GitHub repository at ABElectronics .NetCore Libraries

The new library is mostly the same as the Windows 10 library but I have made a few changes like replacing some of the methods with parameters so you can get the state as well as set the state of some items. I also added the I2C Switch board that we released last year and expanded the RTC and Servo Pi libraries to include some extra functionality.

To give you an example, with the RTC library before there was a SetDate() and ReadDate() method for setting and reading the date. This has now been replaced with a single Date parameter so if you want to set the date you use:


rtc.Date = DateTime.Now;


While reading the date you would use:


DateTime newdate = rtc.Date;


I made the changes to try and simplify some of the functionality and make it easier to use. The readme.md file in the ABElectronicsUK folder contains all of the methods and parameters for every board.

Hopefully, I have found all of the bugs but if you find any please let me know. I will do a bit more testing before uploading it to NuGet.

27/02/2020

Posted by:
kyPi2017

kyPi2017 Avatar

Hi andrew,

I cannot describe in words how excited I am to see the code of the library and tell you how much I appreciate the work you did to create this library.
it's not taken for granted.

I am sure the library will be used a lot by others;
I will spend time next week checking out the library with my raspberry pi (4GB) & ExpanderPi card ,
i also have RTC, IO Pi , ADC , Servo

i'll let you know if i find any issue.

THANKS !!!!! you rock !!!

Moti

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout