Hi experts, I am doing a project to send the sensor data to email using Arduino with ESP8266-01 module. However, I couldn't compile the code for the ESP8266. The error message is as below:
Arduino: 1.8.13 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
C:\Program Files (x86)\Arduino\libraries\SerialTransfer-master\src\SPITransfer.cpp: In member function 'uint8_t SPITransfer::available()':
C:\Program Files (x86)\Arduino\libraries\SerialTransfer-master\src\SPITransfer.cpp:111:29: error: 'SPDR' was not declared in this scope
volatile uint8_t recChar = SPDR;
^
exit status 1
Error compiling for board Generic ESP8266 Module.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
If possible, you should always post code directly in the forum thread as text using code tags:
Do an Auto Format (Tools > Auto Format[/b) on your code. This will make it easier for you to spot bugs and make it easier for us to read.[/li]
- Edit > Copy for Forum*
- In a forum reply here, click on the reply field.* - Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
- Press "Ctrl + V". This will paste the sketch between the code tags.*
- Move the cursor outside of the code tags before you add any additional text to your reply.*
- Repeat the above process if your sketch has multiple tabs.*
[/list]*
This will make it easy for anyone to look at it, which will increase the likelihood of you getting help.*
If the sketch is longer than the 9000 characters maximum allowed by the forum, then it's OK to add it as an attachment. After clicking the "Reply" button, you will see an "Attachments and other settings" link that will allow you to make the attachment.* When your code requires a library that's not included with the Arduino IDE please post a link (using the chain links icon on the forum toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.
6v6gt:
You are using the Arduino IDE ?
How have you connected the ESP-01 to the PC running the IDE ?
Thanks for your reply. I saw from the website which says using the ESP01 Programmer UART to upload the sketch. But I haven't buy the components yet, will buy it if succeed in my coding.
The website link is here: jobs.html_title
Deva_Rishi:
Well that is not the error message but just the status.
I see something related to the SerialTransfer library in the error message. But I'm not sure about that becasue it is my first time doing IoT projects which involves using SerialTransfer.
zack6912:
I see something related to the SerialTransfer library in the error message. But I'm not sure about that becasue it is my first time doing IoT projects which involves using SerialTransfer.
You have to include the full error message, but some libraries e.g. here #include <SerialTransfer.h>
may not be included in the IDE as standard, so you have to down load these in the library manager.
6v6gt:
You have to include the full error message, but some libraries e.g. here #include <SerialTransfer.h>
may not be included in the IDE as standard, so you have to down load these in the library manager.
I did include the whole error message in my first post but maybe you didn't scroll down. I did downloaded the libraries in my code and I attached the link of the libraries also in my second post.