title: USB serial communication PHP/ARDUINO under Windows 7
body: <p>I'm working on a project where I need to command an Arduino controller from a coonected PC through the usb port.
  I'am using PHP 5.4 and a the class PhpSerial.php from Rémy Sanchez but there some pb with it.
  for example: this script works good and sends character '3' to arduino but if i change 3 to 1 it won't work anymore ... 0 works 2 no 4 no 5 yes 9 yes ...</p>
  
  <pre><code>&lt;?php
  require("PhpSerial.php");
  $serial = new phpSerial;
  $serial-&gt;deviceSet("COM2");
  $serial-&gt;confParity("none");
  $serial-&gt;confCharacterLength(8); 
  $serial-&gt;confStopBits(1);  
  $serial-&gt;confFlowControl("none");
  $serial-&gt;confBaudRate(9600);
  $serial-&gt;deviceOpen();
  $serial-&gt;sendMessage("3");
  $serial-&gt;deviceClose();
  ?&gt;
  </code></pre>
  
  <p>I tried echo "3" > COM2 and it works and powershell also works good
  Can I fix that pb?
  can I just use exec to launch commands?
  thank you!</p>
  
  <p>update:
  I discovered a strange thing : if i send '2' with ascii code 00110010 i receive 10110010 with the last bit altered!!!</p>