Go Down

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


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



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 Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


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


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.


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.


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

Go Up