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

Firebase serial #71

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

proppy
Copy link
Collaborator

@proppy proppy commented Apr 2, 2016

A simpler API inspired by https://konekt.io/ that expose a Serial-port like interface over a firebase path.

  • FirebaseSerial.begin("example.firebaseio.com/path/", "secret")
  • String data = FirebaseSerial.read() will yield event data
  • FirebaseSerial.print(data) will push data to path

We could differentiate between set() and push() w/ the termination of the path:

  • example.firebaseio.com/path/ would append
  • example.firebaseio.com/path would update in place

get() is a subset of stream() because the stream start by yielding event for existing values.

Also address part of #58, and could be a simple API variant for #35 and #66.

TODO

  • handle trailing / to infer push vs set.
  • buffer until \n
  • merge path with url
  • add readString, parseInt, and println(T) overload

/cc @aliafshar @ed7coyne @gguuss @mimming

@proppy
Copy link
Collaborator Author

proppy commented Apr 2, 2016

Currently segfault if we do print() and read() in the same sketch, similar to what was reported with #48

@proppy
Copy link
Collaborator Author

proppy commented Apr 3, 2016

Note: this doesn't crash anymore when using https://github.com/esp8266/Arduino master (esp8266/Arduino@5dd6acc).

// limitations under the License.
//

// FirebaseStream_ESP8266 is a sample that stream bitcoin price from a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment needs updating.

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

Successfully merging this pull request may close these issues.

None yet

2 participants