Skip to content

Commit

Permalink
Adding NFC writing
Browse files Browse the repository at this point in the history
  • Loading branch information
witnessmenow committed Dec 2, 2023
1 parent e1f0f16 commit 4fa66f7
Show file tree
Hide file tree
Showing 5 changed files with 481 additions and 358 deletions.
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,25 @@ Your project should now be setup and will start displaying your currently playin

## Code

If you want to program the devices yourself using the Arudino IDE, you will need to do the following to get it working
If you want to program this project manually, there are two options

### PlatformIO

PlatformIO is the easiest way to code this project.

In the [platformio.ini](platformio.ini), there are several environments defined for the different boards

| Environment | Description |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------- |
| env:cyd | For the [Cheap Yellow Display](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display) |
| env:cyd2usb | For the Cheap Yellow Display with two USB ports |
| env:trinity | For the [ESP32 Trinity](https://github.com/witnessmenow/ESP32-Trinity) (or generic ESP32 wired to the matrix panel the same) |

When you select the environment, it will automatically install the right libraries and set the configurations in the code.

### Arduino IDE

If you want to use the Arduino IDE, you will need to do the following to get it working

The following libraries need to be installed for this project to work:

Expand All @@ -168,26 +186,26 @@ The following libraries need to be installed for this project to work:
| [ESP_DoubleResetDetector](https://github.com/khoih-prog/ESP_DoubleResetDetector) | Detecting double pressing the reset button | Yes ("ESP_DoubleResetDetector") |
| [Seeed_Arduino_NFC](https://github.com/witnessmenow/Seeed_Arduino_NFC) | For the NFC reader | No (it's a modified version) |

### Cheap Yellow Display Specific libraries
#### Cheap Yellow Display Specific libraries

| Library Name/Link | Purpose | Library manager |
| ---------------------------------------------- | ------------------------------- | ---------------- |
| [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) | For controlling the LCD Display | Yes ("tft_espi") |

### Matrix Panel Specific libraries
#### Matrix Panel Specific libraries

| Library Name/Link | Purpose | Library manager |
| ------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------------ |
| [ESP32-HUB75-MatrixPanel-I2S-DMA](https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA) | For controlling the LED Matrix | Yes ("ESP32 MATRIX DMA") |
| [Adafruit GFX library](https://github.com/adafruit/Adafruit-GFX-Library) | Dependency of the Matrix library | Yes ("Adafruit GFX") |

### Cheap Yellow Display Display Config
#### Cheap Yellow Display Display Config

The CYD version of the project makes use of [TFT_eSPI library by Bodmer](https://github.com/Bodmer/TFT_eSPI).

TFT_eSPI is configured using a "User_Setup.h" file in the library folder, you will need to replace this file with the one in the `DisplayConfig` folder of this repo.

### Display Selection
#### Display Selection

At the top of the `SpotifyDiyThing.ino` file, there is a section labeled "Display Type", follow the instructions there for how to enable the different displays.

Expand Down
4 changes: 2 additions & 2 deletions SpotifyDiyThing/SpotifyDiyThing.ino
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void setup()
spotifyDisplay->displaySetup(&spotify);

#ifdef NFC_ENABLED
if (nfcSetup(&spotify))
if (nfcSetup(&spotify, spotifyDisplay))
{
Serial.println("NFC Good");
}
Expand Down Expand Up @@ -211,7 +211,7 @@ void loop()
spotifyDisplay->checkForInput();

#ifdef NFC_ENABLED
bool forceUpdate = nfcLoop();
bool forceUpdate = nfcLoop(lastTrackUri);
#else
bool forceUpdate = false;
#endif
Expand Down
Loading

0 comments on commit 4fa66f7

Please sign in to comment.