Arduino UNO + ESP8266



  • Hi all.

    i'm new to this and also to Arduino.

    I have a Ardunio UNO, also have a Ethernet shield, and a ESP8266.

    If i understand correct, to have a gateway working i need to have the Arduino with the RF board to communicate to sensors?

    So, using the Ethernet, Mysensors will communicate with the controller, and using the radio to the sensors? is this correct?

    Can have a arduino uno with the ether shield and a ESP8266 to work with sensors?

    Can anyone give me some advice ?
    Best regards.


  • Admin

    @Tagore.PDE said:

    Can have a arduino uno with the ether shield and or a ESP8266 to work with sensors?

    Yes, use either to build a gateway.



  • Can please clarify more?
    I dont get it.

    Regards


  • Mod

    @Tagore.PDE https://www.mysensors.org/about/components describes how the different parts work together and what they are called, except one thing: since a few weeks back (with the release of MySensors 2.0) sensors can be connected directly to a gateway.

    So you can use either of (or both) your devices as gateways. They can both have sensors. The uno+shield will communicate with the controller over wired ethernet. The esp8266 will communicate with the controller over wireless network. there is no need for radio modules.



  • @mfalkvidd Thx for your answer, but i think maybe not are talking about the same hardware?

    Im refering for this: https://www.sparkfun.com/products/13678
    And maybe you talk about this: https://www.adafruit.com/products/2471?&main_page=product_info&products_id=2471

    But what i m really asking here, is, can have a arduino uno, with the WiFi Module - ESP8266 from sparkfun ? acting like a Serial Gateway?

    And also, the ESP8266 Breakout from adafruit can be used as a node?

    If the answer are yes, how?
    And when i say "radio" i reefer to RF radios, 2.4 Ghz for example, like the ESP8266 have.

    Best regards.


  • Mod

    @Tagore.PDE oh. Sorry. Yes I was talking about the standalone ESP8266. The esp is capable enough to be used in MySensors without being connected to an Arduino.

    You are correct that the esp shield has a radio but the radio referred to in MySensors documentation is a nrf or rfm radio. Those radios are much more power efficient and are therefore more suited for battery-operated sensors. They are also cheaper (and were much cheaper than any alternative before the esp was released).

    I haven't seen anyone using the esp wifi shield with MySensors but it should be doable. I recommend that you start with the ethernet shield (at least if it is a w5100) because then you can use the GatewayW5100 example. There is no ready-made example for the esp wifi shield. When you have the ethernet shield working, you can move on to figuring out how to replace the ethernet shield with the esp wifi shield.

    You would not use the ethernet shield and the esp though. Use only one of them.



  • Same problem with Mega2560 + ESP8266 DoIT WiFi Shield.
    It does not compile the MySensors provided example : GateWAYESP8266, modifications, added userid/password ONLY
    Error:
    C:\Users\pwall\AppData\Local\Temp\arduino_modified_sketch_903580\GatewayESP8266.ino:132:25: fatal error: ESP8266WiFi.h: No such file or directory

    #include <ESP8266WiFi.h>

                         ^
    

    compilation terminated.

    open preproc\ctags_target_for_gcc_minus_e.cpp: The system cannot find the file specified.
    Error compiling for board Arduino/Genuino Mega or Mega 2560.

    Yes I understand that the ESP8266 is powerful enough to work without an Arduino but it so happens that I have one MEGA2560 and one WiFi shield, with spidery legs, that mates with the MEGA, and would very much like to see it work.


  • Mod

    @Straydog as I said before, the best shot is probably to start with the ethernet example and modify it until you get something that works with the esp shield.



  • I think we have a misunderstanding here.
    Looks like a compiler problem.
    The GateWay sketch works fine on Mega2560, with The ENC28J60, in other words, it works with Ethernet.
    It also works on a standalone ESP8266, specifying "MY_GATEWAY_ESP8266", which finds the ESP8266WiFi.h.
    However but it doesn't work with the Mega2560, or Arduino R3 for that matter, with ESP8266, specifying "MY_GATEWAY_ESP8266", ESP8266WiFi.h not found.
    Not sure the Arduino would be suitable, due to limited memory, but since it won't compile, I'll never know.
    Has anybody got this combination working?


  • Mod

    @Straydog defining MY_GATEWAY_ESP8266 requires running directly on the esp. It can not run on Mega.



  • Understand what you're saying, so:

    1. It doesn't work like having a Arduino/Mega + W5100, with MY_GATEWAY_W5100.
    2. Is there NO option to run with a WiFi Shield???

  • Mod

    @Straydog it seems to be possible with the cc3000 shield, at least according to https://forum.mysensors.org/topic/2709/mysensors-wifi-gateway-with-arduino-uno-and-cc3000/


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 1
  • 6

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts