You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for this nice piece of work to provide a good driver for the SSD1306.
I'm having an issue when trying to compile it along with the M.Schwarz aREST library (see https://github.com/marcoschwartz/aREST) to use it for a ESP8266 domotic project.
It seems there is a conflict problem at compilation time, but I'm not sure it is coming from Marco's library or from this one. To reproduce, install aREST library and try to integrate one of your sample code in the example files from Marco, like the one below:
/*
This a simple example of the aREST Library for the ESP8266 WiFi chip.
See the README file for more details.
Written in 2015 by Marco Schwartz under a GPL license.
*/
// Import required libraries
#include <ESP8266WiFi.h>
#include <aREST.h>
#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"`
// Include the UI lib
#include "OLEDDisplayUi.h"
SSD1306 display(0x3c, D3, D5);
OLEDDisplayUi ui ( &display );
// Create aREST instance
aREST rest = aREST();
// WiFi parameters
const char* ssid = "your_wifi_network_name";
const char* password = "your_wifi_network_password";
// The port to listen for incoming TCP connections
#define LISTEN_PORT 80
// Create an instance of the server
WiFiServer server(LISTEN_PORT);
// Variables to be exposed to the API
int temperature;
int humidity;
// Declare functions to be exposed to the API
int ledControl(String command);
void setup(void)
{
// Start Serial
Serial.begin(115200);
// Init variables and expose them to REST API
temperature = 24;
humidity = 40;
rest.variable("temperature",&temperature);
rest.variable("humidity",&humidity);
// Function to be exposed
rest.function("led",ledControl);
// Give name & ID to the device (ID should be 6 characters long)
rest.set_id("1");
rest.set_name("esp8266");
// Connect to WiFi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
// Start the server
server.begin();
Serial.println("Server started");
// Print the IP address
Serial.println(WiFi.localIP());
ui.init();
display.flipScreenVertically();
}
void loop() {
// Handle REST calls
WiFiClient client = server.available();
if (!client) {
return;
}
while(!client.available()){
delay(1);
}
rest.handle(client);
}
// Custom function accessible by the API
int ledControl(String command) {
// Get state from command
int state = command.toInt();
digitalWrite(6,state);
return 1;
}
We got the following compilation error:
"error: ArialMT_Plain_10 causes a section type conflict with __c
const char ArialMT_Plain_10[] PROGMEM ={ "
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello
First of all thanks for this nice piece of work to provide a good driver for the SSD1306.
I'm having an issue when trying to compile it along with the M.Schwarz aREST library (see https://github.com/marcoschwartz/aREST) to use it for a ESP8266 domotic project.
It seems there is a conflict problem at compilation time, but I'm not sure it is coming from Marco's library or from this one. To reproduce, install aREST library and try to integrate one of your sample code in the example files from Marco, like the one below:
We got the following compilation error:
"error: ArialMT_Plain_10 causes a section type conflict with __c
const char ArialMT_Plain_10[] PROGMEM ={ "
The text was updated successfully, but these errors were encountered: