Utter newbie blunders on... (was VB and FEZ)

I have had endless problems with the downloading, device recognition in the USB port, and software, partly because the various manuals differ from the exact format of VS 2010 full version (not the Express) but also because I am useless at C#. All those { } bug me! I am very afmiliar with Visual Basic and would really rather use that. Can I use it instead of c# and where will I find any Visual Basic type instructions?

You have problems with setup or using vb?

Is your device connected, showing in device manager and have latest SDK?

From there, can you load unmodified vb console app on your device?

Welcome to the community.

Alan, welcome to the community! v4.2 introduced VB.NET support. So, you can absolutely create your projects in VB. Examples are few and far between. So, you’ll need to at least be able to read C#. .NET is .NET…so, the function calls and all are the same for both languages. Only the decoration is different. Have fun!

If you have specific problems with translating from C# to VB be sure and post your questions. We have at least one VB programmer here that I know of.

Well, blow me down, thats a fantastic response! Thanks for the welcome.

I warn you that Im a rank beginner, except at one or two odd things like editing (one of my professions) and Classic VB6 (although I am converting to VB Dot.net) Id better put together a proper reasoned list of problems but one of them is that the driver cant be found.

Cheers
Alan

OK. Let’s get down to brass tacks. I am a very young 72 (juvenile my wife says…) I was given a spider FEZ kit by my youngest son. I am using W7 64 bit on my laptop and 32 bit on my desktop (I absolutely HATE W8 (just like VISTA, I forecast…) . I want to be able to play with FEZ on either machine. I started computing in the 1980s with BASIC and then QuickBASIC. I am reasonably fluent in VB6 and am learning vb.NET. Sorry, but I do not like c#. All those {} strike me as passports to error.

I am fairly hardware literate, build my own desktops, radios, etc. and if I can get into this I am likely to buy many more modules.

Now the first problem I have is exactly what to download and in what order. Also, what is the latest and best documentation and is it up to date? Little things throw me. For example in ‘Getting started with the FEZ starter kit…’ I am told that after selecting Gadgeteer I should Select Gadgeteer Designer Application, but it is not in the list! Also I cannot seem to get the driver operative.

What I need is an up to date step by step list of instructions. I forecast that after I’ve started to crack these initial problems I will probably be off and running with too much handholding. But I need it now!

It is Sunday midday in Australia and time for a glass of wine (strictly for medicinal purposes, you understand). But I’ll be back in the early hours of tomorrow morning when I shall eagerly devour anything anyone sends to help me.

And one more thing (apart from the fact that I would like to have corrected ‘macine’!). I feel that I should uninstall my attempts so far to download and extract SDKs etc, before starting with a clean slate. I am not sure of the procedure for that.

Yay, another Aussie !

Do you really live in Girilambone?

If so, no wonder you need a medicinal wine or two - anything to set you up for an arvo nap in the heat !

So the simple steps you need to follow will include installing all the standard SDK components in the following: http://www.ghielectronics.com/support/dotnet-micro-framework

This is installation step 2, 3, and 4 (although with a Spider, you can probably ignore step 4 if you really want to but I’d suggest you don’t because you might need the 4.1 framework pieces to fall back on)

Then once you get that working, we need to help make sure you can open Visual Studio and see the C# templates (as there’s been a few hiccups getting the latest SDKs working 100% straight away), and then the last step before taking this over to VB is to update the firmware to the latest 4.2 firmware.

Let us know when you have all that stuff installed and ready to go

Another tip. There’s a little pencil icon above each of your posts - hover over it and it solidifies up. Click it and you can edit your post and correct anything you need.

Oh, and Win8 will not be like Vista; there’s many reasons it’s different but mostly it’s just the same as Win7 except your start menu is smarter (displaying live tiles of information that’s important to you) and takes up all the screen. Mainly it’s just a different way to think about starting your apps, but I do understand that, like any change, it takes time to get used to it - or to decide a change isn’t for you. (disclaimer: yes, I work for Microsoft)

Brett covered most everything for installing. If you want to uninstall everything to start then to go “Programs & Features” in your Control Panel and uninstall…

  1. Everything that starts with “GHI…”.
  2. Microsoft .NET Gadgeteer Core
  3. Microsoft .NET Micro …

I really don’t want to comment on your VB vs. C# remarks because there have been so many threads on the + and - of both. However, if you are coming from VB I would encourage you to give C# a serious look before just giving up on it. The learning curve from VB6 to VB.NET is just as steep as that from VB6 to C#. If you look at the { } as passports to consistency instead of error then I think you’ll learn that it actually makes your code less prone to error. I also started out in VB6. The inconsistent statements for beginning and ending blocks drove me crazy in that language.

In regards to Win8… On a desktop computer, I find that I am almost always in a traditional Win7 type desktop. So, it really isn’t much of a change once you learn just a few new tricks for navigating w/o a Start button. However, on a tablet/Surface Win8 RT is a thing of beauty! Win8 (not RT) & Vista do have one thing in common and that is that they are both definitely evolutionary changes that both feel like they are halfway between and old world and a new. What they don’t have in common, though, is that Vista was terribly buggy. Win8 so far has been almost as solid as Win7 and noticeably faster. Jump on and enjoy the ride!

That’s some son you have. He must have been raised right to be giving out Spiders to his father. Does he also use Gadgeteer?

Thanks both! I’ll give it all a try. I have already ordered c# for dummies. (Youngest) son is 40 and thinks I may not be the idiot he always thought I was… but now is thinking again. He gave up on spider owing to being too busy to unravel it!

OK all. Good progress so far. It seems that previously (when I first wailed for help) I must have slipped up with the installation routine. I have now successfully installed on both my W7 64 bit laptop and my my 32 bit desktop. By successfully, I mean that 1) the EMX device (the mainboard?) shows up in Control panel > devices as OK (ie the driver issue is resolved) and 2) in the Visual Studio IDE I see GHI etc.

