user38244: I'm fairly new to this and I'm having trouble with a code for a dust sensor. Getting a couple of errors. I downloaded this code from GitHub. 
Anyone have any idea how to fix any of these errors? Any help is appreciated.
Sorry if this formatted wrong, this is also my first post. Thanks for your time
// SDS011 dust sensor example
// -----------------------------
//
// By R. Zschiegner (rz@madavi.de).
// April 2016

#include "SDS011.h"
#include<SoftwareSerial.h>
SoftwareSerial myserial(0, 1);
SDS011(byte pin_rx, byte pin_tx)  
float p10,p25;
int error;


SDS011 my_sds;

void setup() {
  my_sds.begin(0, 1);
  Serial.begin(9600);
  while (!Serial) {
    ;
  }
}

void loop() {
  error = my_sds.read(&p25,&p10);
  if (! error) {
    Serial.println("P2.5: "+String(p25));
    Serial.println("P10:  "+String(p10));
  }
delay(100);
}

here are the errors I'm getting
code:10: error: expected ')' before 'pin_rx'

 SDS011(byte pin_rx, byte pin_tx)  

             ^

C:\Users\Nick\Desktop\code\code.ino: In function 'void loop()':

code:26: error: 'p25' was not declared in this scope

   error = my_sds.read(&p25,&p10);

                        ^

code:26: error: 'p10' was not declared in this scope

   error = my_sds.read(&p25,&p10);

                             ^

exit status 1
expected ')' before 'pin_rx'


user31105: You have to use the begin command. Instead of:
SDS011(byte pin_rx, byte pin_tx)  

...

SDS011 my_sds;

Use
SDS011 my_sds;

(Thus remove the first line: SDS011(byte pin_rx, byte pin_tx)).
And in setup add:
my_sds.begin(0, 1);

This follows the library function of SDS011:
void begin(uint8_t pin_rx, uint8_t pin_tx);

Other errors: because you forgot the ; in
SDS011(byte pin_rx, byte pin_tx) 

the next line:
float p10,p25;

is misinterpreted, and p10 and p25 are not known. Therefore errors are shown while trying to use p10 and p25.
These errors will go when changing the begin code as described earlier.

38244: <p>I'm fairly new to this and I'm having trouble with a code for a dust sensor. Getting a couple of errors. I downloaded this code from GitHub. 
Anyone have any idea how to fix any of these errors? Any help is appreciated.
Sorry if this formatted wrong, this is also my first post. Thanks for your time</p>

<pre><code>// SDS011 dust sensor example
// -----------------------------
//
// By R. Zschiegner (rz@madavi.de).
// April 2016

#include "SDS011.h"
#include&lt;SoftwareSerial.h&gt;
SoftwareSerial myserial(0, 1);
SDS011(byte pin_rx, byte pin_tx)  
float p10,p25;
int error;


SDS011 my_sds;

void setup() {
  my_sds.begin(0, 1);
  Serial.begin(9600);
  while (!Serial) {
    ;
  }
}

void loop() {
  error = my_sds.read(&amp;p25,&amp;p10);
  if (! error) {
    Serial.println("P2.5: "+String(p25));
    Serial.println("P10:  "+String(p10));
  }
delay(100);
}
</code></pre>

<p>here are the errors I'm getting</p>

<pre><code>code:10: error: expected ')' before 'pin_rx'

 SDS011(byte pin_rx, byte pin_tx)  

             ^

C:\Users\Nick\Desktop\code\code.ino: In function 'void loop()':

code:26: error: 'p25' was not declared in this scope

   error = my_sds.read(&amp;p25,&amp;p10);

                        ^

code:26: error: 'p10' was not declared in this scope

   error = my_sds.read(&amp;p25,&amp;p10);

                             ^

exit status 1
expected ')' before 'pin_rx'
</code></pre>
 31105: <p>You have to use the begin command. Instead of:</p>

<pre><code>SDS011(byte pin_rx, byte pin_tx)  

...

SDS011 my_sds;
</code></pre>

<p>Use</p>

<pre><code>SDS011 my_sds;
</code></pre>

<p>(Thus remove the first line: SDS011(byte pin_rx, byte pin_tx)).</p>

<p>And in setup add:</p>

<pre><code>my_sds.begin(0, 1);
</code></pre>

<p>This follows the library function of SDS011:</p>

<pre><code>void begin(uint8_t pin_rx, uint8_t pin_tx);
</code></pre>

<p>Other errors: because you forgot the ; in</p>

<pre><code>SDS011(byte pin_rx, byte pin_tx) 
</code></pre>

<p>the next line:</p>

<pre><code>float p10,p25;
</code></pre>

<p>is misinterpreted, and p10 and p25 are not known. Therefore errors are shown while trying to use p10 and p25.</p>

<p>These errors will go when changing the begin code as described earlier.</p>
