ESP32 Deep Sleep GPIO Wakeup

June 1, 2020

I have nearly finished the software for my central heating thermostat and am now turning my attention to reducing its power consumption so that it can be run on batteries. The ESP32 has several power saving modes however the intention is to use the deep sleep mode and configuring the device to wake up periodically to check the temperature or to wake up immediately if either the rotary encoder is turned or the switch is pressed. ... Read more …

Tags: esp32 deep sleep gpio wakeup

ESP32 reading SD card using SPI (VSPI)

February 3, 2020

I spent a surprising amount of time today trying to get the ESP32 to read and write to the SDCARD via SPI. I checked kept getting a variety of errors from their own example program sd_card_example_main.c (esp-idf/examples/storage/sd_card/):- E (1386) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107 E (1406) example: Failed to initialize the card (ESP_ERR_TIMEOUT). Make sure SD card lines have pull-up resistors in place. E (358) sdmmc_sd: sdmmc_init_sd_if_cond: send_if_cond (1) returned 0x108 E (378) example: Failed to initialize the card (ESP_ERR_INVALID_RESPONSE). ... Read more …

Tags: esp32 hy-tft320_262k sdcard spi

ESP32 driving HY-TFT320 display

January 10, 2020

I have been interfacing the ESP32 to a HY-TFT320. This module integrates a TFT display, SSD1289 display controller, XPT2046 (ADS7843) touch screen controller and SDCARD connector all connected through to a 2×20 pin socket. The SSD1289 TFT interface has a 16 bit parallel data interface and needs 22 connections in total (CD, WR, RS, CS, RSET, LEDA and DB0-DB15). In addition, the touch interface has 6 connections (DCLK, CS, DIN, BUSY, DOUT and PENIRQ). ... Read more …

Tags: esp32 hy-tft320_262k ssd1289 tft

ESP32 Setup on a Raspberry Pi

December 1, 2019

Today I decided to see if I could get the Espressif ESP32x Development Toolkit to work on my Raspberry Pi 4. The Raspberry Pi is running Linux (albeit an Arm Architecture) so naturally the best starting places was to follow the Linux instructions at and hope that it was a dual binary. Once it had been installed it was quite obvious that it only supported the x86 architecture – which was confirmed using the ‘file’ command on one of the executables in the bin/ directory. ... Read more …

Tags: esp32 pi

IFTTT automation using crontab on Debian / Raspberry Pi

November 30, 2019

We were planning an extended vacation and had concerns about leaving the house empty for so long. As usual you get family and friends to look in every so often but I decided that it would be nice to have some additional security to make the house look occupied. After a bit of research I decided on Internet Enable D-Link DCS-5030L Camera and a set of Meross Smart Plugs. The D-LINK camera was position in such a way that the door could be monitored while the Meross Smart Plugs were connected to various lights strategically placed around the home. ... Read more …

Tags: debian linux pi

Installing AVR Development Tools on an iMac

November 30, 2019

Setting up an iMac to develop software for the Atmel AVR microcontroller (i.e. Not Arduino) is quite straightforward however you do need to have the Homebrew package manager installed. If you have not got Homebrew then you can install it by opening up a terminal window and entering the following command:- /usr/bin/ruby -e "$(curl -fsSL" The AVR development tools can now be installed by entering the following commands in the terminal window:- ... Read more …

Tags: atmel avr avrdragon imac

Installing AVR Development Tools on Debian Linux

November 30, 2019

Setting up Debian Linux to develop software for the Atmel AVR microcontroller (i.e. Not Arduino) is quite straightforward and simply involves installed several packages as show below:- sudo apt install binutils sudo apt install gcc-avr sudo apt install avr-libc sudo apt install uisp sudo apt install avrdude Once this has been done a single source file containing an AVR program can be compiled for an AVR microcontroller as follows (update microcontroller to reflect the one you are using):- ... Read more …

Tags: atmel avr avrdragon linux

Logon to Linux System using SSH Private Key

November 30, 2019

You can use your public / private key pair to login to remote Linux systems without needing to remember the remote accounts password all the time. If you already have a SSH public / private key pair on the local computer then you can skip the next step. If however you have not got one then you will need to create a pair by entering the following command:- ssh-keygen Now that you have a public / private key pair it can be copied to your remote Linux system using ssh-copy-id. ... Read more …

Tags: linux

Raspberry Pi Headless Setup

November 30, 2019

A headless setup is one which isn’t going to be connected to a monitor, keyboard or mouse. In general it is appropriate if you are planning on using the device as a server rather than a general desktop computer. So how can you configure your Raspberry Pi if it hasn’t got a screen, keyboard or mouse? The answer is that you to access it via ssh (Secure Shell). Firstly download an operating system image from https://www. ... Read more …

Tags: pi

Re-Install AVRDRAGON Firmware

November 30, 2019

My ATMEL AVRDRAGON started responding with “bad response to enter progmode” – Unpluging the device and rebooting the computer didn’t solve the problem. I have seen this error before however I only remembered when I found the solution again – the firmware on the dragon needs to be reflashed – I’m sure there must be another way but this seems to fix it – Hence why I am making a note of it here before it happens again. ... Read more …

Tags: atmel avr avrdragon