Wemos XI
-
Received som WeMos XI modules the other day and I tried to compile a sketch for it but I ran in to some trouble:
WARNING: library MySensors claims to run on [avr architecture(s) and may be incompatible with your current board which runs on esp8266 architecture(s). -
Got a little bit further by adding the following to the sketch:
#define ARDUINO_ARCH_ESP8266Now I get the following error:
\Arduino\libraries\MySensors/core/MyMainESP8266.cpp:22:22: fatal error: Schedule.h: No such file or directory #include "Schedule.h" ^ compilation terminated. exit status 1 Error compiling for board WEMOS XI. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.I really don't know what I'm doing here but I will try adding the Schedule.h file from somewhere to somewhere...
-
Adding the Schedule.h to the MySensors core library folder just makes it ask for the next thing that is missing so I think I will leave this to someone who knows what they are doing.
-
Adding the Schedule.h to the MySensors core library folder just makes it ask for the next thing that is missing so I think I will leave this to someone who knows what they are doing.
-
I got too myself some boards. XI is indeed a 382 clone, but it seems that the XI core library is missing yield() functionality.
I managed to compile my mysensors sketch with first forcing the#define ARDUINO_ARCH_AVRin the sketch and
with some modifications at the XI core library:- I added the
void yield(void);somewhere in ..\ARDUINO\hardware\wemos\XI\cores\lgt8f\Arduino.h

- I added the hooks.c file to ..\ARDUINO\hardware\wemos\XI\cores\lgt8f\ from https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/hooks.c
However i did not yet upload the sketch to the board, I'll later when I get home.
- I added the
-
I got too myself some boards. XI is indeed a 382 clone, but it seems that the XI core library is missing yield() functionality.
I managed to compile my mysensors sketch with first forcing the#define ARDUINO_ARCH_AVRin the sketch and
with some modifications at the XI core library:- I added the
void yield(void);somewhere in ..\ARDUINO\hardware\wemos\XI\cores\lgt8f\Arduino.h

- I added the hooks.c file to ..\ARDUINO\hardware\wemos\XI\cores\lgt8f\ from https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/hooks.c
However i did not yet upload the sketch to the board, I'll later when I get home.
- I added the
-
Missed the post from @lorisc it would have saved me some time as I ended up doing the same modifications :)
Uploaded to a board and connected NRF24 with the same pin numbers than on normal Arduino: it runs.Tested the sleep() function from MySensors but it's not so great at the moment, using 1.5mA, I'll have to check why.
-
I have just tested the sleep modes from the examples supplied with the lgt8 core, and all I can say is it's pretty disappointing :(
Even in PM_POFFS1 mode which is the lowest power mode possible (only wakes up with external interrupt) it consumes over 80µA.
There must be some settings that can be improved to get closer to what the datasheet seems to claim, but it's pretty hard to guess how we are supposed to do that with a chinese language datasheet...EDIT: when I force pins to OUTPUT + LOW the power consumption drops significantly, it's below 20µA now. If someone has some knowledge in Chinese to find out if/how we can disable ADC/SPI/... that could get interesting.
But without proper sleep functions the Xi loses most of it's interest as battery powered sensor (low minimal voltage, no regulator & power led to remove etc). Only interest at the moment would be the 2 DACs that the atmega doesn't have, but that's of very marginal interest for MySensors. It doesn't even have a cost advantage as it's only 0.30$ cheaper that pro mini but with shipping fee. -
So is this board really not good for battery powered sensors?
IMHO not at the moment and I don't think it will change soon as doc from wemos or the chip manufacturer are still very poor.
I fail to see the interest of the this board compared to a pro mini clone, except saving 0.5$. There's no obvious way to make it really low power and you have a different pinout so you can't use any of the existing PCBs.