I get some compile/link errors that refer to line numbers in my source file that seem to be 100% unrelated to the problem. I understand well how syntax errors (such as missing delimiters etc) in one place are often only caught later in the code.. but this does not seem to be the case here.
Note how the errors refer to lines 15 and 33 (marked in the code below):
Arduino: 1.8.7 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, WIFI, Only Sketch, 115200"
sketch\smallsteps.ino.cpp.o: In function `printWifiStatus()':
C:\Ard\Ceiling\RemoteSign\smallsteps/smallsteps.ino:15: undefined reference to `RemoteSign::setChannelData(int, char, int, bool)'
sketch\smallsteps.ino.cpp.o: In function `setup':
C:\Ard\Ceiling\RemoteSign\smallsteps/smallsteps.ino:33: undefined reference to `RemoteSign::setChannelData(int, char, int, bool)'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
and here is the code:
#include "ESP8266WiFi.h"
#include "RemoteSign.h"
#include "Ceiling.h"
#define DEFAULT_BRI 80
void printWifiStatus() {
// print the SSID of the network you're attached to:
Serial.print("\nSSID: ");
Serial.print(WiFi.SSID());
// print your WiFi shield's IP address:
IPAddress ip = WiFi.localIP();
Serial.print(" IP Address: ");
Serial.print(ip); // line 15 ==============
// print the received signal strength:
long rssi = WiFi.RSSI();
Serial.print(" signal strength (RSSI):");
Serial.print(rssi);
Serial.println(" dBm");
}
void setup() {
// switch a string of lights to DEFAULT_BRI right away
// setChannel(1,DEFAULT_BRI*10.23);
pinMode(4,OUTPUT);analogWrite(4,800);
Serial.begin(115200);
// get onto wifi
WiFi.begin(ssid, password);
Serial.println(ssid); // throw out network SSID // line 33 ============
while (WiFi.status() != WL_CONNECTED) { delay(250); Serial.print("."); } printWifiStatus();
// switch second string of lights to DEFAULT_BRI after connecting
// setChannel(2,DEFAULT_BRI*10.23);
pinMode(5,OUTPUT);analogWrite(5,800);
// set up RemoteSign
RemoteSign rs;
rs.setCH("{CH}1\21M\21D\r{CH}2\21M\21D\r{CH}3\21M\21D\r{CH}4\21M\r"); // \21 is octal for 17 decimal (DC1)
// define channel data (0 based)
rs.setChannelData(1,'M',4,true); // this is the line with the problem. If I comment it out it compiles.
// rs.setChannelData(2,'M',5,true);
// rs.setChannelData(3,'M',12,true);
// rs.setChannelData(4,'M',13,false);
rs.begin(); // start server listening
}
void loop() {
//rs.run();
} // loop()