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 http://nailbuster.com/?page_id=341 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.
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: http://esp32.net/
I was sent a link to this website by the author, who appears to have created an Arduino ECU for spark control. Although the details are a little sparse, It appears that he has developed a lot of the required hardware himself. It looks like the main controller is an Arduino Nano and utilises Manifold Absolute Pressure (MAP) and a knock sensor to determine the ignition timing on a Peugeot 205 Tu9 45Ch. It would appear that the ECU has been developed over a number of revisions and has been in operation for over a year.
I have been busy over the last few weeks with various things, but have now completed most of the practical work on my project and am now at the stage of writing up the report/dissertation. I have successfully managed to achieve closed loop ignition timing control by using the Stellaris Launchpad development board to directly interface with the optical encoder on the engine and the pressure sensor charge amplifier (this replaces the AVL IndiSet 620 in my system).
ECU in black on left, angle of peak pressure and optical encoder interface on right. Connected together via serial
I needed a high speed ADC for sampling in cylinder pressure for my ECU, and settled on trying a few from Texas Instruments. I am using an optical encoder on the engine which provides 720 pulses per revolution . If I took a sample every pulse, then at 6000 RPM (100 Hz) then I would be looking at about 720 * 100 Hz = 72,000 Samples per Second (SPS) or 72kHz ( although I realise now that I could take a sample on each edge, resulting in 1440 samples per revolution, or 144,000 SPS). That’s pretty high speed, considering most ADCs built into microcontrollers take a few microseconds to perform their conversion which results in a sampling rate of perhaps up to 50,000 SPS max for the Arduino for example. DSP chips or higher end micros probably have better performance, but for the sake of learning, I fancied trying to use an external ADC anyway.
Just a quick one on what I’ve been up to the last few days. I now have the engine set up inside so that I don’t have to keep pushing it outside or waiting for the rain to stop. I’ve also set up an optical encoder, in-cylinder pressure sensor, and AVL IndiSet high speed data acquisition unit to capture data on a 0.25 degree crank angle resolution.