Results 1 to 10 of 10

Thread: how to use usb microcontroller on vb

  1. #1

    Thread Starter
    Banned
    Join Date
    Mar 2009
    Posts
    764

    how to use usb microcontroller on vb

    i am talking about this http://usbmicro.com/ device

    1 what namespace referce do i add ?

    2 what imports statement do i use ?

    3 how do i make output input commands ?

  2. #2
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: how to use usb microcontroller on vb

    On here they have examples of programming it using VB6. You'll have to do some conversion.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  3. #3

    Thread Starter
    Banned
    Join Date
    Mar 2009
    Posts
    764

    Re: how to use usb microcontroller on vb

    the link is dead.
    i am using vb 2008 and looking for the simplest way to move a robot

  4. #4
    PowerPoster motil's Avatar
    Join Date
    Apr 2009
    Location
    Tel Aviv, Israel
    Posts
    2,143

    Re: how to use usb microcontroller on vb

    the link is not dead, try again
    * Rate It If you Like it

    __________________________________________________________________________________________

    "Programming is like sex: one mistake and you’re providing support for a lifetime."

    Get last SQL insert ID

  5. #5
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: how to use usb microcontroller on vb

    Look under the menu item: Raw Device Programming and General VB Example. There is no native .NET assembly you can just download and use with this thing.

    If you're looking for something easier that you can use VB.NET with, search for a USB robot controller that has available a .NET assembly for programming. Something like this one. It's cheap too at only $125.
    Last edited by Jenner; Jul 29th, 2009 at 08:14 AM.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  6. #6

    Thread Starter
    Banned
    Join Date
    Mar 2009
    Posts
    764

    Re: how to use usb microcontroller on vb

    thank you jenner

  7. #7
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: how to use usb microcontroller on vb

    Wow, it'd be cheaper to buy a delorean than the gadgets for the Jenner's controller.

    Take a look at the Lego Mindstorms NXT, it's ~2x more expensive but comes with sensors and motors etc. already in the box.

    MS supports it directly also via vb .net:
    http://blogs.msdn.com/coding4fun/arc...6/3902344.aspx
    VB 2005, Win Xp Pro sp2

  8. #8
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: how to use usb microcontroller on vb

    All he wanted was a controller. You can hook up any sensors and motors you want. I would buy the controller I listed. I wouldn't buy any sensors or motors from that site though. Simple industrial sensors and motors are far cheaper.

    Besides, you can't use .NET with Lego Mindstorms. :P
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  9. #9
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: how to use usb microcontroller on vb

    I wrote it as a half joke. The accessories in the lego kit feel a bit like toys but function realistically.

    As to vb .net, nxt very much supports it and no idea what it isn't listed on wikipedia. The second link I provided has vb code. Using the motor for example is as simple as using any class.
    Code:
        If (_state.MotorEnabled) Then
            ' Left/RightWheelPower expects a value from -1.0f to 1.0f.
            ' the Thumbsticks will return a value form -1.0f to 1.0f.  Convenient.
            ' create a request
            Dim req As drive.SetDrivePowerRequest = New drive.SetDrivePowerRequest()
    
            ' assign the values
            req.LeftWheelPower = msg.Body.LeftY
            req.RightWheelPower = msg.Body.RightY
     
           ' post the request
            _drivePort.SetDrivePower(req)
        End If
    VB 2005, Win Xp Pro sp2

  10. #10
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: how to use usb microcontroller on vb

    Oh cool. Heck, you should update the Wiki
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width