About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Search
Register or Sign In
Forum

ADC Pi Plus - Windows IOT and VB .net

1312 Views - Created 09/09/2016

09/09/2016

Posted by:
Phill

Users Avatar

Location:
New Zealand

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

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

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.

AB Electronics UK Tech Support

10/09/2016

Posted by:
Phill

Users Avatar

Location:
New Zealand

Hi Andrew

Thank you for helping out.

I look forward to your results.

12/09/2016

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

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.

https://github.com/abelectronicsuk/ABElectronics_Win10IOT_Libraries

AB Electronics UK Tech Support

13/09/2016

Posted by:
Phill

Last edited: 13/09/2016

Users Avatar

Location:
New Zealand

Hi Andrew

Thanks 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

Users Avatar

Location:
New Zealand

Hi Andrew

I 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 ;-)

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.