File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,25 @@ void loop()
120
120
121
121
}
122
122
123
+ float conversion25 (long concentrationPM25) {
124
+ double pi = 3.14159 ;
125
+ double density = 1.65 * pow (10 , 12 );
126
+ double r25 = 0.44 * pow (10 , -6 );
127
+ double vol25 = (4 /3 ) * pi * pow (r25, 3 );
128
+ double mass25 = density * vol25;
129
+ double K = 3531.5 ;
130
+ return (concentrationPM25) * K * mass25;
131
+ }
132
+
133
+ float conversion10 (long concentrationPM10) {
134
+ double pi = 3.14159 ;
135
+ double density = 1.65 * pow (10 , 12 );
136
+ double r10 = 0.44 * pow (10 , -6 );
137
+ double vol10 = (4 /3 ) * pi * pow (r10, 3 );
138
+ double mass10 = density * vol10;
139
+ double K = 3531.5 ;
140
+ return (concentrationPM10) * K * mass10;
141
+ }
123
142
124
143
long getPM (int DUST_SENSOR_DIGITAL_PIN) {
125
144
You can’t perform that action at this time.
0 commit comments