need help: "graphicsLCD" library and display SSID & IP
Posted: Sun Jan 31, 2016 4:34 am
Hi
I use graphicsLCD library to work with lcd nokia 1202 with STE2007. it's same as nokia 1100(PCF8814).
this library work fine but I don't know how to print SSID and IP on lcd. my code is:
and compile with some error
Demo_whit_1202:26: error: call of overloaded 'print(const char*&)' is ambiguous
lcd.print(ssid);
and when disable line26
then compile but show IP like "67217600" instead of "192:168:1:4"
thanks to help me.
I use graphicsLCD library to work with lcd nokia 1202 with STE2007. it's same as nokia 1100(PCF8814).
this library work fine but I don't know how to print SSID and IP on lcd. my code is:
Code: Select all
#include <ESP8266WiFi.h>
#include <graphicsLCD.h>
// WiFi parameters
const char* ssid = "xxx_yyy";
const char* password = "abcdefg";
// Create an instance of the server
WiFiServer server(80);
#define lcd_RST_pin 12
#define lcd_CS_pin 13
#define lcd_DIN_pin 14
#define lcd_CLK_pin 15
graphicsLCD lcd(lcd_RST_pin, lcd_CS_pin, lcd_DIN_pin, lcd_CLK_pin);
void setup()
{
lcd.begin();
lcd.clear();
// Connect to WiFi network
lcd.line(0);
lcd.print("Connecting to ");
lcd.print(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
lcd.print(".");
}
delay (3000);
lcd.clear();
lcd.print("WiFi connected");
// Start the server
server.begin();
lcd.clear();
lcd.print("Server started");
// Print the IP address
lcd.line(1);
IPAddress ip = WiFi.localIP();
lcd.print(ip);
delay (3000);
}
void loop()
{
}
and compile with some error
Demo_whit_1202:26: error: call of overloaded 'print(const char*&)' is ambiguous
lcd.print(ssid);
and when disable line26
Code: Select all
lcd.print(ssid);
then compile but show IP like "67217600" instead of "192:168:1:4"
thanks to help me.