FKainka / NanoESP

New NanoESP Library
19 stars 9 forks source link

Softserial and EnableInterrupts (counting interrupts) for i.e. anemometer, ...... #10

Open f41ardu opened 6 years ago

f41ardu commented 6 years ago

When you plan to use EnableInterrupts for interrupt bases sensors, ie anemometer or other sensor where #include "EnableInterrupt.h" is required NanoESP.h will not work ue to the use of Softwareserial.h. Then use AltSoftserial.h instead.

Modifications required:

Replace In NanoESP.cpp

` wifiConnected() //test if Wifi is connected (by checking IP != 0.0.0.0) */

include "NanoESP.h"

NanoESP::NanoESP(): SoftwareSerial(11, 12) { }`

by

` wifiConnected() //test if Wifi is connected (by checking IP != 0.0.0.0) */

include "NanoESP.h"

include "AltSoftSerial.h"

NanoESP::NanoESP():AltSoftSerial(11,12) { }`

and in NanoESP.h replace

`#include "Arduino.h"

include

class NanoESP : public SoftwareSerial { public: NanoESP() ; `

with

`#include "Arduino.h"

include "AltSoftSerial.h"

class NanoESP : public AltSoftSerial { public: NanoESP() ; `