Program Resource

Resource libraries for programmers and developers

With board package ESP8266 newer than 2.5.0, declaration of SoftwareSerial like below causes build error.

SoftwareSerial cameraconnection = SoftwareSerial(PIN_D3, PIN_D8);

Above type declaration can be found in sample sketch for Adafruit VC0706 serial jpeg camera.

Resulting error message.

use of deleted function 'SoftwareSerial::SoftwareSerial(const SoftwareSerial&)'

To fix this issue, change declaration to below.

SoftwareSerial cameraconnection(PIN_D3, PIN_D8);

Latest ESP8266 SoftwareSerial library uses EspSoftwareSerial from Peter Lerup; you can also code like below.

SoftwareSerial swserial;
 swserial.begin(9600, SWSERIAL_8N1, PIN_D3, PIN_D8, false, 256);
Print Friendly, PDF & Email

This post is also available in: Japanese

Leave a Reply

Your email address will not be published. Required fields are marked *