First, you need to purchase esp32 version 1 or later. There are many versions available, but I recommend choosing a version with many pins. I'm using this version, but I think many others can. For example, in the description of the video, you can find other models under $5.
Once you get the development board, you need to perform the following three sub steps:
Install the last Arduino IDE
Configure esp32 in IDE and
Install VGA Library
Substep 1.
There are many ways to program esp32, but here you need to use the latest Arduino IDE (I use version 1.8.9). To install it, you can go to the Arduino ide page and follow the instructions.
Substep 2.
After completing the above operations, you need to configure esp32 in the Arduino ide. This is not a piece of cake, because esp32 is not native. You can follow this tutorial or the following steps.
1) Open the Arduino ide
2) Open the preferences window, file / preferences, or press Ctrl comma
3) Go to "other board manager URLs" and copy and paste the following text:
, and then click the OK button.
4) Open the board manager. Go to tools / boards / boards Manager
5) Search for esp32 and press the Install button of esp32 of espressif systems:
6) At this time, when you connect esp32 for the first time, you should select the appropriate model from the list of available esp32 board lengths (see the picture in this step). If you have questions about the model, select the generic model, the first model. This works for me.
7) The system should also select the correct USB port and "upload speed" (usually 921600). At this point, a connection should be established between the PC and the esp32 board.
Substep 3.
Finally, you must install the fabgl VGA library Updated in July 2019, you need the old version of this libray: you can download the zip file src.old.zip at the bottom of this step, extract and rename it
"... arduino-1.8.9 libraries" folder.
After these operations, you can go to the next step and upload the modified tinybasic after the next step.
Step 2: upload the tiny basic code to esp32
Download esp32_ TinyBasicPlus_ PS2_ FabLab_ Beta.ino is at the bottom of this step.
Open it using the Arduino IDE and upload it to your original esp32.
If there are no error messages, the code should already be running.
Alternative steps: if you want to test tinybasic before connecting VGA and PS2 keyboard, you can already use SSH and telnet client to do this. I use putty.
You can see how it looks in this step.
Step 3: connect VGA port
You need the following components:
Dsub15 connector, i.e. VGA female connector to be cut.
Three 270 ohm resistors.
Connect esp32 GPIO pins 2, 15 and 21 to VGA red, green and blue through a 270 ohm resistor.
Connect VGA Hsync and Vsync to esp32 GPIO pins 17 and 4, respectively.
Connect pins 5, 6, 7, 8, and 10 of the dsub15 connector to the esp32 GND.
For the definition of VGA dsub15 connector pin, see the picture in this step. Note that this is the welding surface of the female connector.
Step 4: connect PS2 port
You need a PS2 keyboard female connector.
You can get one from the old PC motherboard and just sell it with a hot-air gun.
In the picture shown in this step, you can find the function of the required pin of the PS2 connector.
The connection is:
Keyboard data GPIO pin 32 of esp32
Keyboard IRQ (clock) of esp32 GPIO pin 33
You also need to connect the 5V pin to GND.
Step 5: program with tiny basic
At this point, if you can connect the VGA monitor and PS2 keyboard and esp32 to the power supply.
The image displayed here should appear on the monitor. Now you can use the tiny basic command.
Try using mandatory Hello, word! Infinite loop:
Print "Hello, world!" 10 times
20 goto 10
function
You can press the ESC button to change the four colors and use Ctrl C to stop the cycle
Please note that if you enter an error, you cannot cancel! Or better yet, you can cancel but not recognize typo correction. You need to rewrite the entire command line.
Now, you can try more complex operations, such as using a basic program to drive LED flashing. For example, connect the LED anode (long pin) to esp32 GPIO pin 13 and the cathode to GND.
Then write:
new
10 i = 1000
20 print I
30 delay I
50 delay I
70 i = i * 9/10
80 If I "0" goes to 20
End of 90
function
You can see the results in the video embedded in this instructable.
Step 6: connect the SD memory card.
Old PCs don't matter. If you can't store the program permanently, you can't complete it.
In this step, I will show how to connect the SD memory card, but unfortunately, for the time being (I hope only at this moment), the storage of the program does not work!
By the way, I used microSD to SD card adapter and soldered 8 L-shaped pins, as shown in the figure.
Then connect the SD adapter pin to esp32 according to the second picture, that is, I connect esp32 GPIO pins 5, 18, 19 and 23 to SC, clock, miso and Moso respectively, plus 3.3V and two GNDS.
I also follow the instructions and examples here and use the sample code SD_ Test.ino, you can write on a 2 GB microSD card.
Therefore, if anyone finds a solution, please email as soon as possible rocaj74@gmail.com Inform me that I will complete this instructable.
Step 7: Thank you
Bao’an District Shenzhen City, China
+86 189 3806 5764