I did rewiring for DS-sensor grove-connector, works perfectly and was easiest.
honkkis
@honkkis
Civil engineer interested in IoT
Best posts made by honkkis
-
RE: ExtPort for Core2, two DS18B20 and one Kmeter, pin problem
Latest posts made by honkkis
-
Accurate timesource / loop execution time?
Hi,
I'm developing (UiFLow2, Core2) powermeter/energy counter for wood fired boiler. So far, I've been able to create required hardware, read the sensors using ADC and digital input, but because it's powermeter, it needs exact timekeeping to count generated energy and power accurately. My software has five conditions in main loop for different states of boiler and only one of them is energy generating, other are warming up, cooling down etc...I think there are two options for calculating energy and power:
-
loop that lasts exactly known time, preferably one second (1000ms) or
-
loop lasting artificial time and time period is measured (this can be below one second, or slightly more, even variable)
For the accuracy requirement, for option one it's not catastrophic to have, say 3590...3010 measurements in hour, but for example 2972 would be terrible accuracywise. For option two, still hoping to get measurement about every second. There are three purely analog temp sensors and two digital inputs, conversion times shouldn't be problem.
Is 1000ms timer (UiFlow2 Timer) right tool for this, or timedelta (UiFLow2 Time / ticks)? This should be very easy, if loop execution time is known. Doucmentation for UiFlow2 still need improvements (compared to UiFlow1). I know this ain't running on RTOS, but still want it to be as accurate as possible.
-
-
Powering Core 2 using battery connector?
I'm looking for best and easiesti way to power Core 2 for fixed installation. Due to mounting frame and bases, USB-C connector is tight fit. And it's somewhat untidy and not very practical for this installation. Bus-power would be one possibility, but then, I need to get row connector and do some soldering, I'm using port-connectors for communication otherwise and bus connector would be power only (except for single base).
JST/PHX-battery connector with wires are readily available and I have adjustable power supply for this project. Is there any reason why internal battery connector shouldn't / couldn't be used for connecting fixed PSU? PSU-board I have planned for this use is step-down based on LM2596-series, max current is more than enough (2A) and voltage can be adjusted between 3V to 30V.
I tried booting with battery only, it works ok and initial firmware shows voltage around 4.0V for nominally 3.7V battery supplied with Core 2. It doesn't matter for this purpose, if device thinks it's charging.
Theoretically, it should be ok to use battery connector for fixed suppy, with correct voltage of course?
-
RE: ExtPort for Core2, two DS18B20 and one Kmeter, pin problem
I did rewiring for DS-sensor grove-connector, works perfectly and was easiest.
-
ExtPort for Core2, two DS18B20 and one Kmeter, pin problem
I have Core2 with Extport for Core2. I soldered A port to open connector as it's easier to use with mounting frame than using A connector in Core2. This A-port has Kmeter connected and works well. I have stonatm DS18B20 custom component (https://github.com/stonatm/UiFlow-custom-blocks/tree/master/ds18b20), that requires every DS to have separate pin. I have one DS18B20 connected to Port C, using pin 13 (default).
Now, the problem is, which port to use for second DS18B20? A-port is used for Kmeter. ESP32 reserves pin 34-39 for "input only" and if I try to use port B, D or E, Core2 gives error on screen. Is it possible to set dip switches in a such manner, that those previously mentioned ports can be used? Or use B port and rewire DS18B20 connector by swapping pins 1 and 2 in Grove-connector, as then pins 26 and 36 will are swapped in port B. Will it work?
If there's working DS18B20 custom component that allow multiple sensors in single line, can someone link to it, it will work in this use case too.
Thanks in advance!
-
RE: UIFlow BIG FONT for Core 2...
@hnerik-schmidt said in UIFlow BIG FONT for Core 2...:
lcd.font(lcd.FONT_DejaVu24)
This works, just tried with execute code-block, but for some unknown reason using Unicode font (single size only 24pt) with execute code block:
lcd.font(lcd.FONT_DejaVu24)
causes error 'TFT' object has no attribute 'Font_Unicode'.DejaVu18 works also. Would be nice to have working unicode-fonts, at least here around the Baltic Sea we need dotted A and O.