Issues with Arduino

Recommend this page to a friend!

      PHP Serial  >  All threads  >  Issues with Arduino  >  (Un) Subscribe thread alerts  
Subject:Issues with Arduino
Summary:/dev/ttyUSB0 permission and non reading of first sample...
Messages:4
Author:franziski
Date:2009-01-24 08:24:41
Update:2009-01-25 17:40:09
 

  1. Issues with Arduino   Reply   Report abuse  
Picture of franziski franziski - 2009-01-24 08:24:42
I'm reading a temperature with Arduino.

A PHP page, through phpserial, reads the current temp value sampled by Arduino, by mean of USB port (FT232 chip).

The first issue is that I have, every time I connect Arduino, to set up again /dev/ttyUSB0 permission to 777 (otherwhise phpserial doesn't work).

The second issue is that on the first loading of PHP page print "0" instead the current temperature...the next loading, instead, was ok also if sometime and randomly the "0" happens again.

Then I tried to make an array of 30...40 reading (by mean of a for loop) and I noticed that the first 3-4 reading are lost (print "0").

I traced serial stream and noticed that the data was correctly sent from Arduino to PC...

My OS is Ubuntu 8.04.

Was wondering If I have to make some mod to phpclasses to workaround above issues.

Thanks in advance.



  2. Re: Issues with Arduino   Reply   Report abuse  
Picture of franziski franziski - 2009-01-25 17:38:00 - In reply to message 1 from franziski
Fixed. For anyone has same issue please read this post:

arduino.cc/cgi-bin/yabb2/YaBB.pl?nu ...

I added a 150 Ohm resistor between +5V and reset pin and now it works.

Anyway it also possible make a mod to phpclasses in order to exec the follwing shell command:


stty .device. -hupcl

I am not able to make it...I tried but with no success

It should added immediately after setting the device.

Thanks again

  3. Re: Issues with Arduino   Reply   Report abuse  
Picture of franziski franziski - 2009-01-25 17:39:04 - In reply to message 2 from franziski
my mistake

stty -F .$device. -hupcl

  4. Re: Issues with Arduino   Reply   Report abuse  
Picture of franziski franziski - 2009-01-25 17:40:09 - In reply to message 3 from franziski
for the permission issue just add user that runs apache (typical www-data) to dialout group.

 
For more information send a message to info at phpclasses dot org.