Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Add modem example (serialhost) #84

Merged
merged 8 commits into from
Apr 29, 2016

Conversation

ed7coyne
Copy link
Collaborator

Added in #66 but moved here when that was abandoned.

@ed7coyne ed7coyne mentioned this pull request Apr 15, 2016
@ed7coyne
Copy link
Collaborator Author

Only remaining issue was:

@proppy
I think by default we should be using the default Serial so that it work with most board over usb (and thru the Arduino IDE).

@ed7coyne
Hmm I am not sure I agree. If we are showing an example of setting up a SerialHost I think the main serial line should be debug back to the user and we should provide the secondary line as data serial. That way they can easily the sample with other devices (rpi, arduino, etc..), which is the main purpose of the class. Although this may just be my ignorance, are there pins that also access the main serial line? I assumed it only went to usb.
Otherwise we are only demonstrating how to talk to themselves.

@proppy
Copy link
Contributor

proppy commented Apr 16, 2016

Although this may just be my ignorance, are there pins that also access the main serial line? I assumed it only went to usb.

Yes, the usbserial is the same as the regular TX/RX pins. It doesn't seems ESP has more than 1 hardware UART routed to the module (see https://github.com/esp8266/Arduino/blob/633e48f3aec5f1c3c11d4498fc90d378d49e6e9f/cores/esp8266/uart.c#L27) so if we choose other pin, we would be effectively stealing 2 other digital I/O.

Maybe we could interleave the DEBUG message with the main UART port (with a ! prefix so that we can easily discard it) and turn them on and off with a dedicated command.

@ed7coyne
Copy link
Collaborator Author

I don't think stealing 2 other I/O pins are an issue here. The host here is only acting as a gateway to the cloud so it does not need any of it's local i/o pins for anything other than serial.

Interleaving with the main serial link would work but I don't see a lot of value in it. To me the primary usecase here will be debugging interactions with another device, so you connect this modem example on an esp to an Arduino and run it. In that case you want to see the debug output on the PC while it communicates with the Arduino.

@proppy
Copy link
Contributor

proppy commented Apr 27, 2016

I think it would be nice if people could try the modem from the Arduino IDE without connecting an additional board for the first time.

It's a good way to play around with firebase from the Serial Monitor, maybe we could make that a #define they could overwrite when they go to prod?

@ed7coyne
Copy link
Collaborator Author

Alright lets try to make it configurable.

@proppy
Copy link
Contributor

proppy commented Apr 27, 2016

@ed7coyne also feel free to commit as it, if travis is happy about it and just file a bug to make it configurable.

@ed7coyne
Copy link
Collaborator Author

Sounds good, I will open a Issue for it.

Also unless you fixed it in your latest PR Travis is only actually testing the "Push" example. We should extend it to all of the examples.

@proppy
Copy link
Contributor

proppy commented Apr 27, 2016

Yes, since you're adding a new sample this PR should probably add it to the CI :)

@ed7coyne
Copy link
Collaborator Author

Added to travis.

@ed7coyne
Copy link
Collaborator Author

Merging PR based on previous approval.

@ed7coyne ed7coyne merged commit 19e9e9c into FirebaseExtended:master Apr 29, 2016
@ed7coyne ed7coyne deleted the modem-example branch June 17, 2016 16:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants