Go Down

Topic: Serial over USB WITHOUT restart? (using #echo) (Read 1 time) previous topic - next topic

wyager

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).

Coding Badly


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

zoomkat

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.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

wyager

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

pluggy

#4
Dec 30, 2010, 07:05 pm Last Edit: Dec 30, 2010, 07:09 pm by stephen_t Reason: 1
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.
http://pluggy.is-a-geek.com/index.html

mrmeval

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.

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

Graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

Go Up