I see no way of adding these assemblies

VS2013 and VB.NET. I’m using the G80 dev board.

I see no way of adding these assemblies; they are not in the list of assemblies in the reference manager.

Assembly: GTM.GHIElectronics.RS232 (4.3.8.1) needs assembly ‘Gadgeteer’ (2.43.1.0)
Assembly: GTM.GHIElectronics.RS232 (4.3.8.1) needs assembly ‘Gadgeteer.Serial’ (2.43.1.0)
Assembly: GTM.GHIElectronics.EthernetENC28 (4.3.8.1) needs assembly ‘Gadgeteer’ (2.43.1.0)
Assembly: GTM.GHIElectronics.EthernetENC28 (4.3.8.1) needs assembly ‘Gadgeteer.SPI’ (2.43.1.0)

=== EDIT ===

FYI -

It turns out I need to Download and install Microsoft .NET Gadgeteer Core.

As a new user, I followed the Download and Install Steps on this page: https://www.ghielectronics.com/support/netmf

I don’t plan to use Gadgeteer (since it’s becoming obsolete) so I skipped step 3
“Step 3 (if you plan on using Gadgeteer)”

You do not need gadgeteer and shouldn’t use it with the dev board. Start a netmf console project and use our netmf beginner’s book on the support page please.

@ Gus - I read “NETMF_for_Beginners.pdf” over the weekend. There is only one mention of RS232 com ports and it’s a link to another doc, “docs/15/uart-serial” which I also read this weekend. I also tried the example in “uart-serial” for Receiving Data. Below is the code.

Line 1:
Dim spObj As New Serialport(“COM2”)
throws an error “Type ‘Serialport’ is not defined” which started the half-day run-around to make it work.

ps - All this code ran in VB.NET. This project is a port for a POS system. The plan is to use the G80 in the OEM hardware design.
pps - Is there a list somewhere that itemizes the objects/assembly relationship so I don’t have to spend hours guessing/trial/error which assemblies to import?
ppps - Also, if I don’t need the Gadgeteer assemblies, what do I need and why is the compiler saying I need it?

=== code ===

Option Explicit On
Option Strict On

Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports System.IO.Ports
Imports System.Text
Imports System.Threading

Namespace testCom
Public Module Module1
Sub Main()
Dim spObj As New Serialport(“COM2”)
End Sub
End Module
End Namespace

You need to add the reference Microsoft.SPOT.Hardware.SerialPort to your project in order to be able to use the SerialPort.

Thanks, that worked for the sample code.

Is there a list somewhere that itemizes the objects/assembly relationship so I don’t have to spend hours guessing (or bug you guys) which assemblies to import?

Thanks. The code compiles and deploys now.

Here is the problem and solution spelled out.

In case someone else’s first first time using serial ports in .NETMF is as frustrating as mine was, I’ve included a link to the problem and solution(I included a postings text for search terms too).

I found this from 2011 here: Serialport.read - Visual Basic Support - Netduino Forums

Hi Bonzo, welcome to the boards :slight_smile: It’s quite confusing, but here it is. The reference is “Microsoft.SPOT.Hardware.SerialPort” But the imports line is “Imports System.IO.Ports” I know they’re not named the same, but that’s how it is.

I’m trying to do a display example. Every relevant display example I’ve found shows this code:


Dim b = New Bitmap(160, 128)
Dim f = Resources.GetFont(Resources.FontResources.NinaB)

… and I get this error:

Error	53	'GetFont' is not a member of 'Serial.Serial.Resources'. 322	21	Serial

Why is this error happening?

btw - The primary function of the app is to read serial com port data.

Imports System
Imports System.Object
Imports System.Text
Imports System.IO.Ports
Imports System.Threading
Imports Microsoft.SPOT
Imports Microsoft.SPOT.Presentation.Media
Imports Microsoft.SPOT.Hardware
Imports Microsoft.VisualBasic.Constants
Imports GHI.Pins.G80
Imports GHI.Processor
Imports GHI.Utilities

I can’t figure out how to add fonts to a VB project, but in a C# project, adding a resource of an appropriate time will then add the getter for that type, so I think that’s what is missing - if you can figure out how to do that, then you should be able to move forward… The IMPORTS for Microsoft.SPOT and SPOT.Presentation.Media should be the two that also give you the graphics components (equivalent to Microsoft.SPOT.Graphics in C#, I think)

To add an embedded resource to a VB Project, you do it exactly the same way as in a C# Project.

VB by default hides the Resources.resx. To see it in the Solution Explorer, you must click the button for Show all files. See attached picture.

Double click on the Resources.resx file and add the required resources and save the Resourcs.resx file.

1 Like

How do I display text in VB.NETMF?

I did include Imports Microsoft.SPOT.Presentation.Media and Imports Microsoft.SPOT.Hardware.

I also included Microsoft.SPOT.Presentation also t no avail.

There MUST be a table somewhere that relates objects to references/extensions. For example, GetFonts needs Reference Microsoft.SPOT.ABC and Imports Microsoft.SPOT.XYZ. I know I can(and did) look through each reference looking for objects, but that’s backwards.

@ scardinale - Thanks for the reply. I clicked on “Show All Files” and there are no resources. I right click in the list and I have the option to add a resource(see attach #1) so I added one. It was named Resource1.resx by default so I left the name.

I had to change to code to: Dim f = Resource1.GetFont(Resource1.FontResources.NinaB) to fix it.

This seems to work. I can’t compile yet because “Colors.Red” doesn’t work in VB (see attach #2).

Any idea how to reference a color in VB? If I change “Colors” to “Color” I have the option for “Black” and “White”(see attach #3). Is this the correct way to do it in VB?

@ Billy -

I found the problem with “colors” in VB.

A reference to Microsoft.SPOT.TinyCore must be made. Somehow I didn’t have to add an another “Imports” line… go figure.

There must be a one stop reference for this new flavor of what reminds me of DLL HELL!

You need to add a reference to Microsoft.SPOT.TinyCore

@ scardinale - Yes, that did it. Thanks.

BTW - Where do I report bad links on the GHI website?
[url]https://www.ghielectronics.com/catalog/product/425#communityShowcases[/url]
Click on any project…

@ Billy - We are removing showcases from the website. Thanks for pointing this out.

There are no bad links in GHI, although some may be misunderstood. ::slight_smile:

@ Gus - I searched the GHI forums and the web for this.

How do I determine, in code and/or in the IDE, how much memory(RAM/Flash) is available in the G80?

quote=“Billy” How do I determine, in code and/or in the IDE, how much memory(RAM/Flash) is available in the G80?
[/quote]
This returns an int that says how many bytes of RAM are available:



The size of your application is displayed after compiling, when you deploy it to your G80:

```cs
Attempting deployment...
Incrementally deploying assemblies to device
Deploying assemblies for a total size of 258712 bytes
Assemblies successfully deployed to device.
1 Like

@ glx - Very handy. Thanks.