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

Firebase serial #71

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

Conversation

proppy
Copy link
Contributor

@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
Contributor 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
Contributor 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.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants