ESP-12 (ESP8266) modules

  • March 12, 2017 at 22:48 #23395
    btidey
    Participant

    There is a lot of interest in using these small ultra low cost modules in home automation work. They have wifi capability and some GPIO pins for interfacing with hardware.

    They can be programmed in an Arduino type environment. I have recently tried out my LightwaveRF libraries which were originally developed for Arduino AT Mega 328 cpus on these devices.

    The LWRx library works with no significant updates. This means these modules can be used to construct devices which will respond to signals from the LightwaveRF link or remote controls. The wifi capability of the modules open up lots of other possibilities including parallel contro direct by wifi and reporting status back.

    I am currently investigating using the LWTx library with these devices but that is a bit more complex due to the use of hardware timers.

    Library details are at https://github.com/roberttidey/LightwaveRF

    March 14, 2017 at 15:09 #23402
    btidey
    Participant

    Updated libraries now support Tx operation from ESP8266 modules.

    March 29, 2017 at 11:49 #23473
    stevef
    Participant

    Robert how do you compile and upload your library ? I’ve been programming my NodeMCU ESP-12 modules using the Arduino IDE, I’ve cloned your LightwaveRF library to the sketchbook/libraries directory like other libs Ive installed but when I try to compile LrRxTest.ino it complains

    /home/steve/esp8266/libraries/LightwaveRF/LwRxTest/LwRxTest.ino:2:18: fatal error: LwRx.h: No such file or directory
    #include
    ^
    compilation terminated.
    exit status 1
    Error compiling for board NodeMCU 1.0 (ESP-12E Module).

    If I hardcode the path to LwRx.h it then complains

    In file included from /home/steve/esp8266/libraries/LightwaveRF/LwRxTest/LwRxTest.ino:2:0:
    /home/steve/esp8266/libraries/LightwaveRF/libraries/LwRx/LwRx.h:27:30: fatal error: ../EEPROM/EEPROM.h: No such file or directory
    #include
    ^
    compilation terminated.
    exit status 1
    Error compiling for board NodeMCU 1.0 (ESP-12E Module).

    I found there was a define in LWrx.h that turned off EEPROM so I set it to 0 #define EEPROM_EN 0 and now it complains

    In file included from /home/steve/esp8266/libraries/LightwaveRF/LwRxTest/LwRxTest.ino:2:0:
    /home/steve/esp8266/libraries/LightwaveRF/libraries/LwRx/LwRx.h:84:47: error: expected ‘,’ or ‘…’ before ‘*’ token
    extern boolean lwrx_getstats(unsigned uint16_t* stats);
    ^
    /home/steve/esp8266/libraries/LightwaveRF/LwRxTest/LwRxTest.ino: In function ‘void printStats()’:
    LwRxTest:177: error: invalid conversion from ‘uint16_t* {aka short unsigned int*}’ to ‘unsigned int’ [-fpermissive]
    if (lwrx_getstats(stats)) {
    ^
    In file included from /home/steve/esp8266/libraries/LightwaveRF/LwRxTest/LwRxTest.ino:2:0:
    /home/steve/esp8266/libraries/LightwaveRF/libraries/LwRx/LwRx.h:84:16: error: initializing argument 1 of ‘boolean lwrx_getstats(unsigned int)’ [-fpermissive]
    extern boolean lwrx_getstats(unsigned uint16_t* stats);
    ^
    exit status 1
    invalid conversion from ‘uint16_t* {aka short unsigned int*}’ to ‘unsigned int’ [-fpermissive]

    Help ! I must have installed the library incorrectly or you are using a different method to compile and upload, any advice you can give gratefully received

    Thanks
    Steve

    April 6, 2017 at 17:12 #23511
    michael ward
    Participant

    I have no idea if this is the same thing, but I got the same sort of error, when the file path was wrong when I was programming a PIC MCU

    The compiler only wanted paths in relative form, not absolute as the path names were set up in the IDE as root, with all other paths being relative to the root.
    Whenever an absolute address was used, the IDE tagged it onto the root and flagged an error at compile time.

    May 1, 2017 at 08:47 #23620
    btidey
    Participant

    Sorry. I missed your questions here and have only just seen it.

    I compile using standard Arduino set up.

    The libraries need to be put in the libraries folder in parallel with source.

    E.g.
    Arduino/LwTxTestEx/LwTxTestEx.ino
    Arduino/libraries/LwTx/LwTx.h
    Arduino/libraries/LwTx/LwTx.cpp

    If still a problem it may be better to post an issue on Github as I’ll be sure to see it there.

    January 24, 2018 at 17:09 #24913
    NealXu
    Participant

    Hi…i am a new user here. In my case i got the same sort of error, when the file path was wrong when I was programming a PIC MCU.The compiler only wanted paths in relative form, not absolute as the path names were set up in the IDE as root, with all other paths being relative to the root.

You must be logged in to reply to this topic.