Pages: [1]   Go Down
Author Topic: Serial over USB WITHOUT restart? (using #echo)  (Read 810 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 5
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, over the past couple days I've learned a good amount of PHP and my first real "project" with it was a way to control my arduino over the web through a web server. I did end up getting it to work well, but I have a problem. The shell script that PHP executes would make use of "echo (value) > /dev/tty.A4400abc" (the value takes the form of $1 and the serial port I just made up, but you get the idea).  However, whenever I echo a value to the arduino's serial port, the whole thing resets and the serial data is lost. This means that I have to use a completely separate serial adapter in order to communicate the values to the arduino. Is there any way to write serial data to the arduino without resetting it from a Unix shell? (specifically an OS X shell, but most commands are portable).
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


http://www.google.com/search?q=disable+arduino+automatic+reset
Logged

0
Offline Offline
Tesla Member
***
Karma: 114
Posts: 8913
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Go to radio shack and get a 100 ohm resistor. When you are ready to block the auto reset, stick one end of the resistor in the 5v pin hole and the other end in the reset pin hole.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

0
Offline Offline
Full Member
***
Karma: 5
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks guys-I was definitely searching for the wrong things. It didn't occur to me to use a pull-up...
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

An alternative to the resistor is a 1-47uF capacitor between gnd and reset.  Its not so picky on value,  so long as its significantly higher than the 100nF auto-reset capacitor. It might hold back the initial start up a little if its too large due to its charging time through the 10k pullup resistor on the reset line.
« Last Edit: December 30, 2010, 01:09:10 pm by stephen_t » Logged


Greenwood, Indiana
Offline Offline
God Member
*****
Karma: 0
Posts: 508
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would activating the pull up on another I/O pin and tying it to reset work?
I'm willing to try it if it won't result in slagged I/O ports.

Logged

If it was designed by man it can be repaired by man.

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8437
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Would activating the pull up on another I/O pin and tying it to reset work?
No because the instant RST is pulled low all IO pins go into high impedance state, and although I haven't checked I would almost bet that the PURs are disabled at that point as well.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: