Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with while(modem.available()) when sending messages to Arduino #59

Open
jywarren opened this issue Nov 22, 2016 · 8 comments
Open

Comments

@jywarren
Copy link
Member

Please fill out the following information to help us address the bug you're filing.

Hardware

What board, circuit/shield, and smartphone/laptop are you using?

Using a SoftModem shield (pins 3 and 6, standard) plus an iMac with a 4=>3 pin splitter.

Software

  • What Arduino sketch, web browser, and WebJack profile are you using?

Default https://publiclab.github.io/webjack/examples/

For debugging purposes, i also used this recording: https://www.youtube.com/watch?v=GtJW1Dlt3cg

  • Include any error messages that occurred

I'm just not every receiving anything on the SerialBridge example: https://www.youtube.com/watch?v=GtJW1Dlt3cg

It also doesn't echo out "Listening" when i insert this within the while(modem.available()) loop:

    Serial.print("Listening");

That loop is here: https://github.com/publiclab/webjack/blob/master/sketches/SerialBridge/SerialBridge.ino#L14

I'm not sure why modem.available() isn't triggering... any ideas?

For bug reports, fill out the above template; for feature requests, you can delete the template.

To learn how to write really great issues, which increases the chances they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

@jywarren
Copy link
Member Author

OK - I realized my splitter had microphone and speaker swapped. I can now send from the Arduino to the browser using this program:

https://gist.github.com/jywarren/09d1f93caf7f5e5e4a7dad2cf724bcad

However, I can't seem to send from the browser to the Arduino using that script. Any troubleshooting tips I should watch for?

@rmeister
Copy link
Collaborator

Is it an Arduino Uno?

@jywarren
Copy link
Member Author

jywarren commented Nov 22, 2016

Yes, apologies for forgetting to put that in.

@rmeister
Copy link
Collaborator

I guess you already tried different volume levels?

You could activate debug mode for SoftModem and look if the led blinks when you play/send something from the browser:

#define SOFT_MODEM_DEBUG_ENABLE  (1)

@jywarren
Copy link
Member Author

OK, i'll try to do that, but don't have a computer capable of Arduino IDE at the moment (not at home). I also was able to get Arduino => Nexus 5 (Android) working and Arduino => Chromebook working, but not the reverse for either device.

I'm curious if volume is an issue, because I can hear the Arduino's output (clearly but not loudly) with headphones plugged into the Arduino, and the laptop and phones' output volume is quite a bit louder than that. But I guess the two audio input interfaces are quite different, so who knows.

@jywarren
Copy link
Member Author

And just to be extra sure, you've def. gotten send/receive working using exactly the /sketches/SerialBridge/SerialBridge.ino sketch?

Thanks, Richard!

@rmeister
Copy link
Collaborator

Sorry @jywarren , overlooked your last question. Yes I did.

I see you worked a lot on Webjack last days. I'll take a look at the changes on Thursday or Friday!

@jywarren
Copy link
Member Author

Could be related to #61 -- needs more rigorous testing. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants