Emailing from ESP8266, triggered by RFID sensor

Hi, I am relatively new to Arduino and I am trying to send an email when a certain RFID tag is scanned.

I have the following components:
-Arduino Uno
-ESP8266 wifi module (from core https://core-electronics.com.au/wifi-module-esp8266-32601.html)
-RFID RC522

I have had success with the RFID sensor but have struggled to get the ESP8266 to respond. I have got it to connect to wifi by typing AT commands through the serial monitor, but not through a program which automatically does it.

Im starting to question whether it it possible to combine and program both the ESP8266 and RFID sensor at once. It seems to be that to program and connect ESP8266 to wifi, the generic ESP8266 board needs to be selected, but for the RFID sensor the Arduino Uno board is selected. This seemed like a bit of an incompatibility and I just wanted to double check whether it is possible.

Any help will be much appreciated, thanks.

1 Like

The ESP8266 is capable of doing both of the tasks you require. A quick search of the www produces plenty of examples.

Here’s one to send email:

Note that to use GMail, you need to change the GMail account security settings to allow legacy applications, and thus not require the default two step authentication.

For using the RFID reader:

Try each part individually, and then then when you understand them, cut and paste to get the program flow you need.

Hope this helps.

Edit:
If you need base64 encode/decode, it is in the ESP base code. Here’s a reference:

https://links2004.github.io/Arduino/d8/d54/classbase64.html

2 Likes