Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-090
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-090
2021-090
Commits
ba0e7275
Commit
ba0e7275
authored
Nov 26, 2021
by
IT18027334 Thilekarathna P.D.M
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update SensorDataCode.ino
parent
e86f9c81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
SensorDataCode/SensorDataCode.ino
SensorDataCode/SensorDataCode.ino
+11
-1
No files found.
SensorDataCode/SensorDataCode.ino
View file @
ba0e7275
...
...
@@ -60,6 +60,8 @@ void loop() {
float
t
=
dht
.
readTemperature
();
// Read temperature as Fahrenheit
//float f = dht.readTemperature(true);
int
moisture_pin
=
A0
;
// Moisture sensor PIN
int
output_value
;
//read Moisture sensor value
// read the analog in value ADC0
sensorValue
=
analogRead
(
analogInPin
);
...
...
@@ -83,9 +85,17 @@ void loop() {
Serial
.
print
(
t
);
Serial
.
print
(
" °C "
);
String
fireTemp
=
String
(
t
)
+
String
(
"°C"
);
output_value
=
analogRead
(
moisture_pin
);
output_value
=
map
(
output_value
,
1023
,
165
,
0
,
100
);
Serial
.
print
(
" Mositure : "
);
Serial
.
print
(
output_value
);
Serial
.
println
(
"%"
);
String
firebaseMois
=
String
(
output_value
)
+
String
(
"%"
);
Firebase
.
pushString
(
"/DHT11/Humidity"
,
fireHumid
);
//setup path to send Humidity readings
Firebase
.
pushString
(
"/DHT11/Temperature"
,
fireTemp
);
//setup path to send Temperature readings
Firebase
.
pushString
(
"/DHT11/Temperature"
,
fireTemp
);
//setup path to send Temperature reading
Firebase
.
pushString
(
"Mositure"
,
firebaseMois
);
//setup path to send reading Moisture
if
(
Firebase
.
failed
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment