Devember 2021 programming a wireless microcontroller

I’m going to program a microcontroller that reacts (LED, siren, etc…) to various metrics received over wireless from other devices.

I am an Excel/Google Sheets expert but I don’t have much coding experience. My main goals for this project:

  • Understand the best microcontroller board for this product that meets my needs
  • Understand how to receive wireless communications
  • Practice proper documentation for coding
  • Try to understand and use Github

I look forward to this challenge. I’m sure I will run into many problems, challenge my small amount of coding knowledge, and complete my first real coding project.


If you have a budget and want to go with a well supported platform that has lots of libraries and knowledgable people on. I’d say look at the many projects people have built with the ESP32 It’s a Wifi chip that can do basic IO. Good enough for a lot of hobbyist sensors out there.


DANGER WARNING DANGER: In order to drive LEDs and sirens and build useful microcontroller stuff successfully you’ll also inevitably end up venturing into electronics a fair bit. If you’re lucky, it’ll cost you at least $200 in various bits and bobs and tools and chips from China (AliExpress/Banggood) and who knows where else (Amazon, mouser, digikey) and in return you might only get a bunch of wasted time and junk and clutter all around your living space, and a bitter sense of failure.

There’s plenty of people around these forums who encourage such behavior, it doesn’t mean it’s the right fit for everyone, physical and usually even worse mental self-harm are not excluded outcomes.

Usually, this type of thing is very niche and not a “very social sport”, it’s mostly an individual activity unless you count new friends/weird people you may run into online. Relationships have suffered as a result of engaging into this type of thing.

With that grim disclaimer out of the way, carry on, good luck! :crossed_fingers:

Before venturing deep into c/c++/python or various SDKs … or too deep into learning how transistors work and digging into various data sheets on uln2003a Darlington arrays or computing whether or not you can charge/discharge a particular MOSFET straight from a microcontroller pin quickly enough… and motors and relays …you’ll probably need a few things first.

@x0r is right, a couple of well known good esp32 board with plenty of pins like this one from wemos … or a pack of 5 or 10 random $3 - $5 esp32 boards would work.

There just isn’t that many microcontrollers with wifi that can be easily programmed, these are particularly cheap and easy to use and not highly specialized.

They’re also very popular with hobbyists.

Next, you’ll probably want to connect the microcontroller to something that blinks and/or makes noise in the physical world. The tiny status led on most esp32 boards that you can blink at will, probably won’t keep your interest for long. For that, you’ll need a soldering iron e.g. a “pinecil” is an awesome tiny one great for this kind of stuff , you’ll need some insulated wire … ideally 2 colors, some 1mm or 0.5mm rosin core solder wire, “helping hands” stand, flush cutters, probably half a dozen prototyping boards and various DuPont connector wire. You might also need/want a crimping tool (e.g. I’m happy so far with my iwiss sn-01bm, haven’t tried many others)

Then, on the software side of things, try using a modular framework like esphome (beeper example). The documentation website has a lot of examples of things bits and bobs you can interface with easily. With it, you mostly specify what you want in your firmware in a yaml config and it takes care of translating that into c++ and pulling in all the libraries and building and flashing the firmware. Once your ESPHome is online, you can interface with it over your home network, e.g. from Home Assistant if what you’re building is an iot home automation project, or just through mqtt or http or plain old TCP or UDP. … depending on how you feel like that particular day.

You can of course do everything “on hands and knees” from scratch, but you can also leverage and build upon other people’s work and you’d still run into plenty of learning opportunity along the way.

1 Like

Personally I would suggest looking at arduinos if you don’t have a ton of programming experience. While they aren’t the cheapest microcontrollers they are a lot more beginner friendly than many alternatives. They offer a good introduction into programming microcontrollers without diving straight into the deep end of dealing with every part of the microcontroller on your own. Also, since they’re pretty hobbyist friendly you’ll find tons of well written examples of how to use them.

1 Like

Thanks, I’ll check it out. I’d like to use Ant+ wireless since it’s most compatible with items that I own. Bluetooth would be a second choice.

I’ve built a dozen or so Arduino projects. I have everything I need for this project (I think) other than the board. I have a fairly nice electronics work bench. I’m decent at soldering circuit board with through hole and surface mount components. It’s the programming side that I struggle with currently.

My wife always asks how many LED’s and power supplies do I need. :joy:

I purchased a Nordic model and I just started playing with it. It does look intimating compared to Arduino. I’m going to give it another week or so, before pulling the trigger on an Arduino. I need to see if any of the Arduino’s support Ant+ wireless.