Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #57 from dj1ch/development
Browse files Browse the repository at this point in the history
clean up for documentation
  • Loading branch information
dj1ch committed Jul 22, 2024
2 parents e910861 + f2d4980 commit 2287f18
Show file tree
Hide file tree
Showing 12 changed files with 1,868 additions and 13 deletions.
58 changes: 45 additions & 13 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Here you can find out how to install Minigotchi on the ESP32. Installing on the Pico is not possible as the code is meant for the ESP32.

**For building on an ESP32, see [this](https://github.com/Pwnagotchi-Unofficial/minigotchi/blob/main/INSTALL.md). Don't use this repository for the ESP866.**
**For building on an ESP8266, see [this](https://github.com/Pwnagotchi-Unofficial/minigotchi/blob/main/INSTALL.md). Don't use this repository for the ESP866. The Wio Terminal is still a WIP.**

## Building using Arduino IDE

Expand All @@ -19,12 +19,31 @@ Here you can find out how to install Minigotchi on the ESP32. Installing on the
- At the set of lines that says:

```cpp
// set to true normally
// define if features will be used
bool Config::deauth = true;
bool Config::advertise = true;
bool Config::scan = true;
```

From here, you can turn off deauthing or advertising. Since this is the main feature of the minigotchi, I highly recommend you don't turn either of these off.
From here, you can turn off deauthing, advertising, or Pwnagotchi scanning. Since these are the main features of the minigotchi, I highly recommend you don't turn any of these off.

- With `Config::shortDelay` and `Config::longDelay`, we can adjust the speed of our Minigotchi.

```cpp
// define universal delays
int Config::shortDelay = 500;
int Config::longDelay = 5000;
```

A `Config::shortDelay` is a shorter delay used in between doing tasks, though sometimes too many of them can be problematic. A `Config::longDelay` is a longer delay which isn't used as much but it often used before and/or after something major, to allow the user to read serial/screen output. I put down the recommended default values but you can also change them to whatever you like.

- We can also enable parasite mode, which requires the [minigotchi plugin](https://github.com/matrix224/pwnagotchi_plugins/tree/main). This will allow our Minigotchi to communicate with a Pwnagotchi over serial connection to the Pwnagotchi.

```cpp
bool Config::parasite = false;
```

It's false by default, but you can enable it by making it `true`.

- After that, there should be a line that states the baud rate.

Expand Down Expand Up @@ -55,21 +74,26 @@ std::string Config::screen = "";
There are multiple different screen types available:

- `SSD1306`
- `SSD1305`
- `IDEASPARK_SSD1306`

- `WEMOS_OLED_SHIELD`

- `CYD`

- `T_DISPLAY_S3`

- `M5STICKCP`

- `M5STICKCP2`

- `M5CARDPUTER`

Set `bool Config::display = false;` to true, and `std::string Config::screen = "<YOUR_SCREEN_TYPE>";` to one of those screen types if your screen is supported.
- `SSD1305`

- `IDEASPARK_SSD1306`

**Keep in mind when you do enable a screen you are at a higher risk of your Minigotchi crashing...**
- `SH1106`

Set `bool Config::display = false;` to true, and `std::string Config::screen = "<YOUR_SCREEN_TYPE>";` to one of those screen types if your screen is supported.

- There should also be a line that says:

Expand Down Expand Up @@ -107,13 +131,21 @@ https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32

- Click `Ok` and plug the board into your computer. It should blink, and make sure it is receiving the correct amount of voltage, too much will burn it(I learned that the hard way)

- Open up the Minigotchi folder through the IDE by pushing `Ctrl+O`, or by going to `File` > `Open`, then selecting the folder the .ino is in. If other tabs don't show up, along with `minigotchi.ino`, make sure to copy and paste the files into the same directory/folder as that lone `.ino` file. It won't be able to compile if that happens.
- Open up the Minigotchi folder through the IDE by pushing `Ctrl+O`, or by going to `File` > `Open`, then selecting the folder the .ino is in. If other tabs don't show up, along with `minigotchi-ESP32.ino`, make sure to copy and paste the files into the same directory/folder as that lone `.ino` file. It won't be able to compile if that happens.

- Install the following dependencies with the library manager: `ArduinoJson`, `Adafruit GFX`, and your screen library(see below), etc with all their dependencies (Please install all of them for them to work correctly).
- Install the following dependencies (with their dependencies as well) with the library manager:
- `ArduinoJson`
- `Adafruit GFX`
- `Adafruit SSD1306`
- `TFT_eSPI`
- `Adafruit SSD1305`
- `u8g2`
- Remove/uninstall/modify your screen library depending on your display for `Config::screen` below, some of these dependencies may have already been installed previously.
- Sometimes the repository owner of certain libraries may require you to install it a certain way, be sure to follow their guides if needed/included.

| `SSD1306` | `WEMOS_OLED_SHIELD` | `CYD` | `T_DISPLAY_S3` |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Adafruit SSD1306`, remove `Adafruit SSD1306 Wemos Mini OLED` if installed | `Adafruit SSD1306 Wemos Mini OLED`, remove `Adafruit SSD1306` if installed | Follow the [CYD documentation](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/SETUP.md), it uses a similar library much like the `T_DISPLAY_S3` | Follow the [T-Display-S3 documentation](https://github.com/Xinyuan-LilyGO/T-Display-S3/tree/main?tab=readme-ov-file#4%EF%B8%8F%E2%83%A3--arduino-ide-manual-installation), it uses a library similar to the `CYD` |
| `SSD1306` | `WEMOS_OLED_SHIELD` | `CYD` | `T_DISPLAY_S3` | Any `M5`* board | `SSD1305` | `IDEASPARK_SSD1306` | `SH1106` |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------ | -------------------------- | -------------------------- | -------------------------- |
| `Adafruit SSD1306`, remove `Adafruit SSD1306 Wemos Mini OLED` if installed | `Adafruit SSD1306 Wemos Mini OLED`, remove `Adafruit SSD1306` if installed | Follow the [CYD documentation](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/SETUP.md), it uses a similar library much like the `T_DISPLAY_S3` | Follow the [T-Display-S3 documentation](https://github.com/Xinyuan-LilyGO/T-Display-S3/tree/main?tab=readme-ov-file#4%EF%B8%8F%E2%83%A3--arduino-ide-manual-installation), it uses a library similar to the `CYD`. If it's an off-brand/clone of some sort, install `TFT_eSPI` and follow this [guide](/TFT) | Install `TFT_eSPI` and follow this [guide](/TFT) | Install `Adafruit SSD1305` | Install the `u8g2` library | Install the `u8g2` library |

Make sure you install the correct library, they aren't the same library and if you install the wrong one it will result in the compilation failing.

Expand All @@ -129,7 +161,7 @@ Make sure you install the correct library, they aren't the same library and if y

- Select your COM port/Serial port through `Tools` > `Port` where the ESP32 is plugged in

- Click on the upload button(arrow pointing to the left).
- Click on the upload button(arrow pointing to the left). If you see any errors that you cannot solve, feel free to make an [issue](https://github.com/dj1ch/minigotchi/issues).

**OR**

Expand Down
52 changes: 52 additions & 0 deletions TFT/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## Custom User_Setup Files for Specific Firmwares and Devices
<p>Custom User_Setup files are essential for ensuring proper functionality of certain devices. These files contain crucial information such as GPIO pins, display configurations, and other necessary settings.

Utilizing these files is straightforward, as each is designed with clear and intuitive naming conventions to simplify device configuration.</p>

---

# Configuring User_Setup Files

--Before proceeding, ensure you create a complete backup of the TFT_eSPI folder--

These files need to be integrated into your TFT_eSPI library. The images below illustrate the precise location within the library folder where these files should be placed. Once relocated, locate and open the User_Setup_Select.h file.

Inside this file, identify the specific display you are using (refer to the User_Setup file Screenshot for guidance). To activate your preferred display device, uncomment the corresponding entry by removing the "//" preceding it. It is crucial to have only one display configuration uncommented at any given time and to verify the accuracy of the display name to avoid errors.

## User_Setup file Screenshot
![user_setup_sel](images/user_setup_sel.png)

---

Board selction in Arduino IDE for the M5 devices, the CYD and the non branded TTGO T-display are shown below. The partition scheme for the CYD is the same as the
M5 devices which is Minimal SPIFFS (Large APPS with OTA).

## CYD board selection Screenshot
![board-choice](images/cyd_screen.png)

---

## M5 board selection Screenshots
![board-choice](images/board-choice.png) ![partition](images/part-scheme.png)

---

<b>Below you'll find instructions for certain projects using certain devices</b>

<details>
<summary>Minigotchi Configurations</summary>
<p align="left">If you intend to flash the minigotchi firmware to an M5 device or a generic ttgo t-display, ensure you select one of the following User_Setup files that corresponds with the device available in the firmware:
<br>
- (User_Setup_CYD.h) For use with a ESP32-2432S028R also called a CYD
<br>
- (User_Setup_CYD2USB.h) For use with a CYD that has microUSB & USB-C. Only define in User_Setup_Select.h & not in minigotchi firmware
<br>
- (User_Setup_m5stickc.h) For use with a M5Stick C Plus 1.1
<br>
- (User_Setup_m5stickcp2.h) For use with a M5Stick C Plus 2
<br>
- (User_Setup_m5cardputer.h) For use with a M5Cardputer
<br>
- (User_Setup_TTGO_NoTouch.h) Can be used with a generic (Non branded) TTGO T-Display
</p>
</details>
Loading

0 comments on commit 2287f18

Please sign in to comment.