Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

ADC Pi Plus - Windows IOT and VB .net

The ADC Pi is an Analogue to Digital converter for the Raspberry Pi

09/09/2016

Posted by:
Phill

Phill Avatar

Hi, I am very new to this and have little programming experance, so please be kind :-)I am trying the connect an ADC Pi Plus to a Pi 3 running Windows IoT and programming in VB.net.Everything is connected and is looking OK, no compile errors, however I end up in an infinite loop waiting for the ADC.connect() to connect.I have checked the ADC power and it has 5v on the supply side, so it is getting all it needs from the Pi.I realise that I am out on the fringe using Windows IoT and VB.net, but is because this is the only language that I have used.The only code samples that I have found are for c# which has not helped too much.Are there some code samples out there for VB that you could point me to?Failing this, does anyone have have a sample of how to connect and read input for the ADC Pi Plus on IoT in VB?Looking forward to any positive response.

09/09/2016

Posted by:
andrew

andrew Avatar

Hi Phill

I am afraid I don't have any experience with VB.net so I will have to do some research and find out why the IoT library isn't working. Hopefully, it will be possible to get the C# version of the library working otherwise I will write a new version in VB.net. It may take me a few days to get it working though as I first need to learn VB.net.

As soon as I get a working library I will upload it to GitHub and post an update on this forum.

10/09/2016

Posted by:
Phill

Phill Avatar

Hi AndrewThank you for helping out.I look forward to your results.

12/09/2016

Posted by:
andrew

andrew Avatar

Hi Phill

I have uploaded a new visual basic.net demo application to our GitHub repository. It contains code for the ADC Pi that you should be able to use to get your own project working.

ABElectronics Win10IOT Libraries

13/09/2016

Posted by:
Phill

Phill Avatar

Hi AndrewThanks for your support.Going through what you have provided has shown me that I really am a novice as I am struggling to understand what you have provided.I was thinking that continuing with VB might cause plenty of challenges with little chance of support or answers in forums, so I have tried to port my code to C#.After a lot of minor changes I managed to compile and run but still couldn't communicate with the board. Not wanting to give up too early, I tried moving the location of where the ADCPi object is created and the connect() method is called.I discovered if the ADCPi object is created in the declaration section before MainPage() and added the Connect() method after the "this.InitializeComponent()" call, I could read the analoge input to 10 decimal places :-).Needless to say, very relieved to have crossed that hurdle, although plenty more to go.Thanks once again.

13/09/2016

Posted by:
Phill

Phill Avatar

Hi AndrewI just re tried my original VB program with a couple of minor mods and it works perfectly.Thanks.Maybe I can go back to my comfort zone of VB ;-)

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