ILI9341 and XPT2046 TFT display on ESP8266

For my own future reference more than anything else, to get the ILI9341 (either Adafruit or otherwise) working on the ESP8266 using the Arduino development environment isn’t completely straightforward. I knew I had this working previously, but couldn’t find the info again, so am copying it here.

It would appear that the ILI9341 library currently available through the Arduino Sketch -> Include Library -> Manage Libraries is not currently compatible with the ESP8266. Thus you have to download the working library directly from the Adafruit Github repository. However, I also had issues with this version. Finally I used the examples on to get it working.

Additionally, the XPT2046 library available in the Arduino manage libraries feature does not support Hardware SPI, however there is an alternative developed by [spapadim] on Github. I took the following steps to compile some example code.

  1. Wire up ESP and Touch screen according to
  2. Download the zip file from the end of the page on this includes some working examples
  3. Download XPT2046 library from Github
  4. Go to Arduino IDE -> Sketch -> Include Library -> Manage Libraries -> Search GFX and install the “Adadfruit GFX Library”
  5. Open the example sketch from Nailbuster and compile and upload

I have a feeling these libraries may be a little out of date now so I’ll have a look at whether they can be updated to use the latest versions available from Adafruit.

Briggs Transparent Cylinder Head Engine

I’ve been following a series of videos on YouTube of a couple of guys who have been busy building a Briggs and Stratton engine with a transparent cylinder head. They’ve now got it running surprisingly well:

Further to this, another YouTuber has build a transparent cylinder head Briggs engine and filmed it in 4K then run it on Gasoline, Alcohol and Acetylene . Well worth a watch:

Thoughts on Graphical/Visual Programming Languages

​I dont see a lot of information on personal blogs/diy projects regarding the use of Visual Programming Languages, but this is what I use in my current role as a Control System Engineer developing engine control and test systems. I actually call them graphical programming languages, so if I use the terms interchangably here then I’m actually talking about the same thing. We use visual programming languages for engine ECU control code and Test Cell control code (Simulink + Stateflow and Labview respectively). I believe graphical programming languages are pretty widely used in the automotive industry, and appear to have massive buy in from plenty of other industries too. I think its easy to see why.

Continue reading

Separated Rotary Engine

This is a pretty interesting concept – very similar to a ‘split cycle’ engine – basically the rotary version. A split cycle engine has the benefit of being able to split the compression and expansion cycles of a traditional internal combustion engine. This allows for different geometries in the combustion and expansion chamber, allowing for things such as very high expansion ratios verses compression ratios, and also potentially volume combustion in the case of this particular engine.

It looks as though this engine would still suffer some of the difficulties of traditional rotary engines, but still a very interesting concept!

ESP8266 Successor – ESP32 released with CAN bus support 

So, the interesting little ESP8266 WiFi SoC finally has a younger brother which appears to be even more capable. Among other expansive updates, the 32 bit Dual Core microcontroller still supports WiFi, but also Bluetooth Low Energy, a DAC, many more ADCs, GPIO pins, etc. etc. Lots of good details here: 

Continue reading

ESP8266 CAN Bus with MCP2515

I have just bought another ESP8266/NodeMCU development board cheapy from eBay (this one) with an ESP-12E chip on board. I’ve also bought an SPI-CAN bus interface with the common Microchip MCP2515 CAN controller to try and create a CAN-Wifi gateway.

The pinout for the ESP-12E NodeMCU board is apparently as below:
ESP-12E NodeMCU Pinout

Continue reading