Go Down

Topic: Connection and sending e-mail with Arduino Uno WiFi (Read 1 time) previous topic - next topic

Michele94

Hello everyone,
I am a beginner on the subject and I am making a project with Arduino UNO WiFi (https://store.arduino.cc/arduino-uno-wifi) which consists of alerting the user by e-mail if certain thresholds of gas (detected with appropriate sensors) were exceeded.
I set the Arduino UNO WiFi through the following guide:

https://www.arduino.cc/en/Guide/ArduinoUnoWiFi

I'm having problems in the code related to the connection  to the internet with the consequent creation and sending of the e-mail. After several searches on the internet, I did not find anything that referred to the Arduino UNO WiFi but only codes related to Arduino UNO + shield Ethernet / WiFi.
I tried to follow the guide found on this forum at the following address:

http://playground.arduino.cc/Italiano/Mail

trying to adapt the instructions of the Ethernet library with those of the WiFi library without success.
The arduino UNO WiFi can be treated as an arduino UNO + shield wifi or needs specific libraries? Is the WiFi.h library sufficient?


If someone can give me a hand I would be really grateful.
Thank you.

Michele

Juraj


Michele94

So it is obligatory to change firmware or it'possible to use <UnoWiFiDevEd.h>  to permit Arduino to connect and send emai?
in the case in which we must install a new firmware, we have to install Expressif AT firmware or Wifi link firmware?

For the connection of Arduino we tried to use <UnoWiFiDevEd.h> ,but we have in output on the serial monitor value=0 therefor false,where is the error?


#include <UnoWiFiDevEd.h>


char ssid[]="X";
char pass[]="X";

int time=1000;

int wait=1000;

ArduinoWifiClass *wd=new ArduinoWifiClass();

void setup() {
  Serial.begin(9600);
  Serial.println("Program started,waiting for router...");
  delay(time);
  Serial.println("Starting network module...");
wd->begin();
wd->connect(ssid,pass);

delay(2000);
Serial.println("Connecting...");

boolean value= wd->connected();
Serial.println(value);


}

void loop() {
 

}


Juraj

you can't send email with factory firmware. I recomend WiFi Link

Michele94

Excuse me Juraj, I have a couple of questions:

1. The library that you linked to me can only be used by changing the Arduino UNO wifi firmware, right? What does the firmware change mean from an electronic point of view (using pins, etc.)?

2. I read this on the link you sent me: "UNO WiFi Developer Edition connects ATmega328 to ESP8266 using additional on board UART chip SC16IS750. This additional UART is connected to ATmega as I2C device." Being ignorant on the subject, what does it mean? Is the SC16IS750 chip already on the Arduino UNO Wifi?

I hope you can help me, I'm in a panic.

Thanks so much.

Michele

Juraj

Excuse me Juraj, I have a couple of questions:
no problem. I am on 'the mission' for perfect Uno WiFi for everyone :-)

1. The library that you linked to me can only be used by changing the Arduino UNO wifi firmware, right?
the Uno WiFi Serial1 library is independent from firmware. it only makes the connection to the esp8266 WiFi chip.

WiFi Link library requiers WiFi Link firmware

What does the firmware change mean from an electronic point of view (using pins, etc.)?
no change

Is the SC16IS750 chip already on the Arduino UNO Wifi?
yes, it is what makes Uno WiFi unique for now

I hope you can help me, I'm in a panic.
WiFi Link is for general networking. it is easy to port sketches written for Ethernet or WiFi library.

every day there are more Uno WiFi owners with Uno WiFi with Serial 1 and WiFi Link. the community grows.


Michele94

Thank you very much :), later I change the firmware and then I will try to sketch the code for the connection of the Arduino to the internet with the relative sending of e-mail.

If I had problems with the code, could you still give me a hand?

Thank you again!

Juraj

yes
If I had problems with the code, could you still give me a hand?
yes

and write immediately if something doesn't work in WiFi Link installation sequence

Michele94

Hi juraj, I followed the guide you suggested to me: https://github.com/jandrassy/UnoWiFiDevEdSerial1.
I have carried out all the various steps indicated and at the moment I am following the following guide: https: //github.com/jandrassy/arduino-firmware-wifilink.
I'm stuck for a few hours in the passage: "Go to config.h tab and uncomment the #define for your board or GENERIC_ESP8266". To which define do I have to remove the comment?


This is the config.h code:
Code: [Select]

/*
 * Firmware version and build date
 */

#define BUILD_DATE  __DATE__ " " __TIME__
#define FW_VERSION  "1.1.0"
#define FW_NAME     "wifilink"

/*
 * Define board model name
 */

