Category "tutorial"

Automated unit testing in the metal

Unit testing your code is peace of mind. It has two main direct benefits that impact on your confidence about the code you are writing: Testing expected behaviors Avoiding regressions (i.e. breaking something that was working fine before) Unit testing embedded systems is a bit more involved since there is the additional constraint of the hardware itself, sometimes more than one device or even different platforms. Quitting (or not even thinking about it) is the easy answer to the problem....

RAK833 meets Raspberry Pi

You might have heard about The Things Network (TTN from now on) here or somewhere else. If you have not, then it's a good opportunity to visit the project and check if there is a community of users around you. I have been a core member of the TTN Catalunya community for over 2 years now. This year we are working hard deploying several new gateways in Barcelona and doing workshops and hackathons with the main goal of helping individuals and social entities to carry out projects around a LoRaWan open, libre (free as in freedom) and neutral telemetry network....

EEPROM Rotation for ESP8266 and ESP32

The Arduino Core for ESP8266 and ESP32 uses one SPI flash memory sector to emulate an EEPROM. When you initialize the EEPROM object (calling begin) it reads the contents of the sector into a memory buffer. Reading a writing is done over that in-memory buffer. Whenever you call commit it write the contents back to the flash sector. Due to the nature of this flash memory (NOR) a full sector erase must be done prior to write any new data....

Using Google Assistant to control your ESP8266 devices

In my last post I tried to explain how to access your IoT devices at home from the Internet in a secure way using a reverse proxy. Truth is that I had it running since maybe 6 months ago without giving it too much use until recently. Reason? My Nexus 5 had been having serious problems (battery not charging, screen broken, earpiece not working,…) and I decided to replace it with a new mobile phone and the new one has Google Assistant built in....

Secure remote access to your IoT devices

When you are hacking with IoT devices at home you get to face the challenge of accessing remotely to them, that is from outside your home network. I'm not saying your home network is a safe place, beware. But that thing outside, you know, “the Internet”, it's so scary… Unfortunately, most IoT devices are just not ready for the jungle. Neither the commercial ones, nor the hacked ones you might have....

Embed your website in your ESP8266 firmware image

A few months ago I wrote about the process I was using to optimize my website files for SPIFFS prior to upload them to the ESP8266. The goal was to reduce the number and size of the files to help the microcontroller to cope with them in an easier way. Smaller size mean faster downloads and less files mean less concurrency. The process is done using Gulp, a tool to automate processes, and defined in a javascript file....

Grid-eye camera (sliced, of course)

Tindie is a great place to find uncommon electronic components or weird/interesting boards. I use to stroll around it's products to basically see what's new. It's like Kickstarted but for real. One such uncommon and new electronic components is the Panasonic's Grid_EYE AMG88 [datasheet, pdf] infrared sensor. And I first learn about it through Peasky Products breakout board at Tindie. And if you have been reading me lately you might know I'm going through my own LED fever....

Magic Home LED Controller ESPurna'd

Following the bright path (sic) of the Ai-Thinker AiLight / Noduino OpenLight I wrote about a few weeks ago, now it's turn for one of those devices you purchase but once they arrive they are stored in the TODO box until they eventually come back to life. The Magic Home LED Controller [Aliexpress, also available from Ebay] is an ESP8266 based single-color RGB(W) LED strip controller. It works with every 5050 LED strip [Aliexpress] out there....

Using the new Bean Loader CLI from PlatformIO

Last Thursday PunchThrough, the people behind the LightBlue Bean and Bean+ boards, released their new Bean Loader, the application that allows you to upload new sketches to your beans. The great news about this is that, for the first time (!!!) the Bean Loader supports Linux!!! Yeeeha! So I quickly looked for my 4 Beans that have been sad and forgotten in a components box for the last 2+ years and put them to work....

Manage and persist settings with Embedis

For months I've been searching for a settings manager for my Arduino and ESP8266 projects. There are basically two issues to take care of: On memory settings or** how do you access to the configuration values** from your code Persistence or how do you store the configuration across reboots For the first issue common solutions in high level languages are key-value solutions in the form of containers or hash arrays....