Power D1 mini with 4 AA batteries
A quick search shows me that the Wemos D1 Mini is an ESP-8266 dev board. According to the manufacturer’s product summary (https://www.wemos.cc/en/latest/d1/d1_mini.html) and schematic (https://www.wemos.cc/en/latest/_static/files/sch_d1_mini_v3.0.0.pdf) it has an operating voltage of 3v3, as well as a 5v input that goes to a 3v3 LDO.
The LDO is an ME6211 (https://stm32-base.org/assets/pdf/regulators/ME6211.pdf) which has an absolute maximum input voltage of 6v5 and whose datasheet (pp. 12-14) indicates smooth and continuous regulation from an input voltage range of ~4-6v.
This means that you can tie four AA batteries directly to the 5v input pin and it will safely power your device over the usable lifetime of your cells. No resistor or other power dissipating component required – and if you were to add one, you would only be hurting your efficiency.