[PHP] Serial Comm problem

2012-12-25 Thread Ken Arck
I'm pretty much a php newbie but have been programming for years in other languages Anyway... Using /dev/ttyS0. I need to set the serial port to 9600, send one command to an embedded processor board, then change the baud rate to 57600 and wait for a response. My code is working up to (and in

Re: [PHP] Serial Comm problem

2012-12-25 Thread Ken Arck
At 11:36 AM 12/25/2012, you wrote: The ^ is sent by the remove device with \r\n so I assumed telling fgets to look for one character should be enough but apparently it isn't. <---Sorry but the above is wrong. The ^ is sent by the remove device WITHOUT \r\n Ken -- PHP General Mailing Li

[PHP] Nested loopa

2012-12-25 Thread Ken Arck
So I cannot do nested do loops in php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Nested loopa

2012-12-25 Thread Simon J Welsh
On 26/12/2012, at 1:21 PM, Ken Arck wrote: > So I cannot do nested do loops in php? > > $a = 0 ; > $b = 0 ; > do { > echo "$a\n" ; > do { > echo "$b\n" ; >$b++ > }while($b <=10) ; >$a++; > }while($a <= 20) ; > ?> You can, though you're never resetting the value

[PHP] Re: Nested loopa

2012-12-25 Thread Jim Giner
On 12/25/2012 7:21 PM, Ken Arck wrote: So I cannot do nested do loops in php? Why do you say that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Nested loopa

2012-12-25 Thread Jim Lucas
On 12/25/2012 4:21 PM, Ken Arck wrote: So I cannot do nested do loops in php? You have a typo. Line 8 What are you expecting as output? -- Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php