//#define STAROTTO
//#define PRIMO
//#define UNOWIFIDEVED
//#define UNOWIFI
//#define GENERIC_ESP8266

//#define MCU_OTA

/*
 * Enable/Disable Debug
 */

//#define DEBUG
//#define BAUDRATE_DEBUG 115200

/*
 * Define board hostname
 */

#define DEF_HOSTNAME "arduino"

/*
 * Defines the communication channel between microcontroller
 * and esp82266, with concerning parameters
 */

//#define HOSTNAME "arduino" //used by mdns protocol

#if defined(STAROTTO)
  //Arduino STAR OTTO configuration parameters
  #define BOARDMODEL "STAROTTO"
  #define ARDUINO_BOARD "star_otto" //mdns
  #define ESP_CH_UART
  #define BAUDRATE_COMMUNICATION 460800
  #define WIFI_LED 14
  #define SSIDNAME "Arduino-Star-Otto"
#elif defined(PRIMO)
  //Arduino PRIMO configuration parameters
  #define BOARDMODEL "PRIMO"
  #define ARDUINO_BOARD "primo"     //mdns
  #define ESP_CH_SPI
  #define WIFI_LED 2
  #define SSIDNAME "Arduino-Primo"
#elif defined(UNOWIFI)
  //Arduino UNOWIFI configuration parameters
  #define BOARDMODEL "UNOWIFI"
  #define ARDUINO_BOARD "unowifi"     //mdns
  #define ESP_CH_SPI
  #define WIFI_LED 2
  #define SSIDNAME "Arduino-Uno-WiFi"
#elif defined(UNOWIFIDEVED)
  //Arduino UNO WIFI DEV. EDITION configuration parameters
  #define BOARDMODEL "UNOWIFIDEVED"
  #define ARDUINO_BOARD "unowifi"   //mdns
  #define ESP_CH_UART
  #define BAUDRATE_COMMUNICATION 115200 // assuming use of Serial1
  #define WIFI_LED 14
  #define SSIDNAME "Arduino-Uno-WiFi"
#elif defined(GENERIC_ESP8266)
  #define BOARDMODEL "GENERIC_ESP8266"
  #define ARDUINO_BOARD "esp8266"   //mdns
  #define ESP_CH_UART
  #define BAUDRATE_COMMUNICATION 9600 // to start with SoftwareSerial, set 115200 for good connection
  #define WIFI_LED 14
  #define SSIDNAME "ESP8266-Module"
#endif


Thank you so much!

Juraj


Michele94

OK, thank you. After performing the next step: "In the tools menu select board options and choose your board / shield / module or Generic ESP8266 from the ESP8266 section of the board menu.", I encounter the following error during verification:

Code: [Select]
In file included from C: \ Users \ Apollonia \ Documents \ Arduino \ ArduinoFirmwareEsp \ ArduinoFirmwareEsp.ino: 6: 0:
sketch \ Configuration.h: 26: 25: fatal error: ArduinoJson.h: No such file or directory

  #include <ArduinoJson.h>

                          ^

compilation terminated.

exit status 1
Error compiling for board Arduino.


Where did I go wrong?  :smiley-confuse:

Juraj


Michele94

I installed the ArduinoJson library, the file is compiled and I display the following lines:

Code: [Select]
Archiving built core (caching) in: C:\Users\APOLLO~1\AppData\Local\Temp\arduino_cache_484843\core\core_esp8266_esp8266_arduino-esp8266_BoardModel_unowifideved,UploadSpeed_115200,FlashSize_4M1M_871cf574c062a3909371a8db80bd9ca3.a
Sketch uses 345579 bytes (33%) of program storage space. Maximum is 1044464 bytes.
Global variables use 43320 bytes (52%) of dynamic memory, leaving 38600 bytes for local variables. Maximum is 81920 bytes.


Is it correct?


However, I forgot to perform the following step: "install the Arduino ESP8266 filesystem uploader IDE plugin". Is it necessary to do it? Because I read that the procedure was tested for the version of the Arduino IDE 1.6.5-r2, 1.6.6 and at the moment I use version 1.8.5.

Thanks so much.

Juraj

yes the spiffs uploader is necessary

the build is ok


Michele94

Hi Juraj,

I'm having problems with the file system upload guide.
https://github.com/esp8266/arduino-esp8266fs-plugin/blob/master/README.md

I followed everything step by step, but when I click on "ESP8266 Sketch Data Upload" a window will pop up saying:
"No files have been found in your data folder! Are you sure you want to create an empty SPIFFS image?"

In the previous steps it does not tell me to load something in the data folder, it says:
"Create a directory named data and any files you want in the file system there."

What do you advise me to do?


Thank you very much

Ps. I do not think it can be a problem of incompatibility with the version of the IDE

Go Up