wilsonmaker
@wilson-m · Mitglied seit Juli 2025
Maker · home automation · Nottingham · new to IoT
- Themen
- 14
- Antworten
- 70
- Punkte
- 0
Erstellte Forenantworten
Could it be lightning? 80 m outside sounds like an antenna.
I had something like this, added a delay(500) before connect and it went away.
Wouldn’t it be easier to just buy the shield?
Is 43 66 the voltage in hex? 0x4366 is 17254, so maybe divide by something?
What baud is the HC-05 set to? Mine came at 9600 out of the box.
Huh, I had that backwards then.
Is the baud the same on both ends? I always get that error when I forget to change it.
Isn’t I2C fixed to 21 and 22 on the ESP32? I thought those were the I2C pins.
LoRa for sure, it goes for kilometres
Von English mit KI übersetzt ·
Super! Auf dieser Platine liegt Netzspannung, also steck sie zurück in ihr Gehäuse, bevor sie jemand anfasst 😄
Nice! Mains on that board, so put it back in its case before anyone touches it 😄
Isn’t BLE the newer one, like Bluetooth 5?
fromString worked for the Pi, and then I switched to the char buffer version. Aoife you were right about the pointer: my first try with c_str() connected once and then failed every reconnect with rc=-2. With the global buffer it’s fine, and the shed board is now talking to Hermetry with the host typed into the setup page.
Von English mit KI übersetzt ·
+1, dieses Argument habe ich auch nie verstanden.
+1, never understood that argument either.
Random question, are your chip antenna and patch on the same edge? I read they shouldn’t face each other.
Ha, I had exactly this with my greenhouse sensor last January, so I can answer for once!
The Arduino stores int as two’s complement. -0.5 °C times 100 is -50, and -50 in 16 bits is 0xFFCE. The top bit is the sign. Read as unsigned that’s 65486, times 0.01 gives your 654.86. Read as signed it’s -50, times 0.01 gives -0.5. Same bytes, the codec just has to know they’re signed.
So in your codec change the format from u16be to i16be, keep the scale. Add a test vector for a negative value so it never sneaks back:
{ "at": 0, "field": "temperature", "fmt": "i16be", "scale": 0.01, "unit": "°C" }
"tests": [
{ "name": "positive", "fport": 1, "hex": "0960", "expect": { "temperature": 24.0 } },
{ "name": "below zero", "fport": 1, "hex": "FFCE", "expect": { "temperature": -0.5 } }
]
On the Arduino side use int16_t instead of int, so it stays 2 bytes if you move to a 32-bit board. Then Check and Publish. The key name and unit stay the same, so it can go out as a new revision of the same codec. Reference: Write your own codec

