.................................. Return to Sumner's Home Page....
Return to N Scale RR Main Menu........ Return to DCC++ Menu
=========================================
..............Previous Page..............................Next Page If There Is One
=========================================
…..............................................--- WiTcontroller Software Install ---
=========================================
NOTE: There are a number of steps required to load the software on the throttle. Take your time and work through them one by one. Don't skip any of the steps. If you need help ask for it on Discord ( HERE ).
=========================================
1. Download the Arduino IDE.
........https://support.arduino.cc/hc/en-us/articles/360019833020-Download-and-install-Arduino-IDE
2. Using the Arduino IDE download the software for the esp32 board in the throttle.
........a.) In the Arduino IDE, go to …....... File > Preferences
........b.) Enter the following into the 'Additional Board Manager URLs' field/window near the bottom:
................................................................................. https://dl.espressif.com/dl/package_esp32_index.json
........c.) Then Use the Boards Manager in the Arduino IDE to install the esp32 board support (Not the Library Manager):
........d.) go to …...... Tools ---> Board ---> Boards Manager
........e.) Use the search window to search for "esp32" by Expressive Systems. Install version 1.0.6
3. Download or clone Peter's WiTcontroller repository (WiTcontroller software).
.............Note: If you 'clone' initially, it is easier to receive updates to the code later. The following shows how to 'clone' and later 'fetch'
........................the WiTcontroller software. by doing a 'fetch' subsequently. See Notes below (Item #4). Highly recommend doing this.
........a.) Clone - First Time (you only do this once)
........b.) Install …. GitHub Desktop ….. from …........ https://desktop.github.com/
........c.) Create a free account on GitHub and authorize the app to allow it to connect to GitHub.
........d.) Select File -->Clone Repository .. select the 'URL' tab and enter .. https://github.com/flash62au/WiTcontroller .. as the URL
........f.) Select a local folder to install it. The folder should not exist at this time. It will create it at the path you entered. The default folder
....... for the Arduino software usually looks like "...username\Documents\Arduino". (This is a good but not essential place to put it.)
........g.) Click 'Clone'
4. Subsequently (Anytime after the first 'clone') to update the WiTcontroller Throttle software.
........a.) Run …... GitHub Desktop
........b.) At the upper right of the GitHub Desktop page click …. Fetch Origin …. and any changes to the code will be brought down
........to your PC, but your …. config_buttons.h …. and …. config_network.h …. will not be touched.
5. Loading the needed Arduino libraries to your PC. These can loaded from the Library Manager in the Arduino IDE.
......Go to …. Sketch ---> Include Library---> Manage Libraries (then find and install the following).
........a.) U8g2lib.h - Search for "U8g2" Install version 2.34.22 ... NOTE: If a library doesn't show up scroll down the list to find it.
........b.) AiEsp32RotaryEncoder.h - search for "Ai Esp32 Rotary Encoder" Install Version 1.6
........c.) Keypad.h - Search for "Keypad" by Mark Stanley install version 3.1.1
........d.) WiThrottleProtocol.h - Search for "WiThrottleProtocol" (not "WiThrottle") Install version 1.0.3 or later if available
6. These should have been automatically installed when you downloaded the esp32 boards software:
.(When you compile the sketch and upload it to the esp32 if you get an error that it can't find these files then you will need to find and add them.)
........WiFi.h - https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi
........ESPmDNS.h - https://github.com/espressif/arduino-esp32/blob/master/libraries/ESPmDNS
7. Open the WiTcontroller folder and copy …. 'config_network_example.h' …. to a new file …. 'config_network.h'
.....Then edit it to include the network ssids you want to use. (Not essential, but entering passwords via the encoder is tedious.)
........a.) An example would look like this:........const String ssids[maxSsids] = {"RPi-JMRI"};
..............................................................................const String passwords[maxSsids] = {"rpI-jmri"};
8. Copy …. 'config_buttons_example.h' …. to a new file …. 'config_buttons.h'
.......a.) Optionally, edit this to change the mapping of the keypad buttons to specific functions.
.......b.) Optionally, edit this to configure the additional buttons (if you have included them) to specific functions.
.......c.) Optionally, edit this to change if you want the function buttons to display when you press #, instead of the default of showing the Key Definitions
9. Upload the sketch.
.......a.) In the Arduino IDE go to 'Tools' → 'Board' → 'esp32' Select the board type as "WEMOS LOLIN32 Lite"
.......b.) Connect the board via USB and select the appropriate COM port in the Arduino IDE under 'Tools' → 'Port'.
........................ If not sure of the port number plug and unplug the throttle and see which COM port disappears and re-appears.
.......c). In the Arduino IDE go to 'Tools' → 'Upload Speed' and change it to 115200 if it isn't that.
.......d.) You might have to go to the 'Computer's settings' and 'Device Manager' and change the COM port speed there to 115200 also.
.......d.) Click 'Upload' NOTE: If you get compile errors while compiling/uploading post them on (Discord HERE) if you can't figure them out.
10. Notes:
........WiTcontroller version 1.19 or later requires WiThrottleProtocol version 1.1.3 or later.
........WiTcontroller version 1.06 or later requires WiThrottleProtocol version 1.1.2 or later.
........WiTcontroller version 1.01 or later requires WiThrottleProtocol version 1.1.0 or later.
........WiTcontroller version 0.10 or later requires WiThrottleProtocol version 1.0.3 or later.
........The 'WiFi.h' and 'ESPmDNS.h' libraries were automatically installed for me (Peter) when I installed the esp32 boards,
........however you may need to install them manually.
........Later versions of the esp board support are available and do appear to work, but if you have difficulties version 1.0.6 appears to be stable.
........Later versions of the libraries generally should work, but if you have difficulties use the versions listed above.
........To get the WiTcontroller sketch I recommend using either the git command line, or the far more friendly 'GitHub Desktop' app. See ........instructions above.
=========================================
...........................On..............e.........Next Page If There Is One