Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8b24d4c

Browse files
committed
merged
2 parentsa200702 +7d476b8 commit8b24d4c

18 files changed

+711
-161
lines changed

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
[![Build Status](https://travis-ci.org/googlesamples/firebase-arduino.svg?branch=master)](https://travis-ci.org/googlesamples/firebase-arduino)
44
[![Join the chat athttps://gitter.im/googlesamples/firebase-arduino](https://badges.gitter.im/googlesamples/firebase-arduino.svg)](https://gitter.im/googlesamples/firebase-arduino?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
[![Documentation Status](https://readthedocs.org/projects/firebase-arduino/badge/?version=latest)](http://firebase-arduino.readthedocs.io/en/latest/?badge=latest)
6+
57

68
This sample shows how to call[Firebase](https://www.firebase.com/) from the[ESP8266 Arduino core](https://github.com/esp8266/Arduino).
79

‎README.rst‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FirebaseArduino is a library to simplify connecting to the Firebase cloud database from
2+
arduino clients.
3+
4+
It is a full abstraction of Firebase's REST API exposed through C++ calls in a wiring
5+
friendly way. All Json parsing is handled by the library and you may deal in pure C/Arduino
6+
types.
7+
8+
----------------------------------

‎docs/read_the_docs/Doxyfile‎

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
DOXYFILE_ENCODING = UTF-8
2+
PROJECT_NAME = firebase-arduino
3+
PROJECT_NUMBER =
4+
PROJECT_BRIEF =
5+
PROJECT_LOGO =
6+
OUTPUT_DIRECTORY = .
7+
CREATE_SUBDIRS = NO
8+
ALLOW_UNICODE_NAMES = NO
9+
OUTPUT_LANGUAGE = English
10+
BRIEF_MEMBER_DESC = YES
11+
REPEAT_BRIEF = YES
12+
ABBREVIATE_BRIEF = "The $name class" "The $name widget" "The $name file" is provides specifies contains represents a an the
13+
ALWAYS_DETAILED_SEC = NO
14+
INLINE_INHERITED_MEMB = NO
15+
FULL_PATH_NAMES = YES
16+
SHORT_NAMES = NO
17+
JAVADOC_AUTOBRIEF = YES
18+
QT_AUTOBRIEF = NO
19+
MULTILINE_CPP_IS_BRIEF = NO
20+
INHERIT_DOCS = YES
21+
SEPARATE_MEMBER_PAGES = NO
22+
TAB_SIZE = 4
23+
OPTIMIZE_OUTPUT_FOR_C = NO
24+
OPTIMIZE_OUTPUT_JAVA = NO
25+
OPTIMIZE_FOR_FORTRAN = NO
26+
OPTIMIZE_OUTPUT_VHDL = NO
27+
MARKDOWN_SUPPORT = YES
28+
AUTOLINK_SUPPORT = YES
29+
BUILTIN_STL_SUPPORT = NO
30+
CPP_CLI_SUPPORT = NO
31+
SIP_SUPPORT = NO
32+
IDL_PROPERTY_SUPPORT = YES
33+
DISTRIBUTE_GROUP_DOC = NO
34+
SUBGROUPING = YES
35+
INLINE_GROUPED_CLASSES = NO
36+
INLINE_SIMPLE_STRUCTS = NO
37+
TYPEDEF_HIDES_STRUCT = NO
38+
LOOKUP_CACHE_SIZE = 0
39+
EXTRACT_ALL = NO
40+
EXTRACT_PRIVATE = NO
41+
EXTRACT_STATIC = NO
42+
EXTRACT_LOCAL_CLASSES = YES
43+
EXTRACT_LOCAL_METHODS = NO
44+
EXTRACT_ANON_NSPACES = NO
45+
HIDE_UNDOC_MEMBERS = NO
46+
HIDE_UNDOC_CLASSES = NO
47+
HIDE_FRIEND_COMPOUNDS = NO
48+
HIDE_IN_BODY_DOCS = NO
49+
INTERNAL_DOCS = NO
50+
CASE_SENSE_NAMES = NO
51+
HIDE_SCOPE_NAMES = NO
52+
HIDE_COMPOUND_REFERENCE= NO
53+
SHOW_INCLUDE_FILES = YES
54+
SHOW_GROUPED_MEMB_INC = NO
55+
FORCE_LOCAL_INCLUDES = NO
56+
INLINE_INFO = YES
57+
SORT_MEMBER_DOCS = YES
58+
SORT_BRIEF_DOCS = NO
59+
SORT_MEMBERS_CTORS_1ST = NO
60+
SORT_GROUP_NAMES = NO
61+
SORT_BY_SCOPE_NAME = NO
62+
STRICT_PROTO_MATCHING = NO
63+
GENERATE_TODOLIST = YES
64+
GENERATE_TESTLIST = YES
65+
GENERATE_BUGLIST = YES
66+
GENERATE_DEPRECATEDLIST= YES
67+
MAX_INITIALIZER_LINES = 30
68+
SHOW_USED_FILES = YES
69+
SHOW_FILES = YES
70+
SHOW_NAMESPACES = YES
71+
QUIET = NO
72+
WARNINGS = YES
73+
WARN_IF_UNDOCUMENTED = YES
74+
WARN_IF_DOC_ERROR = YES
75+
WARN_NO_PARAMDOC = NO
76+
WARN_FORMAT = "$file:$line: $text"
77+
INPUT = ../../src
78+
INPUT_ENCODING = UTF-8
79+
FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.h *.hxx *.hpp *.h++
80+
RECURSIVE = YES
81+
EXCLUDE_SYMLINKS = NO
82+
EXAMPLE_PATTERNS = *
83+
EXAMPLE_RECURSIVE = NO
84+
FILTER_SOURCE_FILES = NO
85+
SOURCE_BROWSER = NO
86+
INLINE_SOURCES = NO
87+
STRIP_CODE_COMMENTS = YES
88+
REFERENCED_BY_RELATION = NO
89+
REFERENCES_RELATION = NO
90+
REFERENCES_LINK_SOURCE = YES
91+
SOURCE_TOOLTIPS = YES
92+
USE_HTAGS = NO
93+
VERBATIM_HEADERS = YES
94+
CLANG_ASSISTED_PARSING = NO
95+
ALPHABETICAL_INDEX = YES
96+
COLS_IN_ALPHA_INDEX = 5
97+
GENERATE_HTML = NO
98+
HTML_OUTPUT = html
99+
HTML_FILE_EXTENSION = .html
100+
HTML_COLORSTYLE_HUE = 220
101+
HTML_COLORSTYLE_SAT = 100
102+
HTML_COLORSTYLE_GAMMA = 80
103+
HTML_TIMESTAMP = YES
104+
HTML_DYNAMIC_SECTIONS = NO
105+
HTML_INDEX_NUM_ENTRIES = 100
106+
GENERATE_DOCSET = NO
107+
DOCSET_FEEDNAME = "Doxygen generated docs"
108+
DOCSET_BUNDLE_ID = org.doxygen.firebase-arduino
109+
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
110+
DOCSET_PUBLISHER_NAME = Publisher
111+
GENERATE_HTMLHELP = NO
112+
GENERATE_CHI = NO
113+
BINARY_TOC = NO
114+
TOC_EXPAND = NO
115+
GENERATE_QHP = NO
116+
QHP_NAMESPACE = org.doxygen.firebase-arduino
117+
QHP_VIRTUAL_FOLDER = doc
118+
GENERATE_ECLIPSEHELP = NO
119+
ECLIPSE_DOC_ID = org.doxygen.firebase-arduino
120+
DISABLE_INDEX = NO
121+
GENERATE_TREEVIEW = NO
122+
ENUM_VALUES_PER_LINE = 4
123+
TREEVIEW_WIDTH = 250
124+
EXT_LINKS_IN_WINDOW = NO
125+
FORMULA_FONTSIZE = 10
126+
FORMULA_TRANSPARENT = YES
127+
USE_MATHJAX = NO
128+
MATHJAX_FORMAT = HTML-CSS
129+
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
130+
SEARCHENGINE = YES
131+
SERVER_BASED_SEARCH = NO
132+
EXTERNAL_SEARCH = NO
133+
SEARCHDATA_FILE = searchdata.xml
134+
GENERATE_LATEX = NO
135+
LATEX_OUTPUT = latex
136+
LATEX_CMD_NAME = latex
137+
MAKEINDEX_CMD_NAME = makeindex
138+
COMPACT_LATEX = NO
139+
PAPER_TYPE = a4
140+
PDF_HYPERLINKS = YES
141+
USE_PDFLATEX = YES
142+
LATEX_BATCHMODE = NO
143+
LATEX_HIDE_INDICES = NO
144+
LATEX_SOURCE_CODE = NO
145+
LATEX_BIB_STYLE = plain
146+
GENERATE_RTF = NO
147+
RTF_OUTPUT = rtf
148+
COMPACT_RTF = NO
149+
RTF_HYPERLINKS = NO
150+
RTF_SOURCE_CODE = NO
151+
GENERATE_MAN = NO
152+
MAN_OUTPUT = man
153+
MAN_EXTENSION = .3
154+
MAN_LINKS = NO
155+
GENERATE_XML = YES
156+
XML_OUTPUT = xml
157+
XML_PROGRAMLISTING = YES
158+
GENERATE_DOCBOOK = NO
159+
DOCBOOK_OUTPUT = docbook
160+
DOCBOOK_PROGRAMLISTING = NO
161+
GENERATE_AUTOGEN_DEF = NO
162+
GENERATE_PERLMOD = NO
163+
PERLMOD_LATEX = NO
164+
PERLMOD_PRETTY = YES
165+
ENABLE_PREPROCESSING = YES
166+
MACRO_EXPANSION = NO
167+
EXPAND_ONLY_PREDEF = NO
168+
SEARCH_INCLUDES = YES
169+
SKIP_FUNCTION_MACROS = YES
170+
ALLEXTERNALS = NO
171+
EXTERNAL_GROUPS = YES
172+
EXTERNAL_PAGES = YES
173+
PERL_PATH = /usr/bin/perl
174+
CLASS_DIAGRAMS = NO
175+
HIDE_UNDOC_RELATIONS = YES
176+
HAVE_DOT = NO
177+
DOT_NUM_THREADS = 0
178+
DOT_FONTNAME = Helvetica
179+
DOT_FONTSIZE = 10
180+
CLASS_GRAPH = YES
181+
COLLABORATION_GRAPH = YES
182+
GROUP_GRAPHS = YES
183+
UML_LOOK = NO
184+
UML_LIMIT_NUM_FIELDS = 10
185+
TEMPLATE_RELATIONS = NO
186+
INCLUDE_GRAPH = YES
187+
INCLUDED_BY_GRAPH = YES
188+
CALL_GRAPH = NO
189+
CALLER_GRAPH = NO
190+
GRAPHICAL_HIERARCHY = YES
191+
DIRECTORY_GRAPH = YES
192+
DOT_IMAGE_FORMAT = png
193+
INTERACTIVE_SVG = NO
194+
DOT_GRAPH_MAX_NODES = 50
195+
MAX_DOT_GRAPH_DEPTH = 0
196+
DOT_TRANSPARENT = NO
197+
DOT_MULTI_TARGETS = NO
198+
GENERATE_LEGEND = YES
199+
DOT_CLEANUP = YES

‎docs/read_the_docs/conf.py‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
importsys
2+
importos
3+
importshlex
4+
importsubprocess
5+
read_the_docs_build=os.environ.get('READTHEDOCS',None)=='True'
6+
ifread_the_docs_build:
7+
subprocess.call('doxygen',shell=True)
8+
extensions= ['breathe']
9+
breathe_projects= {'firebase-arduino':'xml' }
10+
breathe_default_project="firebase-arduino"
11+
templates_path= ['_templates']
12+
source_suffix='.rst'
13+
master_doc='index'
14+
project=u'firebase-arduino'
15+
copyright=u'2015, firebase-arduino'
16+
author=u'firebase-arduino'
17+
version='1.0'
18+
release='1.0'
19+
language=None
20+
exclude_patterns= ['_build']
21+
pygments_style='sphinx'
22+
todo_include_todos=False
23+
html_static_path= ['_static']
24+
htmlhelp_basename='firebase-arduinodoc'
25+
latex_elements= {
26+
}
27+
latex_documents= [
28+
(master_doc,'firebase-arduino.tex',u'firebase-arduino Documentation',
29+
u'firebase-arduino','manual'),
30+
]

‎docs/read_the_docs/index.rst‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
..toctree::
2+
:maxdepth:2
3+
.. include:: ../../README.rst
4+
:end-before:----
5+
Class Documentation
6+
===================
7+
.. doxygenclass:: FirebaseArduino
8+
:project:firebase-arduino
9+
:members:
10+
.. doxygenclass:: FirebaseObject
11+
:project:firebase-arduino
12+
:members:
13+
----
14+
This documentation was built using ArduinoDocs_.
15+
.. _ArduinoDocs: http://arduinodocs.readthedocs.org
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
breathe

‎examples/FirebaseDemo_ESP8266/FirebaseDemo_ESP8266.ino‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void loop() {
6868

6969
// get value
7070
Serial.print("number:");
71-
Serial.println((float)Firebase.get("number"));
71+
Serial.println(Firebase.getFloat("number"));
7272
delay(1000);
7373

7474
// remove value

‎examples/FirebaseRoom_ESP8266/FirebaseRoom_ESP8266.ino‎

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,29 @@
2020
#include<ESP8266WiFi.h>
2121
#include<FirebaseArduino.h>
2222

23-
// Set these to run example.
24-
#defineFIREBASE_HOST"example.firebaseio.com"
25-
#defineFIREBASE_AUTH"token_or_secret"
26-
#defineWIFI_SSID"SSID"
27-
#defineWIFI_PASSWORD"PASSWORD"
23+
constint grovePowerPin =15;
24+
constint vibratorPin =5;
25+
constint lightSensorPin = A0;
26+
constint ledPin =12;
27+
constint buttonPin =14;
28+
constint fanPin =13;
2829

29-
voidConnectWifi(const String& ssid,const String& password ="") {
30-
if (password !="") {
31-
WiFi.begin(ssid.c_str(), password.c_str());
32-
}else {
33-
WiFi.begin(ssid.c_str());
34-
}
30+
voidsetup() {
31+
Serial.begin(9600);
32+
ConnectWifi(WIFI_SSID, WIFI_PASSWORD);
33+
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
34+
35+
pinMode(grovePowerPin, OUTPUT);
36+
digitalWrite(grovePowerPin, HIGH);
37+
38+
pinMode(vibratorPin, OUTPUT);
39+
pinMode(lightSensorPin, INPUT);
40+
pinMode(ledPin, OUTPUT);
41+
pinMode(buttonPin, INPUT);
42+
pinMode(fanPin, OUTPUT);
3543

44+
// connect to wifi.
45+
WiFi.begin("SSID","PASSWORD");
3646
Serial.print("connecting");
3747
while (WiFi.status() != WL_CONNECTED) {
3848
Serial.print(".");
@@ -41,42 +51,28 @@ void ConnectWifi(const String& ssid, const String& password = "") {
4151
Serial.println();
4252
Serial.print("connected:");
4353
Serial.println(WiFi.localIP());
44-
}
45-
46-
voidsetup() {
47-
Serial.begin(9600);
48-
ConnectWifi(WIFI_SSID, WIFI_PASSWORD);
49-
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
50-
51-
// power grove connector
52-
pinMode(15, OUTPUT);
53-
digitalWrite(15, HIGH);
5454

55-
// pin 5 is connected to a vibrator motor.
56-
pinMode(5, OUTPUT);
57-
// pin A0 is connected to a light sensor.
58-
pinMode(A0, INPUT);
59-
// pin 12 is connected to a red LED.
60-
pinMode(12, OUTPUT);
61-
// pin 14 is connected to a push button.
62-
pinMode(14, INPUT);
63-
// pin 13 is connected to a fan.
64-
pinMode(13, OUTPUT);
55+
Firebase.begin("example.firebaseio.com","secret_or_token");
56+
Firebase.set("pushbutton",0);
57+
Firebase.set("sunlight",0);
58+
Firebase.set("redlight",0);
59+
Firebase.set("cooldown",0);
60+
Firebase.set("brrr",0);
6561
}
6662

6763
int button =0;
6864
float light =0.0;
6965

7066
voidloop() {
71-
digitalWrite(12, (int)Firebase.get("redlight"));
72-
digitalWrite(13, (int)Firebase.get("cooldown"));
73-
digitalWrite(5, (int)Firebase.get("brrr"));
74-
int newButton =digitalRead(14);
67+
digitalWrite(ledPin,Firebase.getInt("redlight"));
68+
digitalWrite(fanPin,Firebase.getInt("cooldown"));
69+
digitalWrite(vibratorPin,Firebase.getInt("brrr"));
70+
int newButton =digitalRead(buttonPin);
7571
if (newButton != button) {
7672
button = newButton;
7773
Firebase.set("pushbutton", button);
7874
}
79-
float newLight =analogRead(A0);
75+
float newLight =analogRead(lightSensorPin);
8076
if (abs(newLight - light) >100) {
8177
light = newLight;
8278
Firebase.set("sunlight", light);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp