error: macro names must be identifiers? esp8266

Can someone guide me with this problem. I am new to programming.
Programming esp8266 with ubidots.
I am trying to compile but I get an error on wifi password (macro names must be identifiers)
I have added notes to help.

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <PubSubClient.h>
#include “UbidotsESPMQTT.h”
#include <Servo.h>
Define Constants
#define Token"…" // Your Ubidots TOKEN
#define ssid “…” //Your SSID
#define wifi pass “…” // Your Wifi Pass
#define motor “motor” // Put here your Ubidots device label
#define speed “speed” // Put here your Ubidots variable label
#define MotorPin D5 //NodeMCU pin where the signal for the ESC comes out
Servo ESC;
float value=0; // To store incoming value.
float MotorSpeed=0;

Ubidots client(TOKEN);

Auxiliar Functions

// cast from an array of chars to float value.
float btof(byte * payload, unsigned int length) {
char * demo = (char ) malloc(sizeof(char) * 10);
for (int i = 0; i < length; i++) {
demo _= payload
float value = atof(demo);_
return value;_
// Callback to handle subscription*_
void callback(char* topic, byte* payload, unsigned int length) {
* value = btof(payload, length);*
* value = map(value, 0, 100, 0, 180); //Map the 0-100 values from the slider to the 0-180 to use the servo lib.*
* ESC.write(value); //Send the value (PWM) to the ESC*
* Serial.println(value);*
* Serial.println(MotorSpeed);*

* Main Functions*
void setup() {
* // put your setup code here, to run once:*
* client.ubidotsSetBroker(“”); // Sets the broker properly for the business account*
* client.setDebug(true); // Pass a true or false bool value to activate debug messages*
* Serial.begin(9600);*
* client.wifiConnection(ssid,pass);*
* client.begin(callback);*
* client.ubidotsSubscribe(DEVICE_LABEL, VARIABLE); //Insert the dataSource and Variable’s Labels*
* ESC.attach(MotorPin,1000,2000);*
* WiFi.begin(ssid, pass);*

void loop() {
* // put your main code here, to run repeatedly:*
* if (!client.connected()) {*
* client.reconnect();*
* client.ubidotsSubscribe(DEVICE_LABEL, VARIABLE); //Insert the dataSource and Variable’s Labels*
* }*
* client.loop();*

Do you suppose you could post the entire error message?

Do you suppose you could post the entire error message? The actual error and not a paraphrased version?

#define Token"..........................." // Your Ubidots TOKEN


Please use code tags when you post code or warning/error messages. To do this, click the </> button on the forum toolbar, then paste the text you want to be in the code tags. Finally, move the cursor out of the code tags before adding any additional text you don’t want to be in the code tags. If your browser doesn’t show the posting toolbar, then you can manually add the code tags like this:
[code]``[color=blue]// your code is here[/color]``[/code]

The reason for doing this is that, without code tags, the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier for us to read your code and to copy it to the IDE or editor.

Using code tags and other important information is explained in the “How to use this forum” post. Please read it.

Another oops:


#define wifi pass "........." // Your Wifi Pass

It seems you tried to name your macro wifi pass. You can’t have spaces in macro names (or any C++ name for that matter). I see later in your code you are using the name pass.

sketch_aug26a.ino:11:14: warning: ISO C99 requires whitespace after the macro name [enabled by default]
 #define Token"..........................." // Your Ubidots TOKEN

This is the first warning I got. Seems self-explanatory as to what is wrong.

This is the error message. It highlights my wifi password for some reason. Now keep in mind I am not great at programming. so any issues with the code please shine a light on me.

Arduino: 1.8.9 (Windows Store (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), ck, 26 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, nonos-sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 9600"

project_1:11:9: error: macro names must be identifiers

#define 3pbpumzf "........." // Your Wifi Pass


Multiple libraries were found for "Servo.h"
Used: C:\Users\marwan\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\libraries\Servo
Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\Servo
exit status 1
macro names must be identifiers

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

Names must not start with a number

But my wifi password starts with a number and cant be changed. Any alternative for this?

The password can start with a number. The name you use for it cannot.

do you mean the wifi SSID?
If not that, then what do you mean by name?

If not that, then what do you mean by name?

The name of the macro you're creating.

You could also forget about using macros all-together since there are a number of "gotchas" if you don't know what you're doing. Why not go with const c-strings?

const char ssid[] = "MySSID";
const char wifiPassword[] = "MyPassword";

I agree with gfvalvo's advice to avoid unnecessary use of macros. However, it is still useful to understand how to correctly use macros. For that reason, I recommend that you study the documentation provided in the Arduino Language reference:

This is a generally useful skill for you to learn. When there is some particular code you don't understand, look it up in the reference:

do you mean the wifi SSID?
If not that, then what do you mean by name?

#define THIS yourSSID

Whatever THIS is can’t start with a number. That’s the name you’re creating to replace with your SSID.

If you’re not sure what a #define statement does, then you should probably find out before trying to use any more.

take a coding course please