August 8, 2020

The second release of CNC BASIC is now available from the Github Repository. The new version has the following changes:- An include commands was added to the BASIC language which allows other files to be included. The aim is to provide a minimum amount of built-in CNC functions while allowing higher level operations to be implemented directly in BASIC. This will allow the functionality to be extended without the need to change the core language for each new function. ... Read more …



July 29, 2020

I was a time served machinist in the 1980s working on non-CNC milling machines before moving into software development which I have done for the last 35 years. I have recently acquired a simple CNC machine which is programmed using G-code. I was surprised about how antiquated and unreadable it appears to be and am somewhat at a loss to understand why machinists have put up with it - I suspect its because most of the parts are designed in CAD packages so perhaps nobody writes in G-code directly. ... Read more …


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