title: Program not running on mac PHP - Terminal - Arduino
body: <p>So basically my bell program has to work on a mac computer now. i configured it an did the stuff. now the problem is that it is sending a value and there is a blink on the Arduino serial led but the led which is supposed to blink the number of times the bell has to ring does not blink. It works when i send value through ide or when i do it on windows. i tried to do it manually though terminal by typing <code>ECHO 2 &gt; /dev/cu.usbmodem1411</code> and still it doesn't happen. If i do <code>screen /dev/tty.usbmodem1411 9600</code> and then type the number manually the light blinks.
  Code:</p>
  
  <pre><code>&lt;?php
  include('database.php');
  $usb_comPort = "/dev/cu.usbmodem1411";
  date_default_timezone_set("Asia/Kolkata");
  $time = date("H:i");
  $time = trim($time);
  $sql = "SELECT bell_amount FROM bell_db WHERE DATE_FORMAT(bell_time,'%H:%i') LIKE '$time'";
  $result = mysqli_query($conn, $sql);
  $numRows = mysqli_num_rows($result);
  if ($numRows == 0) {
    echo 'Error: Nothing found!';
  } else {
    $row = mysqli_fetch_assoc($result);
    $bellAmount = $row['bell_amount'];
    $runCommand = "ECHO " . $bellAmount . " &gt; $usb_comPort";
    echo $runCommand;
    exec($runCommand);
  }
  ?&gt; 
  </code></pre>
  
  <p>^^My program is in php. It sends value to Arduino through serial port which reads it and blinks a led those no. of times. I am using Xampp for apache and Mysql for database. So Whats happening? <BR>P.S.<br>
  I seriously didn't know how to accept answers people so when i got to know i accepted them.</p>