<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 1, 2009, at 5:28 AM, Neil Sutton wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">On Tue, Sep 1, 2009 at 12:02 AM, Charles Lepple<span class="Apple-converted-space">&nbsp;</span><span dir="ltr">&lt;<a href="mailto:clepple@ghz.cc">clepple@ghz.cc</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; padding-left: 1ex; position: static; z-index: auto; "><div class="im">On Aug 31, 2009, at 4:24 PM, Neil Sutton wrote:<br><br><blockquote class="gmail_quote" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; padding-left: 1ex; position: static; z-index: auto; ">In Windows I successfully control the device using VB and issue the commands to control the relays using Convert.ToByte(Int)<br>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.<br>(7) and (8) control another relay.. you get the idea.<br></blockquote><br></div>In that case, you probably want to send 6 and 5, or 7 and 8.<div class="im"><br></div></blockquote><div><span style="color: rgb(51, 51, 255); ">&gt; Would just sending 0x35 via libhid be the equivilent of using .net's Convert.ToByte(5) ?<span class="Apple-converted-space">&nbsp;</span></span><br style="color: rgb(51, 51, 255); "><span style="color: rgb(51, 51, 255); ">&gt; I have really confused myself with how the data should be presented to libhid..</span><span class="Apple-converted-space">&nbsp;</span></div></span></blockquote></div><br><div>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.</div></body></html>