This instructables show how to use a ESP32 and ATtiny861 to build a NES emulator game console.
This time I am using a TTGO T8 ESP32 dev board. This board have built-in Lipo charging and regulating circuit, it can help reduce the extra components.
This time I am using a 2.4" IPS LCD. The driver controller is ST7789V and the resolution is 320 x 240. This resolution is best fit for NES emulator 252 x 224 resolution.
This time I am using a 454261 Lipo battery. 4.5 mm is the thickness of ESP32 dev board, and 61 mm is the width of the board.
A 4 pins male round pin header and a 4 pins female round pin header for connecting I2C gamepad.
A small PET/PETG plate for supporting the dev board and Lipo battery, you can easily find it in product packing.
2 PCB required, 1 0.4 mm thick for supporting the Display, 1 1.2 mm thick for a I2C gamepad.
A 5 directions button, 2 small buttons for Select and Start and 2 for A and B button.
This time I use a ATtiny861 microcontroller as an I2C gamepad controller.
1 SMD 12 Ohm resistor, a ISP programmer (e.g. TinyISP)
Download and install Arduino IDE if not yet: https://www.arduino.cc/en/Main/Software
Follow the installation steps to add ATTinyCore support if not yet: https://github.com/SpenceKonde/ATTinyCore/blob/mas...
Follow the ESP-IDF get started guide to setup the development environment if not yet: https://docs.espressif.com/projects/esp-idf/en/sta...
Follow the video steps to fold and squeeze all the parts into the case.
The program for the I2C Gamepad is very simple, only 15 lines of code. But it is a little bit hard to reprogram the ATtiny861 after soldering, so it is better test it on the breadboard first.
Download, compile and flash the program from GitHub: https://github.com/moononournation/attiny861_i2c_...
Here are the connection Summary:
ATtiny861 Button GND -> All buttons one pin Pin 20 (PA0) -> Up button Pin 19 (PA1) -> Down button Pin 18 (PA2) -> Left button Pin 17 (PA3) -> Right button Pin 14 (PA4) -> Select button Pin 13 (PA5) -> Start button Pin 12 (PA6) -> A button Pin 11 (PA7) -> B button Pin 6 (GND) -> I2C male pin header pin 4 Pin 5 (Vcc) -> I2C male pin header pin 3 Pin 3 (SCL) -> I2C male pin header pin 1 Pin 1 (SDA) -> I2C male pin header pin 2
NES emulator is not the only interesting thing you can make with ESP32. E.g. you can build a micro python console with it. The only component you need to change is from I2C gamepad to I2C keyboard. I think it is not so difficult to make it with a ATtiny88 controller. You may follow my twitter to see the status.