On Sep 1, 2009, at 5:28 AM, Neil Sutton wrote:

On Tue, Sep 1, 2009 at 12:02 AM, Charles Lepple <[email protected]> wrote:

On Aug 31, 2009, at 4:24 PM, Neil Sutton wrote:

In Windows I successfully control the device using VB and issue the commands to control the relays using Convert.ToByte(Int) The board has 4 relays and by issuing Convert.ToByte(6) for example I can open a single relay, Convert.ToByte(5) closes the relay.
(7) and (8) control another relay.. you get the idea.

In that case, you probably want to send 6 and 5, or 7 and 8.

> Would just sending 0x35 via libhid be the equivilent of using .net's Convert.ToByte(5) ? > I have really confused myself with how the data should be presented to libhid..

I would assume that if the argument to Convert.ToByte() is an integer less than 255, then the C equivalent would be that same integer. I think you would only use 0x35 if you were passing a string "5" to Convert.ToByte(). Someone who actually knows .NET can feel free to correct me, though.
_______________________________________________
libhid-discuss mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss
http://libhid.alioth.debian.org/

Reply via email to