LowPowerLab Forum

Hardware support => General topics => Topic started by: odiephd on February 25, 2017, 02:00:02 PM

Title: Compiling errors w/CO2 sensor [with solution]
Post by: odiephd on February 25, 2017, 02:00:02 PM
Got my new Motes, installed new libraries for CO2 sensor integration from https://github.com/SandboxElectronics/NDIR/tree/master/NDIR_SoftwareSerial.  I am getting a compiling warning and a compiling error as follows:

warning: unused parameter 'CTLbyte' [-Wunused-parameter]

     virtual void interruptHook(uint8_t CTLbyte) {};

************************

In file included from C:\Users\Odiephd\Documents\Cell Safe\Moteino\Node_HP_CO2\Node_HP_CO2\Node_HP_CO2.ino:32:0:

C:\Users\Odiephd\Documents\Arduino\libraries\NDIR_SoftwareSerial/NDIR_SoftwareSerial.h:35:9: error: 'SoftwareSerial' does not name a type

         SoftwareSerial serial;

*************************

I've searched the internet for the errors but I don't understand how to fix it.  I am not sure what is going on.   I attached my sketch.

Thanks in advance for your help.
Jim
Title: Re: Compiling errors w/CO2 sensor
Post by: LukaQ on February 25, 2017, 02:46:10 PM
I read something about...

will link it in after I find it again
http://stackoverflow.com/questions/3608305/class-name-does-not-name-a-type-in-c


but you need to do is swap:
#include <SoftwareSerial.h>
#include <NDIR_SoftwareSerial.h>


Build options changed, rebuilding all

Sketch uses 14,124 bytes (44%) of program storage space. Maximum is 31,744 bytes.
Global variables use 1,006 bytes of dynamic memory.
Title: Re: Compiling errors w/CO2 sensor
Post by: odiephd on February 26, 2017, 11:11:13 AM
Swapping the libraries worked.  I looked back at the github example, and they were in the correct order. 

Thank you!