+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Newbie level 6
    Points: 227, Level: 2

    Join Date
    Dec 2011
    Posts
    12
    Helped
    0 / 0
    Points
    227
    Level
    2

    sending data through USB port

    My problem is that I would like to send the data from a C# or C++ interface in Windows through the USB port and then display the result on the board's LED display ., I'm inexperienced in C#/C++ programming, I would like some hints on:
    1. which is better for my project: C# or C++ ?
    2. how can I send data through the USB port to arduino?

    plz reply., its urgent., thnx

    •   AltAdvertisment

        
       

  2. #2
    Member level 2
    Points: 2,209, Level: 10
    wavelet1208's Avatar
    Join Date
    Oct 2011
    Posts
    52
    Helped
    11 / 11
    Points
    2,209
    Level
    10

    Re: sending data through USB port

    I use C# programming,it's so easy to communicate PC if you use USB HID.but arduino i do't know how to do it.Notlongbefore i desigen a 32X32 RGB led matrix display.Use C#,USB HID too.



    •   AltAdvertisment

        
       

  3. #3
    Advanced Member level 1
    Points: 3,537, Level: 13
    Achievements:
    Created Blog entry 7 years registered
    poorchava's Avatar
    Join Date
    May 2009
    Location
    Wrocław, Poland
    Posts
    429
    Helped
    73 / 73
    Points
    3,537
    Level
    13
    Blog Entries
    3

    Re: sending data through USB port

    Out of curiosity: how do do USB hid communication in C#? I've done that for my masters thesis using some 3rd party library from Codeproject but had some issues with it (i.e. not working with 64-bit OS). I can imagine that it is simple is device operates in CDC mode emulating a virtual serial port, but otherwise i have no idea.

    Arduino uses FT232 or similar chip so it is also virtual serial port which means it is easy (unless there are some restrictions from arduino firmware side, i dunno since I've never used arduino)



    •   AltAdvertisment

        
       

  4. #4
    Newbie level 6
    Points: 227, Level: 2

    Join Date
    Dec 2011
    Posts
    12
    Helped
    0 / 0
    Points
    227
    Level
    2

    Re: sending data through USB port

    can you give me sample code on how to do it using C#?



  5. #5
    Member level 2
    Points: 2,209, Level: 10
    wavelet1208's Avatar
    Join Date
    Oct 2011
    Posts
    52
    Helped
    11 / 11
    Points
    2,209
    Level
    10

    Re: sending data through USB port

    ok,maybe this example is you interested A USB HID Component for C# - CodeProject®
    the code:usb_hid.zip.
    Last edited by wavelet1208; 11th January 2012 at 01:52.



    •   AltAdvertisment

        
       

  6. #6
    Advanced Member level 1
    Points: 3,537, Level: 13
    Achievements:
    Created Blog entry 7 years registered
    poorchava's Avatar
    Join Date
    May 2009
    Location
    Wrocław, Poland
    Posts
    429
    Helped
    73 / 73
    Points
    3,537
    Level
    13
    Blog Entries
    3

    Re: sending data through USB port

    This exactly what i have used. I works quite ok at low speeds (64kB/s) and only in 32-b bit systems.



--[[ ]]--