Hello
I have the following problem:
Using Arduino 1.5.7 and Yun with OpenWrt 1.2 I can upload my sketch via USB and see my sketch working via serial monitor. However when I disconnect the USB connection then I cannot connect the serial monitor anymore (error: Unable to connect: is the sketch using the bridge?" and my sketch (Adding Data to Google Spreadsheet viaTemboo) is not working.
What am I doing wrong (I'm quite new to the Yun)? I can connect to the Yun Configuration Page - so the Wifi part must be working.
I tried a example sketch (Bridge/Temboo/SendAnEmail) same result. I also tried a sketch (Bridge/SerialTerminal) same result. The sketch is only working when the Port is set to the USB connection dev/cu/usbmodem1411 (Arduino Yun) but it is not working when the Port is set to "Arduino at 192......" .
LEDs "USB" & "ON" are on.
Thanks
Thanks Federico, I saw and read that before but that is not my problem. Maybe I missed something, but isn't the YUN supposed to work independently (without a connection to a computer)? Because my sketch is only working when connected to a computer/mac via USB Port. I don't necessarily have to monitor it via serial monitor but I can see that the sketch is not executed when it doesn't send mails or adding Data to a Google Spreadsheet or whatever the sketch is supposed to do.
Thanks for your patience with a novice
mrmueller:
Thanks Federico, I saw and read that before but that is not my problem. Maybe I missed something, but isn't the YUN supposed to work independently (without a connection to a computer)?
Yes it is and yes, it does. Unless...
Because my sketch is only working when connected to a computer/mac via USB Port. I don't necessarily have to monitor it via serial monitor but I can see that the sketch is not executed when it doesn't send mails or adding Data to a Google Spreadsheet or whatever the sketch is supposed to do.
Thanks for your patience with a novice
I think what Frederico was try to point you at is that with a Yun not connected to a PC, you need to monitor any debugging output via the console (connected over whatever Ethernet connection you have to your Yun, wireless or wired).
And the fact that you say that the sketch is working when connected via serial (USB) connection and seems not to work when this connection doesn't exist, this points to the possibility that you have some code in either the setup() or (start of) the loop() function that waits for a serial connection, as it is common for Arduino sample scripts, something like while(!Serial.available());
which of course will wait forever (and subsequently not execute your sketch as expected) if there isn't a serial/USB connection to your Yun...
Ralf
Indeed.
When having this kind of issues, it's always good to try one of the examples. They work, they have been used and ran by many, it's easy to get support about them, they are a good starting point for making your own sketches.
@Ralf
Thanks, this was exactly where I got wrong.
mrmueller:
@Ralf
Thanks, this was exactly where I got wrong.
Glad to be of service... 8)
Ralf
Quote from: mrmueller on July 16, 2014, 12:11:28 pm
@Ralf
Thanks, this was exactly where I got wrong.
Glad to be of service... smiley-cool
Ralf smiley-wink
+1
this post is gold thank you guys