Many thanks Brett and the others.

But BTW, I do not see ‘Gadgeteer Designer Application’ (as outlined in one of the help documents) but just ‘Gadgeteer Application (NETMF4.x)’

Assuming that anomaly is OK, I am ready to be pointed at the next stage, ie how to implement a Visual Basic program that (say) flashes a LED on the hardware, or even a c# one but I’d prefer the former.

The reason why I am still floundering a little here is that there are many sets of instructions that purport to tell me how and they all seem to conflict or assume knowledge that is not there. By the way, I do have the full (academic) edition of Visual Studio 2010, rather than Visual Studio Express. That alone means that I do not find things where the instructions say they should be, and that is enough to throw me!

Great news.

Now the #1 check is to make sure your firmware matches the SDK - so if you didn’t already do so, go through the process to update it. That’s the only way to be sure.

Here’s how the “new project” section looks in my VC# Express install - note I don’t have the 4.2 SDK installed like you would, and because of it only being VC# I can’t help with the VB :). I’ve selected the Gadgeteer template type and then I can create a new “.Net Gadgeteer application” from the centre section.

Then the next thing that comes up is the Gadgeteer designer canvas… call it what you will. The toolbox is the piece that shows off the main boards and the devices and that you wire up virtually, then connect them up physically as you did on the designer.

Another of the tabs in the IDE is the program.cs, this is where your code goes, once you have things logically wired up.

What devices did you get in your kit? A button, the smart LED or something??

with vb-express it looks nearly the same…
the code is written in program.vb

very important is to update the firmware becaurse vb only works with the NETMF v4.2

Ok. So, I took this as a challenge and did something I swore I’d never do again…wrote VB code. It was worse than I remembered…


Imports GT = Gadgeteer
Imports GTM = Gadgeteer.Modules

Partial Public Class Program

    Dim WithEvents timer As GT.Timer = New GT.Timer(250)

    Public Sub ProgramStarted()
        Debug.Print("Program Started")
        AddHandler timer.Tick, AddressOf OnTick
        timer.Start()
    End Sub

    Private Sub OnTick(timer As Gadgeteer.Timer)
        Me.PulseDebugLED()
    End Sub

End Class

And just for comparisons sake… Here’s the same thing in C#.


using Microsoft.SPOT;
using GT = Gadgeteer;

namespace CSharpTest
{
    public partial class Program
    {
        void ProgramStarted()
        {
            Debug.Print("Program Started");
            var timer = new GT.Timer(250);
            timer.Tick += timer1 => PulseDebugLED();
            timer.Start();
        }
    }
}

d
OK! Yes, I’ve done the update thing. And I can get a screen like you show, though it is not ‘Gadgeteer Designer Application’ as shown in one of the ‘beginners guides’ that I have seen.
OK on the designer canvas, though why use it if I physically wire up per the allowable sockets?

In my kit I have the main board, the USB power board, an extender board, a USB host, an SD card socket, an ethernet socket board, 2 multicolor led boards, a button board, a Joystick board, a display board and lots of connecting leads.

Thanks. Very useful to see both and I must admit the c# one looks tidier! I’ll study both and try them tomorrow.

The reason you “virtually” wire them up first is that it tells the system where you intend to connect them - it basically reserves the socket for each device you plug in. Then you can physically wire them in the same way, and the pins on the system then logically know they’re talking to a particular device.

OK. So you can’t just connect a ‘Y’ to any ‘Y’? You have to use a particular ‘Y’? In other words you run the graphic first and then follow it. So that would mean that when you run the graphic you haven’t yet plugged in the USB? I say this because apparently the modules should not be connected or disconnected while power is applied.

you can connect a Y module to ANY Y, yes, but your code needs to know what one you connected it to. Same with any X, U, etc etc…

When you hit the designer, you have a handful of modules and a mainboard, none of which need to be connected - even to the PC. Design what you need in the designer, then wire them up as depicted in the designer, and then plug the USB device into the PC.

In all honesty you usually CAN get away with connecting the modules up to the mainboard before you do the virtual wiring in the designer; it’s just that the designer may not allow you to connect it where you did if there’s a reason - a pin conflict for example. Plus, if you get the virtual wiring different to the real thing, then you’re unlikely to get the results you expect.

Thank you for clarifying that, Brett. I also got a direct email from GHI saying that I could use Visual Basic only if the main board ‘supported MF4.2’ I’ve got MF4.2. How can I tell if the mainboard ‘supports’ it? Maybe I will after all be dragged kicking and screaming into C#

This should help GHI Electronics – Where Hardware Meets Software