What is wrong with
int CityIDs() = { 7260226 }; //Only USE ONE for weather marquee
What is wrong with
int CityIDs() = { 7260226 }; //Only USE ONE for weather marquee
The problem is not with that line but a previous one that is not properly terminated with a semicolon
If you need more help then please post your full sketch, using code tags when you do
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.
It is also helpful to post full error messages in code tags as it makes it easier to scroll through them and copy them for examination
[] not ().int can hold is from 32767 to -32767. To hold a value of the size shown would require an unsigned long type.The rest of the code is needed for context.
After seeing 4 errors in just one line, I'm worried about the rest of the code... ![]()
/** The MIT License (MIT)
Copyright (c) 2018 David Payne
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/******************************************************************************
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPUpdateServer.h>
#include <WiFiManager.h> // --> GitHub - tzapu/WiFiManager: ESP8266 WiFi Connection manager with web captive portal
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include "FS.h"
#include <SPI.h>
#include <Adafruit_GFX.h> // --> GitHub - adafruit/Adafruit-GFX-Library: Adafruit GFX graphics core Arduino library, this is the 'core' class that all our other graphics libraries derive from
#include <Max72xxPanel.h> // --> GitHub - markruys/arduino-Max72xxPanel: Arduino interface for Adafruit-GFX to control a set of 8x8 LEDs with a MAX7219 or MAX7221
#include <pgmspace.h>
#include "OpenWeatherMapClient.h"
#include "TimeDB.h"
#include "NewsApiClient.h"
#include "OctoPrintClient.h"
#include "PiHoleClient.h"
//******************************
// Start Settings
//******************************
String TIMEDBKEY = ""; // Your API Key from Register Free Account for API Key - TimeZoneDB
String APIKEY = "e03f130a375247eccd9cb4390af7f4c5"
// Default City Location (use Find - OpenWeatherMap to find city ID)
int CityIDs() = [7260226]; //Only USE ONE for weather marquee
String marqueeMessage = "Mark Strunks weather time ";
boolean IS_METRIC = true; // false = Imperial and true = Metric
boolean IS_24HOUR = false; // 23:00 millitary 24 hour clock
boolean IS_PM = true; // Show PM indicator on Clock when in AM/PM mode
const int WEBSERVER_PORT = 80; // The port you can access this device on over HTTP
const boolean WEBSERVER_ENABLED = true; // Device will provide a web interface via http://[ip]:[port]/
boolean IS_BASIC_AUTH = false; // Use Basic Authorization for Configuration security on Web Interface
char* www_username = "admin"; // User account for the Web Interface
char* www_password = "password"; // Password for the Web Interface
int minutesBetweenDataRefresh = 15; // Time in minutes between data refresh (default 15 minutes)
int minutesBetweenScrolling = 1; // Time in minutes between scrolling data (default 1 minutes and max is 10)
int displayScrollSpeed = 25; // In milliseconds -- Configurable by the web UI (slow = 35, normal = 25, fast = 15, very fast = 5)
boolean flashOnSeconds = true; // when true the : character in the time will flash on and off as a seconds indicator
boolean NEWS_ENABLED = true;
String NEWS_API_KEY = ""; // Get your News API Key from https://newsapi.org
String NEWS_SOURCE = "reuters"; // List of news source APIs available - News API to get full list of news sources available
// Display Settings
// CLK -> D5 (SCK)
// CS -> D6
// DIN -> D7 (MOSI)
const int pinCS = D6; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI )
int displayIntensity = 1; //(This can be set from 0 - 15)
const int numberOfHorizontalDisplays = 4; // default 4 for standard 4 x 1 display Max size of 16
const int numberOfVerticalDisplays = 1; // default 1 for a single row height
/* set ledRotation for LED Display panels (3 is default)
0: no rotation
1: 90 degrees clockwise
2: 180 degrees
3: 90 degrees counter clockwise (default)
*/
int ledRotation = 3;
String timeDisplayTurnsOn = "06:30"; // 24 Hour Format HH:MM -- Leave blank for always on. (ie 05:30)
String timeDisplayTurnsOff = "23:00"; // 24 Hour Format HH:MM -- Leave blank for always on. Both must be set to work.
// OctoPrint Monitoring -- Monitor your 3D printer OctoPrint Server
boolean OCTOPRINT_ENABLED = false;
boolean OCTOPRINT_PROGRESS = true;
String OctoPrintApiKey = ""; // ApiKey from your User Account on OctoPrint
String OctoPrintServer = ""; // IP or Address of your OctoPrint Server (DO NOT include http://)
int OctoPrintPort = 80; // the port you are running your OctoPrint server on (usually 80);
String OctoAuthUser = ""; // only used if you have haproxy or basic athentintication turned on (not default)
String OctoAuthPass = ""; // only used with haproxy or basic auth (only needed if you must authenticate)
// Pi-hole Client -- monitor basic stats from your Pi-hole server (see http://pi-hole.net)
boolean USE_PIHOLE = false; // Set true to display your Pi-hole details
String PiHoleServer = ""; // IP or Address only (DO NOT include http://)
int PiHolePort = 80; // Port of your Pi-hole address (default 80)
String PiHoleApiKey = ""; // Optional -- only needed to see top blocked clients
boolean ENABLE_OTA = true; // this will allow you to load firmware to the device over WiFi (see OTA for ESP8266)
String OTA_Password = ""; // Set an OTA password here -- leave blank if you don't want to be prompted for password
//******************************
// End Settings
//******************************
//blue-grey
String themeColor = "blue-grey"; // this can be changed later in the web interface.
marquee.ino (67.8 KB)
The line above the one that you originally showed us was just a comment, so the error was actually two lines above.
It was a missing semicolon.
String APIKEY = "e03f130a375247eccd9cb4390af7f4c5" ; // ; was missing on this line
// Default City Location (use [Find - OpenWeatherMap](http://openweathermap.org/find) to find city ID)
int CityIDs() = [7260226]; //Only USE ONE for weather marquee
Thank you for posting the code, but you didn't follow the advice from @UKHeliBob:
:
You can still retrospectively add them by editing your post, highlighting all of the code and clicking the <CODE/> icon at the top of the editor window. The reason we ask this is because the forum software then formats the text using a colour scheme to make it much easier for everyone to read. If you could do this it would be appreciated. ![]()
Was it that hard to understand what @UKHeliBob wrote and just check the line before the error (to immediately realize that that's where the semicolon ";" is missing) instead of posting the entire code (without formatting it properly as asked, by the way)?
Anyone who knows a little about C can understand that that error simply indicates a missing semicolon.
Did you miss the bit about using code tags ?
Sorry I'm new ! I do not know what really mean . i sent the code what do i need to do ?can you give example ? Where do you put them ?
Did you read my earlier post ?
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPUpdateServer.h>
#include <WiFiManager.h> // --> https://github.com/tzapu/WiFiManager
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include "FS.h"
#include <SPI.h>
#include <Adafruit_GFX.h> // --> https://github.com/adafruit/Adafruit-GFX-Library
#include <Max72xxPanel.h> // --> https://github.com/markruys/arduino-Max72xxPanel
#include <pgmspace.h>
#include "OpenWeatherMapClient.h"
#include "TimeDB.h"
#include "NewsApiClient.h"
#include "OctoPrintClient.h"
#include "PiHoleClient.h"
//******************************
// Start Settings
//******************************
String TIMEDBKEY = ""; // Your API Key from https://timezonedb.com/register
String APIKEY = "e03f130a375247eccd9cb4390af7f4c5"
// Default City Location (use http://openweathermap.org/find to find city ID)
int CityIDs() = [7260226]; //Only USE ONE for weather marquee
String marqueeMessage = "Mark Strunks weather time ";
boolean IS_METRIC = true; // false = Imperial and true = Metric
boolean IS_24HOUR = false; // 23:00 millitary 24 hour clock
boolean IS_PM = true; // Show PM indicator on Clock when in AM/PM mode
const int WEBSERVER_PORT = 80; // The port you can access this device on over HTTP
const boolean WEBSERVER_ENABLED = true; // Device will provide a web interface via http://[ip]:[port]/
boolean IS_BASIC_AUTH = false; // Use Basic Authorization for Configuration security on Web Interface
char* www_username = "admin"; // User account for the Web Interface
char* www_password = "password"; // Password for the Web Interface
int minutesBetweenDataRefresh = 15; // Time in minutes between data refresh (default 15 minutes)
int minutesBetweenScrolling = 1; // Time in minutes between scrolling data (default 1 minutes and max is 10)
int displayScrollSpeed = 25; // In milliseconds -- Configurable by the web UI (slow = 35, normal = 25, fast = 15, very fast = 5)
boolean flashOnSeconds = true; // when true the : character in the time will flash on and off as a seconds indicator
boolean NEWS_ENABLED = true;
String NEWS_API_KEY = ""; // Get your News API Key from https://newsapi.org
String NEWS_SOURCE = "reuters"; // https://newsapi.org/sources to get full list of news sources available
// Display Settings
// CLK -> D5 (SCK)
// CS -> D6
// DIN -> D7 (MOSI)
const int pinCS = D6; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI )
int displayIntensity = 1; //(This can be set from 0 - 15)
const int numberOfHorizontalDisplays = 4; // default 4 for standard 4 x 1 display Max size of 16
const int numberOfVerticalDisplays = 1; // default 1 for a single row height
/* set ledRotation for LED Display panels (3 is default)
0: no rotation
1: 90 degrees clockwise
2: 180 degrees
3: 90 degrees counter clockwise (default)
*/
int ledRotation = 3;
String timeDisplayTurnsOn = "06:30"; // 24 Hour Format HH:MM -- Leave blank for always on. (ie 05:30)
String timeDisplayTurnsOff = "23:00"; // 24 Hour Format HH:MM -- Leave blank for always on. Both must be set to work.
// OctoPrint Monitoring -- Monitor your 3D printer OctoPrint Server
boolean OCTOPRINT_ENABLED = false;
boolean OCTOPRINT_PROGRESS = true;
String OctoPrintApiKey = ""; // ApiKey from your User Account on OctoPrint
String OctoPrintServer = ""; // IP or Address of your OctoPrint Server (DO NOT include http://)
int OctoPrintPort = 80; // the port you are running your OctoPrint server on (usually 80);
String OctoAuthUser = ""; // only used if you have haproxy or basic athentintication turned on (not default)
String OctoAuthPass = ""; // only used with haproxy or basic auth (only needed if you must authenticate)
// Pi-hole Client -- monitor basic stats from your Pi-hole server (see http://pi-hole.net)
boolean USE_PIHOLE = false; // Set true to display your Pi-hole details
String PiHoleServer = ""; // IP or Address only (DO NOT include http://)
int PiHolePort = 80; // Port of your Pi-hole address (default 80)
String PiHoleApiKey = ""; // Optional -- only needed to see top blocked clients
boolean ENABLE_OTA = true; // this will allow you to load firmware to the device over WiFi (see OTA for ESP8266)
String OTA_Password = ""; // Set an OTA password here -- leave blank if you don't want to be prompted for password
//******************************
// End Settings
//******************************
//blue-grey
String themeColor = "blue-grey"; // this can be changed later in the web interface.
The highlighted area is what is wrong I can’t see what is wrong with it !!
Will I didn’t wake up knowing this stuff like you !! I just started doing this a week ago !! Thanks
@mstrunk4 Did you make the correction suggested by @JohnLincoln in Post #6?
Did you create a mix of David Payne's code, or where did you copy it from?
I ask because I can't find this code in his repository, and it's unlikely he would have made such a mistake.
No code tags again
Was that deliberate ?
Don’t understand what you mean? Can you give me an example ?
Follow the instructions previously posted several times in this topic
That fells into my "Anyone who knows a little about C".
If you lack this basic knowledge, don't be offended, but I think you'd be better off learning the C language and getting some practice before you go out and try to do things you don't even know the first thing about...
You have been registered on the forum for six years.
What the example do you need? You were instructed what to do multiple times.
Didn't you know how to add a ";" at the end of line?