-
Notifications
You must be signed in to change notification settings - Fork 11
Arduino HowTo (Windows)
Note: π₯The Updater released at the 2021-11-26 is able to upload the firmware onto your tty2oled device.π₯
If you know how to use the Arduino IDE and how to add Boards and Libraries you can jump directly to Arduino IDE Settings.
I think the HowTo can be used, slightly adjusted, for Linux as well.
Sketch = Arduino Code/Programm
Used OS: Windows 10 20H2
User's Desktop folder: C:\Users\testuser\Desktop
Create the Project Directories.
Project Base folder: C:\Users\testuser\Desktop\tty2oled
Project Sketch folder: C:\Users\testuser\Desktop\tty2oled\sketch
Project Sketch Library folder: C:\Users\testuser\Desktop\tty2oled\sketch\libraries
All folder Names, except "libraries", are just examples.
And "libraries" must be a Subfolder of your "Sketch" folder.
Download the Arduino IDE from https://www.arduino.cc/en/software.
Actual is v1.8.16 (09/2021). I use the ZIPed Version.
Direct link: https://downloads.arduino.cc/arduino-1.8.16-windows.zip
Unzip all including the arduino-1.8.16 folder to the Project Base folder C:\Users\testuser\Desktop\tty2oled
Start "arduino.exe" from C:\Users\testuser\Desktop\tty2oled\arduino-1.8.16
Acknowledge the Windows Firewall Request if it appears.
Open Arduino-IDE Menu "File->Preferences"
The default Sketchbook Folder is C:\Users\testuser\Documents\Arduino
for my "testuser".
Change it to the Project Sketch folder C:\Users\testuser\Desktop\tty2oled\sketch
.
Add https://github.com/raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json
to "Additional Boards Manager URL's".
If you use an ESP8266 (NodeMCU), add https://arduino.esp8266.com/stable/package_esp8266com_index.json
to "Additional Boards Manager URL's".
Enable at "Show verbose output during:" the options "compilation" and "upload".
Enable "Display Line Numbers"
Click "OK".
Just to be safe, Restart Arduino and check the settings again.
Adding the ESP32 Board to Arduino
Open Arduino-IDE Menu "Tools -> Board -> Boards Manager...".
Type "ESP32" into the search field and after a while you should see the package to install.
Choose latest Version (1.0.6 in 05/2021) and click "Install".
Wait until the board installation is finished and "Close" the Window.
The "Board-Package" is installed into C:\Users\testuser\AppData\Local\Arduino15
.
β If the Board is not listed check the "Arduino Preferences".
The U8G2 Library is only needed if you want to run the Old Monochrome Version.
If you like to use the New Greyscale Version you need to add a few additional Libraries.
- You need to add the Adafruit GFX Library from Adafruit to your Arduino System.
Use the Arduino IDE Library Manager (Sketch > Include Library > Manage Libraries) and search for GFX. - You need to add the U8G2 for Adafruit GFX Library to your Arduino System.
Use the Arduino IDE Library Manager (Sketch > Include Library > Manage Libraries) and search for U8G2 for Adafruit GFX. - You need to add the bounce2 Library to your Arduino System.
Use the Arduino IDE Library Manager (Sketch > Include Library > Manage Libraries) and search for bounce2. - You need to add manually the low level Library for the SSD1322 Controller.
Use the Link https://github.com/venice1200/SSD1322_for_Adafruit_GFX/releases and Download the latest "Release".
Unpack the ZIP content to your Arduino Library folder atC:\Users\testuser\Desktop\tty2oled\sketch\libraries
. - If you use the TTGO-T8 or d.ti Board you need to add manually the Library for the MIC184 Temperature Sensor.
Use the Link https://github.com/venice1200/MIC184_Temperature_Sensor/releases and Download the latest "Release".
Unpack the ZIP content to your Arduino Library folder atC:\Users\testuser\Desktop\tty2oled\sketch\libraries
. - If you use the TTGO-T8 or d.ti Board you need to add the FastLED Library to your Arduino System.
Use the Arduino IDE Library Manager (Sketch > Include Library > Manage Libraries) and search for FastLed.
Adding the U8g2 Library to Arduino (tty2oled Monochrome Version)
Open Arduino-IDE Menu "Sketch -> Include Library -> Manage Libraries...".
Type "U8g2" into the search field and after a while you should see the Library to install.
Maybe you need to scroll down a bit.
Choose latest Version (Version 2.28.10 in 05/2021) and click "Install".
Wait until the library installation is finished and "Close" the Window.
The Library is installed into C:\Users\testuser\Desktop\tty2oled\sketch\libraries
.
Download the tty2oled content from Github π
Use the direct Link: https://github.com/venice1200/MiSTer_tty2oled/archive/refs/heads/main.zip .
Open the ZIP and the Folder "MiSTer_tty2oled-main" within the ZIP.
Extract your preferred Sketch folder to C:\Users\testuser\Desktop\tty2oled\sketch
.
Start or Restart Arduino again.
βΉοΈ Starting with the OTA-USB-Version we add code for Over The Air (Wireless) Update.
Means, you can update the Program on the ESP32 via Wireless Network from the Arduino IDE.
To use this new feature you need to modify the file "cred.h" within the Arduino Code Folder with valid Wireless Credentials.
The OTA Procedure will we described here.
βΉοΈ Starting with the USB-Version of 2021-05-27 you only need to choose the correct Target Device/Board in the Arduino IDE.
The Arduino IDE and the Sketch should detect the chosen Board and enable the needed settings automatically.
Functionality tested with Arduino IDE 1.8.13/1.8.15, ESP32 Package 1.0.5/1.0.6 and ESP8266 Package 3.0.0/3.0.1.
Open Arduino-IDE Menu "Tools -> Board -> ESP32 and choose ESP32 Dev Module" if you use an TTGO T8.
Choose another Entry from the List if you use a different Device.
βΉοΈ At the bottom of the Arduino Window you should see which device was selected.
Open Arduino-IDE Menu "Tools" and double check the Device and the Device "Capabilities".
Example: My TTGO-T8 has 16MB Flash so I change "Flash Size" from 4MB to 16MB.
βΉοΈ As I use an Lolin32 ESP32 for this HowTo I switched to "Wemos Lolin 32".
Click on "Verify".
You should see "Compiling Sketch" and a lot output below.
If you see "Done compiling" you are ready for the Upload.
β If there are Errors double check the HowTo β
If Verify was successful you can connect your ESP.
After the ESP is connected your Windows Device Manager should show an COM Device named "Silicon Labs CP210x USB to UART Bridge"
with the COM Port No. in Brackets, here (COM15).
β If the ESP is not correctly identified go to https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
.
Under "Downloads" download the CP210x Universal Windows Driver (v10.1.10) ZIP file.
Direct Link: https://www.silabs.com/documents/public/software/CP210x_Universal_Windows_Driver.zip .
Install the drivers for the Device (not explained here).
Open Arduino-IDE Menu "Tools -> Port" and select the Device's serial Port, here COM15.
βΉοΈ The selected Port should be shown now at the bottom of the Arduino Window.
Click on "Upload"
You should see "Compiling Sketch" with a lot output...
After "Compiling..." you should see "Uploading...",
and hopefully "Done uploading".
If your Display shows "MiSTer FPGA by Sorgelig" with an SD or USB Icon in the right/upper corner Congratulations.
You can open now the Serial Monitor and test your Display.
β If your Display shows nothing, check all the cables and check Electrical as well for 4SPI β
πΎ πΎ
ποΈ >>Start here<<
π₯ MiSTer Installation & Update π₯
β History (Updates & Notes)
π§ Realizing / How does it work
π Electrical / PCB's / Tested Hardware
βοΈ Arduino HowTo for Windows
π Arduino IDE Settings
π‘ OTA (Wireless) Arduino Update
π¬ CMD Mode (Greyscale/Adafruit GFX)
π¬ Old CMD Mode (Monochrome/U8G2)
πΌοΈ Build Greyscale Pictures (GSC)
π¨ Testing / Troubleshooting
π Files and Folders in this Repository
πΌοΈ Gallery
π― Cardware
π Credits and Links