Pages: [1]   Go Down
Author Topic: What is Arduino development environment doing???  (Read 500 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using PHP to talk to the Arduino but I've noticed something that I'm hoping someone can clue me in on...  If I send code to the Arduino right after the computer boots, then go to my web page, the php code works fine (serial data goes back and forth correctly)  If I just go to the web page without first sending code, then it doesn't work.  The php code sets the baud to 9600 and I've verified this works via stty -F  So, I took a look to see what the settings were before and after code was sent to the arduino and it was changing more than just the speed.  So I wrote a bash script to match the settings and ran that after a fresh reboot and the settings match but the php code still won't work unless I first send the code to the board.  Any thoughts?  Thanks!
Logged

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

Not the dreaded auto-reset screwing things up ?.  I needed to do some jiggery pokery to stop the board resetting every time you fired up a serial connection.....
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well that is part of it.  If I use the resistor trick, it doesn't reset but the communication still won't work.  If I send the code first, then there is no reset and everything works fine even without the resistor.  Everything seems to point to the Arduino environment setting up something when it sends code that I'm not doing.
Logged

0
Offline Offline
Tesla Member
***
Karma: 115
Posts: 8932
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The board reset via the FTDI USB inrerface has good/bad points. Good for program development, bad for infield implementation. You may need to use need to another serial adapter and inverter and communicate with the arduino using the tx/rx pins on the board.  
Logged

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess what I'm trying to figure out is why everything works if I send code first from the Arduino environment and if there is way I can do this via my code.  If I need to I can run the separate pins but it seems like it wouldn't be necessary.
Logged

Pages: [1]   Go Up
Jump to: