ESP-12 (ESP8266) modules

LightwaveRF Community: Welcome Forums LightwaveRF Hackers ESP-12 (ESP8266) modules

This topic contains 4 replies, has 3 voices, and was last updated by  btidey 2 months, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #23395
     btidey says:

    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

    #23402
     btidey says:

    btidey
    Participant

    Updated libraries now support Tx operation from ESP8266 modules.

    #23473
     stevef says:

    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

    #23511
     michael ward says:

    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.

    #23620
     btidey says:

    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.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.