top | item 34287214

(no title)

hackshack | 3 years ago

Agreed - they deliver a very flexible, cost-effective, performant MCU. Downsides (to me) are toolchain and power consumption.

Has the Arduino toolchain been enough for home automation? I’ve been playing with Zephyr, but when I’ve gotten down into those gritty late-AM Saturday night programming hours, actual library support seems to be patchy, outside Arduino and Espressif toolchains.

I ended up running MicroPython on the Sonoff Dual R3 (a cheap and cheerful box about the size of a fig, controlling two separate line voltage relays) but GPIO access is really unsafe, which makes it useless for sensing, but fine for control. For everything else I use the ESP-WROOM-32, a fairly ancient dev board, and it’s highly capable, but I get the sense there are better boards for prototyping in 2023.

If you have a preferred board, do tell!

discuss

order

dekhn|3 years ago

I want to emphasize that MicroPython is actually really great, especially on the ESP-32. I was pretty skeptical (having written both Arduino and ESP-IDF code) but after using it a bit, it solves a wide range of problems for me. I was surprised to see that interrupts in python actually can be fast enough to be useful, and it can control a number of the peripherals through DMA, which means you can often do stuff at hardware speeds w/ no CPU involvement. You also get a REPL and a real filesystem for free. And I know I can always take whatever I've written and transliterate it to ESP-IDF.

sen|3 years ago

I use a wide mix of ESP-WROOM-32, Lolin ESP-32-OLED (when I want on-board display), and all sorts of other random ones.

For all my home automation I use ESPHome and Home Assistant (20+ custom devices, plus however many light bulbs and Sonoffs and stuff).

For tool chain I personally use Platform.IO in VSCode but I’ve done a fair few with Arduino IDE and it works in a pinch.

csstanton|3 years ago

Would you mind sharing some of the Home Assistant projects you’ve built? I have some ESP32-CAMs coming and plan to setup a cat box monitor.

phoehne|3 years ago

There are 2 flavors of the ESP, depending on model. The Xtensa cores and RISCV, go with the RISCV variant. The Xtensa variant requires you to use their compilers, which are derived from he ones provided by Cadence. There's a better path long-term for the RISCV cores to get tooling on par to what's available for ARM.

jononor|3 years ago

The Xtensa based ESP32 chips have upstream support in GCC, do they not?

trilbyglens|3 years ago

Toit is where it's at for esp32 projects. It runs on a VM system called Jag, which lets you basically deploy containers to an esp. It also handles updates via wifi, logging and all that, while giving you a terse language with quite a lot of packages to build things with.