Error: missing terminating " character & error: expected ')' before ';' token

Hi All,

I am new to Arduino and I am getting the above error for the sketch below:

#include <SPI.h>

#include <Wire.h>

#include <Adafruit_GFX.h>

#include <Adafruit_SSD1306.h>

#include <Fonts/FreeSans9pt7b.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels

#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)

#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

void setup()

{

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);

display.clearDisplay();

display.setTextSize(1); // Normal 1:1 pixel scale

display.setTextColor(WHITE); // Draw white text

display.cp437(true); // Use full 256 char 'Code Page 437' font

display.println("Something cool”);

display.display();

}

All help is welcome

The error message told you the exact line number where there error occurred. What line is that? Do you see the indicated error?

The compiler told you where, but you chose not to share the error message.

You're missing a loop function AND code tags.

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Hi UKHeliBob,

Thanks for the welcome and advice.

Do you wish me to resubmit my question?

Zarcoff

Arduino: 1.8.19 (Windows 10), Board: "Atmel atmega328pb Xplained mini"

C:\Users\M17 R3\Documents\Arduino\sketch_apr03a\sketch_apr03a.ino:39:17: warning: missing terminating " character

display.println("Something cool”);

             ^

sketch_apr03a:39:17: error: missing terminating " character

display.println("Something cool”);

             ^~~~~~~~~~~~~~~~~~~~

C:\Users\M17 R3\Documents\Arduino\sketch_apr03a\sketch_apr03a.ino: In function 'void setup()':

sketch_apr03a:41:18: error: expected ')' before ';' token

display.display();

              ^

exit status 1

missing terminating " character

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

That second pair of quotes looks odd

No, but please edit your first post, select all of the code and then click the code tags icon ( </> ) to add the code tags

Also copy the full error message from the IDE using the Copy Error message button and post it here, also in code tags before saving the edited post

Using code tags in both cases makes it easier to read and copy for examination

Well spotted.
They are "smart" quotes put in by your operating system. Did you type this into the Arduino IDE?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.