Can't you have the timer running all the time, and just record its value when the event begins, and subtract that for display and recording from the current value?
Posts made by deshipu
RE: Wemos D-1 Mini I2C?
It will work.
Microcontrollers (like the ESP8266) are not just processors, like in your computer, but "systems on a chip" — that means that there are multiple devices inside that chip, all working together. One of those devices is a "I2C peripheral", which is a piece of electronics dedicated to performing I2C communication — it does that independently from the main processor, and only communicates the results to it. That is how I2C works on, say, Arduino UNO. The ESP8266 has many such peripherals for many different protocols (SPI, UART, I2S, etc.), but it doesn't have the I2C one. However, that is not a problem, because, as you said, you can "bit-bang" that protocol — which basically means that you use the main processor to handle the communication, by using a library specially written for that. Since the ESP8266 is several orders of magnitude faster than Arduino UNO, it can handle such communication with ease and there is no noticeable degradation in performance. In addition, because it is done in software, you can have the I2C bus on pretty much any two pins you choose, instead of being forced to use the pins to which the I2C peripheral is connected internally. You can even have multiple I2C buses at once!
RE: Solarshield 5V on the battery shield
Everything is possible, but I don't think the outcome will satisfy you. There are solar panel controllers dedicated for the task that will perform much better (and safer). The boost converter on the battery shield is not really well suited for this task.
RE: Wemos D1 mini motor shield i2c address issue
Looks like that firmware skipped the reading of the address pins, and instead hardcoded the address. I think it would be best to report an issue on github and ask the author to add it: https://github.com/pbugalski/wemos_motor_shield/issues/new
You can also change the hardwired address, I think it's being set on this line: https://github.com/pbugalski/wemos_motor_shield/blob/master/src/main.c#L72 (The value of the address is doubled there, so if you want 0x2e, you have to set it to 0x5c, etc.)
Buttons Shield for D1 Mini
I'm continuing my quest of designing the shields that I'm missing for the D1 Mini, and selling them on Tindie so that perhaps some manufacturer will pick them up and produce them cheaper in bulk.
This time it's a very simple one: 8 buttons and an I²C gpio expander to handle them. The buttons are arranged in a familiar pattern, well known from the handheld game consoles — four arrows and four fire buttons. It's designed to friction-fit on under shield (to make the whole as thin as possible), so there are no pin headers on it
It works very well with the OLED shield or any other display you might want to use, so that you can make simple games, menus, remote control for a robot or anything else you can think of.
Link to the store: https://www.tindie.com/products/deshipu/x-pad-20-buttons-shield-for-d1-mini/
RE: Wemos D1 pinout diagram
Reset pin is not a GPIO pin, so it doesn't have a number.
Here is a diagram I made for my workshops, maybe that helps: http://micropython-on-wemos-d1-mini.readthedocs.io/en/latest/setup.html#development-board