It was actually launched in Jan 2023. It's been mostly out of stock, but a bare module with 4mb spi flash is in stock right now. However, currently populated dev boards are overpriced.
The ESP32-C3 has a limited number of IOs but it is very small and has a connector for an external antenna (At least the Seeed Xiao ESP32-C3 does). It's great for many applications when a bit of Wifi range is needed.
If you're just making HTTPS requests to your own servers, you can simply include the root certificate of the CA you're using, pass it to the config when calling `esp_http_client_init` (https://docs.espressif.com/projects/esp-idf/en/latest/esp32c...) and then you probably don't have to worry about it for a long time, it will work through your regular certificate rotation.
The -S2 (and -S3?) have native USB so you don't need a USB-UART chip on-board, and they can thus emulate other classes of USB devices. That's something I was hoping to find mentioned in this guide, but nope.
Yeah, this is great if you're making your own PCBs -- all you need is the ESP32 module, power supply and a USB connector.
There's no need for a usb-serial converter, JTAG connector (you can debug over USB), or a serial header with yet another random pinout that you have to figure out every time you want to program the thing...
Exactly! Our board at work got all our JTAG pins back for us to use for other things, and we got a more robust programming/debugging setup to boot. So nice. The S3 is phenomenal, and the LX7 on it is surprisingly powerful too.
Nice. They also tidied up the GPIOs a lot, which is such a good quality of life improvement (though I did spend a while hunting through the datasheet looking for the bit where they tell you that GPIO7 can only be used as an output during a full moon, or whatever).
Unlike the ESP32-S ones though, that's all it does on the C, so you can use it to program and debug the thing, but you cannot make your own USB device with it.
Not much to be said, it should "just work" out of the box. You plug a board in (for example this one https://www.dfrobot.com/product-2566.html, I've seen it in a bunch of online stores in Europe), and it should give you a COM port on Windows, a `/dev/cu.usbmodem...` device on macOS, and something similar on Linux. Then all the usual tools should work as normal, at least the ones that come with ESP-IDF.
On the chip or the modules, this is pins GPIO18 and GPIO19 that just need to be directly connected to USB D- and D+. Of course the chip still needs between 3.0V and 3.6V for power, so you can't power it from USB directly. If the firmware is just rebooting all the time (sometimes the case on a fresh module), you may need to pull GPIO9 low to enter bootloader instead (https://docs.espressif.com/projects/esptool/en/latest/esp32c..., there is a button for this on some boards), but otherwise you can just flash it in normal mode too.
Oh, so this isn’t full in circuit debugging like ESP-PROG would enable, correct? These parts just have built in USB-Serial for programming and printing to the terminal without an external IC.
Edit: Never mind, it does appear to allow full in circuit debugging. I’ll have to do some more research.
As far as debugging goes, you basically need to run `idf.py openocd` to start OpenOCD, and then connect to it with the gdb that's part of the ESP-IDF SDK, by default it should be listening on port 3333. At least that's how I have it set up in CLion.
I haven't followed QMK recently, but I assume someone is working on an ESP32 port, now that some chips have USB device support. I'm not sure what I'd do with a keyboard that has WiFi, but I'm sure cool (and non-nefarious) ideas will emerge.
I have one of the Wemos C3 pico boards which rely on the C3's native USB serial controller. The experience is pretty rough for quick iterations on a devboard on Windows.
You restart the board to programming mode by holding down the BOOT button down while pressing RESET. Wait a few seconds, then COM7 is available. You program the board, and then manually RESET the board with the button. COM7 disappears. Then you wait a few seconds, then COM6 appears. Oh, did you print some debug info on boot? Too bad, it takes a few seconds for the virtual serial port to appear in Windows so you just can't get input during that time because the reset resets the USB controller as well (the entire chip).
This is the benefit of on-board USB-UART chips: if you need to reset the chip, your USB controller doesn't need to be reset so your serial port stays open. Additionally, most ESP32 dev boards offer automatic reset by utilizing the DTR or RTS pins of the UART chip and a couple of transistors.
No button presses necessary (there are no buttons even, I have a slide switch on my PCB but almost never need to use it), everything resets automatically (except when it's in deep sleep, then I need to unplug it and plug it in again), I see log lines from the very first line in `app_main()`, etc.
I'm using a recent version of the ESP-IDF framework including all its tools (there is a VS Code extension that has a `Build, Flash and Monitor` button, I think all the operations are just run using the `idf.py` script, but not sure).
I realized after posting that this is a personal blog, not a corporate one - so I do regret and apologize for being rather blunt.
(I think the .io and me misreading as “etherway” made me think it was company-published and for right or wrong I assume companies only ever blog for brand recognition, so am probably over critical of them)
That’s partly a big compliment - your blog is really well styled and easy to read.
RISC-V is a fairly popular topic on HN, and for me at least it’s really interesting as both a low-level nerd, as well as curiosity about what impact it may have given we lived in an x86 world for a long time, before ARM really took hold, and now that there’s a new player and it’s an open standard is really interesting.
Could it be the “Linux kernel” of the hardware world? I have probably 20x ESP8266s doing various things in my life, maybe 5x ESP32-Sx, and will probably pick up a few -Cx, and they’ll be the first RISC-V device I own.
>I know the ESP32-Cx is based on the RISC-V architecture. Could you elaborate why this is a feature or in what way this is an advantage?
Long term support. As Espressif has publicly declared their intent to fully move to RISC-V, it is not in your interest long-term to base your designs on the ISA that's been deprecated.
I experimented with their TTGO LoRa boards and gave up out of frustration. That said, folks (including less technical) seem to have success with them for things like the meshtastic project, so they can’t be terrible. YMMV
I've been very happy with their esp32 boards. Easy, cheap, well integrated.
The only issue I've had is the battery charger circuit on some boards has a fuse instead of a diode making it a hazard (realized pretty quickly while testing). This is supposedly fixed on newer revisions but there's always a chance of getting an old one through some sources....
I have used and deployed the ttgo lora boards. The boards are a bit cramped, soldering the headers requires you to remove the screen in order not to melt the ribbon cable (w I didnt try). But they work. Zero problems in the field but two out if 20~ died on my bench while just coding/out of nowhere. Furthermore, IIRC, the default i2c pins used in many libraries are used for lora/oled so you need to define two custom pins using TwoWire for example.
I used a couple for automated garage doors and I also build a little CDP/LLDP query tool to determine what switch port unlabeled Ethernet drops are connected to. The door openers are bulletproof and haven't had any issues with my tool either.
They're hit or miss. I've used a few of their various boards successfully, but you usually wind up hunting down random libraries or having to tweak old code examples.
I wouldn't use them for my first foray into ESP32, but if you're fairly decent at debugging C, you'll probably be fine.
I built a clock with iCal support with the LILY Pi. Everything seemed to work, although I found it challenging to reproduce the example application, but once I did, things were fine. Eventually, I rearranged to build in Visual Studio with platform.io which I like a lot more; I feel there's more clarity than the Arduino IDE.
Currently I have one device at home, and a second in the field, which a friend is planning to use once I make some timezone adjustments (Google stopped providing vtimezone data for new calendars, apparently, so I need to get it somewhere else).
I want to build a game with
- a wireless led (a 5-light length of a led strip would work)
- a camera or other module to tell what color ball is in front of it
And a controller to change multiple of the wireless LED lights based on different cameras...
Esp32-cam has 4 available gpio pins (there are 2 more pins but one is used by SD card and one is connected to built-in flash) plus 2 uart pins. With narrow angle camera it costs around $6. Wide angle camera costs $4 or so. You need serial port to program it. There are some other limitations you'll only find when you start playing with it like DAC not working when wifi is on. So theoretically you can control 6 LEDs directly. On one 18650 battery it lasts 2 hours.
--------------
| SDCARD |
5V -|1 16|- 3V3
GND -|2 CAMERA 15|- GPIO_16 (useless, can't be used for anything)
A GPIO_12 -|3 14|- GPIO_0, connect to GND during programming, used by camera, don't use!
A GPIO_13 -|4 13|- GND
A GPIO_15 -|5 12|- 3V3/5V
A GPIO_14 -|6 11|- UART RX, GPIO_3
A GPIO_2** -|7 10|- UART TX, GPIO_1
A GPIO_4* -|8 9|- GND (weird, don't use)
| LED |
--------------
- A=analog input 0..4096
- GPIO_4 is connected to FLASH LED, if you want to use as input you need to desolder resistor R13 that goes to base of npn transistor
- GPIO_2 is HS2_DATA0 for SD card, it has 47k pullup
You could use addressable RGB LEDs, like the WS2812B. You just need to supply power and a single IO line to control them so you don't need any external hardware like MOSFETs.
The ESP32 can read the camera, recognize objects/colors, and control the LEDs without any external systems.
Using ESP32s connected via Wifi and MQTT to a host (Pi or something) would be the easiest way I can think of to coordinate that.
You could also go without a host, by having the ESP with the ball randomly choose another and send the command to it, and connect them all together with ESP-NOW which is direct P2P communication.
(no affiliation and never bought from them, just an example of what to look for)
If you never worked before with electronics, however, you'll probably also need some basic equipment to test things and/or add functions (say you want one more LED, or need to add/replace a capacitor, drive
more current with an i/o line etc.).
Take also a look at the beginners section at the EeevBlog forums. It contains some good advice on how to set up a basic workbench: https://www.eevblog.com/forum/beginners/
Normally only if the display has its own controller, and you talk to it via SPI, i2c, or an 8 or 16 bit interface.
But those methods are slower and if you're doing a higher resolution user interface, the RGB interface lets you drive stuff like an 800x480 display at well over 60 fps.
For those looking for cheap dev boards, I've had good luck with 'HiLetgo' on Amazon. The WROOM-32S is my go-to, but I also use the WROOM-32U when I need an external antenna (it _must_ be connected) or the 32S+CAM module for the camera. I haven't gotten a DOA component yet.
The Ali prices aren't significantly cheaper than many of the sellers on Amazon (at least in small quantities), you don't have to wait a month, and if you get a dud, replacements are easy.
Even though I started with the 8266, as the article mentions, there's little reason to choose that outdated board at this point. It's worth the extra $1 to get the 32 in a DEV board configuration. Having the CP210x and USB onboard is also worth it for the hobbyist.
Amazon is giving me prices of $25-$35 for all the esp32, including the hitletgo you mentioned. Ali is $1.5-$2. Amazon also says 2+weeks deliver for many, Ali says 3 weeks. I'm in Canada
Looks like the HiLetgo also has an ESP32 board with integrated LCD display. Boards with integrated displays I found to be very cool when beginning to play with. My "Hello World" was a graphical traffic light (bonus using the integrated buttons to simulate car-over-sensor or pedestrian hitting crossing button).
Many cases that don’t require Bluetooth I still find the 8266 worthwhile. Especially if you’re trying to build a product and BOM cost are being considered. The extra $1 doesn’t matter for hobbyists. Also I second the HiLetgo products, I have dozens of their products and it’s always good quality.
My new HomePod was delivered yesterday and while exploring I discovered HomeKit now has Matter support. I have a few ESP 32s lying around and wondered if I could connect them directly instead of bridging through ESPHome / Home Assistant. Apparently you can! Will be trying it out later: https://docs.espressif.com/projects/esp-matter/en/main/esp32...
Whoa. You can also use their ecosystem to put together a Thread border router! I think your HomePod might integrate that functionality already, but this is super interesting for someone like me and my old trusty Asus wifi router.
I have been working on the Toit language for the ESP32 for a number of years now -- and it has been an enjoyable challenge to build an open source stack capable of supporting live reloading on a micro-controller that can run for years on batteries.
I've only been building things with Arduino Uno/Nano/Mega (clones) so far and they are kind of limited. Those ESP32 I've now got seem to have _everything_ onboard: lots of IO pins, hardware PWM (although I do not understand that fully yet), WiFi, Bluetooth, hall and temperature sensor onboard.
All of that for 8 Euro/piece. It's sick for IoT projects, really looking forward to doing more of that.
edit: I'd love if Arduino et. al. would start using USB-C plugs though. I've got everything from USB-A to micro USB around here and I'm constantly looking for the right cable to use a board. Does anybody know why they haven't switched to USB-C yet?
I suspect USB-C connectors just cost 5 cents more so they aren't used on most dirt cheap dev boards. I've seen adafruit update their stuff to USB-C but they also charge a good premium over the generic ebay clones.
Amusingly, the PWM output we do on our firmware is actually done using the RMT infrared remote control peripheral instead, as the LED strips we need to control are too fast for the internal PWM controller lol
I just had a quick glance at the PWM documentation but I don't fully grasp it anyway: I select one of the 16 internal PWM controllers, set it's clock/frequency and then bind an output pin to that.
I thought that fading a LED would then stick to the frequency of the PWM controllers, but it seems I still have to take care of the speed?
I thought setting the PWM frequency to 100 Hz and cycling my LED brightness from 1 to 100 would take 1 second. It doesn't work that way it seems?!?
Just got into IOT devices and I am using RP2040 boards(with wifi and without wifi, bluetooth is enabled now I think), what's the advantage of ESP32 to RP2040 these days? It's $4 ~ $6 a piece and also is solder-able to your base-board if you need make your own, it of course runs on its own without any base-board perfectly fine.
Compared to the ESP32-S3, the RP2040 doesn't have Wifi/BT, doesn't have an RGB display controller, has slower clocks, and has less RAM and Flash.
For most IoT devices the ESP32-S3 is overkill unless running a large display, and you could use the cheaper ESP32-C3, which has 1 core instead of 2, no RGB interface, and less GPIO. These run about $2 each for a solder-able module with built in antenna: https://www.digikey.com/short/cttthh0h
It could be an advantage if the rp2040 had a decent low power mode - then you could only turn on the wifi when you need it (eg data upload every few hours) and run for a year on battery. Alas it doesn't...
I think the main advantage (to some, in the current geopolitical climate) is that it's not Chinese.
The ESP series can disable wifi/bt entirely if needed, their low power sleep is pretty good. IIRC someone got a year or more out of a single 18650 cell doing very slow updates.
ESP32 doesn't have RP2040's PIO. It's just amazing, and can easily emulate RGB display controller or whatever you want it to. Even software HDMI with most CPU power still available. Thus bitbanging possibilities are endless, and this chip can sometimes replace an FPGA.
Pi Pico W boards also indeed have Wifi and recently bluetooth was enabled.
RP2040 also overclocks pretty easily, and people have pushed it even past 400 MHz. Wouldn't overclock in anything important, but for hobby projects — why not! It's about as fast per clock as dual core ESP32 (except for DIV & FPU math).
Both chips have their uses. For example ESP32 got HW FPU and integer division division, those can really help in some cases.
Support for the ESP8266 I had sitting in my desk drawer is a little rough, the code templates they provide don't seem to work out of the box. I gave up and am just buying an ESP32. Should be a much better experience, I'm hoping.
A word of warning on this. It uses a custom fork of LLVM/Clang/Rust which adds support for a new architecture. The tooling that sets up this environment has failed in obscure ways each time I’ve attempted to set up and build one of their own hello world samples.
S2 and C2 are not old versions of S3 and C3 (C2 isn't even released yet), they are just cut down/lower cost version (but also with some added features for low power operation).
If it's a guide maybe you should mention that the original ESP32 is still for sale and still faster than some of the newer alternatives. There is also a new faster risc-v based variant without wifi/bt that was recently presented called ESP32-P4.
Some projects don't work with the newer boards (wled for example).
Partly this is because the Esp sdks aren't as mature for the newer boards. This is very true for the brand new C6 series, but somewhat true for th S3 and C3 lines as well
I wish the BSP was more robust. You try much, it dies. E.g. open/close connections to an IoT server out there repeatedly. Or try to talk to two endpoints over network with any kind of bandwidth. Even the serial code is fragile.
It's good for proof-of-concept hobby projects. But on the job we've had to repair the BSP each time.
'Board Support Package'. The library that FreeRTOS links to or whatnot, custom to each board shipped (a board being, SOM on a little dev card etc)
They vary massively. Usually written in a sweatshop in the far east by students, pushed out and forgotten because they are table stakes but not a profit center.
They usually include support for board boot, threads, timers, and something that looks like networking.
I say 'looks like' because they are often paper-thin implementations of a familiar API, with little or nothing inside. No proper flow control; no dynamic anything. Not even thread-safe as a rule.
Looks really interesting, do you mind sharing it (if its open-source) once its done? Probably it could be a great addition to https://github.com/esp-rs/awesome-esp-rust
This is great. I tried to spin up a small project over the Christmas break and got bogged down with so many options for buying an esp32 and then struggled working through the docs. I previously worked with an Arduino Uno years ago and that thing felt like it had a better UX for someone that is a real amateur when it comes to hardware. Glad to see a resource like this cut through the fog.
I've been using Wemos and other various 8266 and ESP32 boards but recently picked up a M5StickC PLUS and i dont think I'll ever go back to those little standalone boards. Having everything in a nice little case with battery and most of the sensors i need, it is def a good way to go. Poked around with that FlowUI stuff and it was just too creepy to have to have my microcontroller connect to a server across the globe to program it, so a switched back to Arduino and using OTA.
The whole M5Stick ecosystem of addons it awesome too.
Yes, there's a grove connector for 3.3v on one end and more GPIO that can handle up to 5v. They have a lot of i/o on that particular device already allocated - there's a screen, a beeper, a microphone, IR and LED out, an RTC, and a 6-way motion detector, plus the buttons and a small (120mAh) battery with charging management hardware. If you are unhappy about having that much power and flexibility for under $20 you might be a little hard to please :-)
Larger units have 2, 3, or 6 grove connectors, plus a big library of pluggable peripherals.
For those who want to start experimenting with a fully loaded device ready to go, the M5Stack Core2 is a great option because it includes a ~2-inch color touch screen, soft buttons, 16 MB flash and 8 MB PSRAM, a speaker with I2S amplifier, PDM microphone, 10 programmable LEDs, vibration motor, RTC, microSD slot, lithium battery, 6-axis IMU, M-Bus Socket, and Grove connector for $50 delivered.
M5Stack makes a huge ecosystem of >100 add-on modules that snap onto the bottom of the Core2's form factor, including a wide range of sensors, LoRa & cellular radios, I/Os, interfaces, servo drivers, GPS, cameras, HMDI, RJ45, UWB, RFID, etc. It's quite a clever modular expansion system that makes prototyping (or just playing around) super easy.
Note: I linked (and have) the AWS IoT Devkit version of the Core2 which comes with an upgraded battery module on the bottom vs the standard Core2 (a bit more Mah plus ten RGB LEDs built-in). It's also $10 cheaper than the base Core2 on Amazon thanks to AWS subsidy. The only difference is it comes with AWS Fire IoT Devkit firmware pre-flashed but it only takes a minute to flash it back to stock Core2 firmware.
Anyone have a recommendation for something that can take 2 USB in and be the USB device to 2 separate up stream systems? I’d like to build something can pass through a keyboard and mouse to 2 systems but also embed some hot key actions and the like so it always works regardless if my preferred OS install is configured and booted.
The Teensy is very popular for acting as either USB host or peripheral and there's lots of projects to draw ideas and code from. The latest one only has 2 physical USB ports, so you would have to use a hub for your use case. I don't think you'll find a microcontroller with 4 physical ports anyway.
You want 2 or more off CH9350 - HID mouse/keyboard to serial adapters - they are designed for exactly your application. Wire back-to-back and piggyback an ESP of your choice on the serial ports to eavesdrop/intercept/augment. Available from Ali.
217 comments
[ 3.0 ms ] story [ 271 ms ] threadI don't think that you can buy this one yet..
https://www.adafruit.com/product/5670
edit: I'd wait to buy it regardless, software and sdk is still under active development.
https://github.com/espressif/esp-idf/issues/10423 https://www.reddit.com/r/esp32/comments/10pkuin/esp32c6_real...
I'm surprised that they don't talk about OTG in this article... Maybe only the S-series supports it
https://www.aliexpress.us/item/3256804900845431.html
(in stock as of 9:56AM PST Feb 4 2023)
I haven't used it, but there now seems to be some good support in the ESP-IDF Framework: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/...
See https://docs.espressif.com/projects/esp-idf/en/latest/esp32c...
If you need to make requests to other people's servers, there is a tool to generate and include a bundle from Mozilla, that you can update in the future as part of an OTA update (https://docs.espressif.com/projects/esp-idf/en/latest/esp32c...).
There's no need for a usb-serial converter, JTAG connector (you can debug over USB), or a serial header with yet another random pinout that you have to figure out every time you want to program the thing...
Unlike the ESP32-S ones though, that's all it does on the C, so you can use it to program and debug the thing, but you cannot make your own USB device with it.
On the chip or the modules, this is pins GPIO18 and GPIO19 that just need to be directly connected to USB D- and D+. Of course the chip still needs between 3.0V and 3.6V for power, so you can't power it from USB directly. If the firmware is just rebooting all the time (sometimes the case on a fresh module), you may need to pull GPIO9 low to enter bootloader instead (https://docs.espressif.com/projects/esptool/en/latest/esp32c..., there is a button for this on some boards), but otherwise you can just flash it in normal mode too.
Edit: Never mind, it does appear to allow full in circuit debugging. I’ll have to do some more research.
There is more info here https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32c3/..., the ESP-IDF VS Code extension should have this doable with one button click.
I added a note to the Article.
You restart the board to programming mode by holding down the BOOT button down while pressing RESET. Wait a few seconds, then COM7 is available. You program the board, and then manually RESET the board with the button. COM7 disappears. Then you wait a few seconds, then COM6 appears. Oh, did you print some debug info on boot? Too bad, it takes a few seconds for the virtual serial port to appear in Windows so you just can't get input during that time because the reset resets the USB controller as well (the entire chip).
This is the benefit of on-board USB-UART chips: if you need to reset the chip, your USB controller doesn't need to be reset so your serial port stays open. Additionally, most ESP32 dev boards offer automatic reset by utilizing the DTR or RTS pins of the UART chip and a couple of transistors.
No button presses necessary (there are no buttons even, I have a slide switch on my PCB but almost never need to use it), everything resets automatically (except when it's in deep sleep, then I need to unplug it and plug it in again), I see log lines from the very first line in `app_main()`, etc.
I'm using a recent version of the ESP-IDF framework including all its tools (there is a VS Code extension that has a `Build, Flash and Monitor` button, I think all the operations are just run using the `idf.py` script, but not sure).
That’s weird phrasing to say that the S2 is the older version, rather than the S3 is newer.
Also, the AI links to a GitHub for doing ML on all versions - exactly what is this “AI support”?
IMO the most interesting thing between the ESP32-Cx and ESP32-Sx is that the C is a RISC-V architecture
https://gist.github.com/sekcompsci/2bf39e715d5fe47579fa184fa...
I'm also working on my writing skills. So forgive me for styling errors.
I know the ESP32-Cx is based on the RISC-V architecture. Could you elaborate why this is a feature or in what way this is an advantage?
A drawback is that ESP32 RISCV cores don't feature FPU, if I am remembering correctly.
(I think the .io and me misreading as “etherway” made me think it was company-published and for right or wrong I assume companies only ever blog for brand recognition, so am probably over critical of them)
That’s partly a big compliment - your blog is really well styled and easy to read.
RISC-V is a fairly popular topic on HN, and for me at least it’s really interesting as both a low-level nerd, as well as curiosity about what impact it may have given we lived in an x86 world for a long time, before ARM really took hold, and now that there’s a new player and it’s an open standard is really interesting.
Could it be the “Linux kernel” of the hardware world? I have probably 20x ESP8266s doing various things in my life, maybe 5x ESP32-Sx, and will probably pick up a few -Cx, and they’ll be the first RISC-V device I own.
The main feature seems to be that it's an open architecture, so you don't have to rely on the things that a manufacturer provides you.
I also added your comparison table to the article.
And thank you for the compliment!
Long term support. As Espressif has publicly declared their intent to fully move to RISC-V, it is not in your interest long-term to base your designs on the ISA that's been deprecated.
The only issue I've had is the battery charger circuit on some boards has a fuse instead of a diode making it a hazard (realized pretty quickly while testing). This is supposedly fixed on newer revisions but there's always a chance of getting an old one through some sources....
I wouldn't use them for my first foray into ESP32, but if you're fairly decent at debugging C, you'll probably be fine.
Currently I have one device at home, and a second in the field, which a friend is planning to use once I make some timezone adjustments (Google stopped providing vtimezone data for new calendars, apparently, so I need to get it somewhere else).
And a controller to change multiple of the wireless LED lights based on different cameras...
Is ESP32 suitable?
- GPIO_4 is connected to FLASH LED, if you want to use as input you need to desolder resistor R13 that goes to base of npn transistor
- GPIO_2 is HS2_DATA0 for SD card, it has 47k pullup
https://www.espressif.com/en/products/devkits/esp-eye/overvi...
The ESP32 can read the camera, recognize objects/colors, and control the LEDs without any external systems.
Light up one tube out of 10.
Ball needs to pass through tube.
Once the ball has gone through another tube lights up. Goto step 1...
More can be added to the game, but that's the starting basis.
How would I coordinate the various ESP32? I'd need a raspberry pi, no?
Using ESP32s connected via Wifi and MQTT to a host (Pi or something) would be the easiest way I can think of to coordinate that.
You could also go without a host, by having the ESP with the ball randomly choose another and send the command to it, and connect them all together with ESP-NOW which is direct P2P communication.
For example:
https://www.freenove.com/store.html
https://www.ebay.com/itm/304704446185
(no affiliation and never bought from them, just an example of what to look for)
If you never worked before with electronics, however, you'll probably also need some basic equipment to test things and/or add functions (say you want one more LED, or need to add/replace a capacitor, drive more current with an i/o line etc.).
Take also a look at the beginners section at the EeevBlog forums. It contains some good advice on how to set up a basic workbench: https://www.eevblog.com/forum/beginners/
The IPS version of this is my current favorite: https://www.aliexpress.us/item/3256804766379290.html
But those methods are slower and if you're doing a higher resolution user interface, the RGB interface lets you drive stuff like an 800x480 display at well over 60 fps.
The Ali prices aren't significantly cheaper than many of the sellers on Amazon (at least in small quantities), you don't have to wait a month, and if you get a dud, replacements are easy.
Even though I started with the 8266, as the article mentions, there's little reason to choose that outdated board at this point. It's worth the extra $1 to get the 32 in a DEV board configuration. Having the CP210x and USB onboard is also worth it for the hobbyist.
No point in ordering random ones from Amazon IMO.
The ESP32-C3 dev board is around $8 too, and the ESP32-S3 around $15 if you need tons of IO and an RGB interface.
https://github.com/espressif/esp-idf/tree/master/examples/op...
https://docs.toit.io/language/#toit-language-basics
I have been working on the Toit language for the ESP32 for a number of years now -- and it has been an enjoyable challenge to build an open source stack capable of supporting live reloading on a micro-controller that can run for years on batteries.
https://github.com/toitlang/toit
https://github.com/berry-lang/berry
I've only been building things with Arduino Uno/Nano/Mega (clones) so far and they are kind of limited. Those ESP32 I've now got seem to have _everything_ onboard: lots of IO pins, hardware PWM (although I do not understand that fully yet), WiFi, Bluetooth, hall and temperature sensor onboard.
All of that for 8 Euro/piece. It's sick for IoT projects, really looking forward to doing more of that.
I've got these: https://www.amazon.de/dp/B074RGW2VQ
edit: I'd love if Arduino et. al. would start using USB-C plugs though. I've got everything from USB-A to micro USB around here and I'm constantly looking for the right cable to use a board. Does anybody know why they haven't switched to USB-C yet?
I thought that fading a LED would then stick to the frequency of the PWM controllers, but it seems I still have to take care of the speed?
I thought setting the PWM frequency to 100 Hz and cycling my LED brightness from 1 to 100 would take 1 second. It doesn't work that way it seems?!?
I quite like the separation between the two functions.
For most IoT devices the ESP32-S3 is overkill unless running a large display, and you could use the cheaper ESP32-C3, which has 1 core instead of 2, no RGB interface, and less GPIO. These run about $2 each for a solder-able module with built in antenna: https://www.digikey.com/short/cttthh0h
Or $6 for a dev board with USB built in: https://www.digikey.com/short/9rp1zbb3
I'd compare the RP2040 more to your classic STM32 arduino dev board, with the ESP series in another class above those.
https://www.adafruit.com/product/5526
Bluetooth support is supposed to be added in the next version of the SDK.
I think the main advantage (to some, in the current geopolitical climate) is that it's not Chinese.
The ESP series can disable wifi/bt entirely if needed, their low power sleep is pretty good. IIRC someone got a year or more out of a single 18650 cell doing very slow updates.
ESP32 doesn't have RP2040's PIO. It's just amazing, and can easily emulate RGB display controller or whatever you want it to. Even software HDMI with most CPU power still available. Thus bitbanging possibilities are endless, and this chip can sometimes replace an FPGA.
Pi Pico W boards also indeed have Wifi and recently bluetooth was enabled.
RP2040 also overclocks pretty easily, and people have pushed it even past 400 MHz. Wouldn't overclock in anything important, but for hobby projects — why not! It's about as fast per clock as dual core ESP32 (except for DIV & FPU math).
Both chips have their uses. For example ESP32 got HW FPU and integer division division, those can really help in some cases.
Corrected it.
All current variants: https://www.espressif.com/en/products/socs
Wouldn't it be better to just recommend the S3, where there is currently only one version available?
There are like a dozen different versions for the ESP32.
"Two or one CPU core(s) with adjustable clock frequency, ranging from 80 MHz to 240 MHz"
In this case it seems to be the better choice to just use the ESP-S3 with better encryption support and support for Cameras.
Partly this is because the Esp sdks aren't as mature for the newer boards. This is very true for the brand new C6 series, but somewhat true for th S3 and C3 lines as well
It's good for proof-of-concept hobby projects. But on the job we've had to repair the BSP each time.
I am only starting in the IOT Hardware World.
They vary massively. Usually written in a sweatshop in the far east by students, pushed out and forgotten because they are table stakes but not a profit center.
They usually include support for board boot, threads, timers, and something that looks like networking.
I say 'looks like' because they are often paper-thin implementations of a familiar API, with little or nothing inside. No proper flow control; no dynamic anything. Not even thread-safe as a rule.
https://www.lilygo.cc/products/t5-4-7-inch-e-paper-v2-3
I’m working on a rust-based information display browser for it.
https://doc.riot-os.org/group__cpu__esp32.html
Would you mind explaining what the advantage is over the ESP-IDF or the Arduino-SDK?
e.g. the Bluetooth examples will run without modification on an nRF52 or ESP32 board.
I cannot recommend the M5 stack highly enough. I did a lot of ESP32 programming for my LED art hobby projects from 2016-2020 and these are amazing.
Using just your browser you can transform these into Bluetooth proxies for Home Assistant with https://esphome.github.io/bluetooth-proxies/
The whole M5Stick ecosystem of addons it awesome too.
I've been thinking about getting one but the I/O looks so anemic... Does it have extra pins on the inside or 3 GPIO's is all you get no matter what?
Larger units have 2, 3, or 6 grove connectors, plus a big library of pluggable peripherals.
https://www.amazon.com/dp/B08VGRZYJR
M5Stack makes a huge ecosystem of >100 add-on modules that snap onto the bottom of the Core2's form factor, including a wide range of sensors, LoRa & cellular radios, I/Os, interfaces, servo drivers, GPS, cameras, HMDI, RJ45, UWB, RFID, etc. It's quite a clever modular expansion system that makes prototyping (or just playing around) super easy.
https://shop.m5stack.com/collections/all-products/m5stack-co...
Note: I linked (and have) the AWS IoT Devkit version of the Core2 which comes with an upgraded battery module on the bottom vs the standard Core2 (a bit more Mah plus ten RGB LEDs built-in). It's also $10 cheaper than the base Core2 on Amazon thanks to AWS subsidy. The only difference is it comes with AWS Fire IoT Devkit firmware pre-flashed but it only takes a minute to flash it back to stock Core2 firmware.
https://www.pjrc.com/store/teensy41.html
However... it just occurred to me I could connect 2 together for cross signaling over the other pins and have 2 in and 2 out that way.
A project using it: https://github.com/satoshinm/pill_serial
Specs for one with 3 usbs: https://www.st.com/en/microcontrollers-microprocessors/stm32...
I've never heard of a microcontroller that provided the feature you're looking for, unfortunately.