Skip to content

Commit 4fa66f7

Browse files
committed
Adding NFC writing
1 parent e1f0f16 commit 4fa66f7

File tree

5 files changed

+481
-358
lines changed

5 files changed

+481
-358
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,25 @@ Your project should now be setup and will start displaying your currently playin
155155

156156
## Code
157157

158-
If you want to program the devices yourself using the Arudino IDE, you will need to do the following to get it working
158+
If you want to program this project manually, there are two options
159+
160+
### PlatformIO
161+
162+
PlatformIO is the easiest way to code this project.
163+
164+
In the [platformio.ini](platformio.ini), there are several environments defined for the different boards
165+
166+
| Environment | Description |
167+
| ----------- | ---------------------------------------------------------------------------------------------------------------------------- |
168+
| env:cyd | For the [Cheap Yellow Display](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display) |
169+
| env:cyd2usb | For the Cheap Yellow Display with two USB ports |
170+
| env:trinity | For the [ESP32 Trinity](https://github.com/witnessmenow/ESP32-Trinity) (or generic ESP32 wired to the matrix panel the same) |
171+
172+
When you select the environment, it will automatically install the right libraries and set the configurations in the code.
173+
174+
### Arduino IDE
175+
176+
If you want to use the Arduino IDE, you will need to do the following to get it working
159177

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

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

171-
### Cheap Yellow Display Specific libraries
189+
#### Cheap Yellow Display Specific libraries
172190

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

177-
### Matrix Panel Specific libraries
195+
#### Matrix Panel Specific libraries
178196

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

184-
### Cheap Yellow Display Display Config
202+
#### Cheap Yellow Display Display Config
185203

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

188206
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.
189207

190-
### Display Selection
208+
#### Display Selection
191209

192210
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.
193211

SpotifyDiyThing/SpotifyDiyThing.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void setup()
132132
spotifyDisplay->displaySetup(&spotify);
133133

134134
#ifdef NFC_ENABLED
135-
if (nfcSetup(&spotify))
135+
if (nfcSetup(&spotify, spotifyDisplay))
136136
{
137137
Serial.println("NFC Good");
138138
}
@@ -211,7 +211,7 @@ void loop()
211211
spotifyDisplay->checkForInput();
212212

213213
#ifdef NFC_ENABLED
214-
bool forceUpdate = nfcLoop();
214+
bool forceUpdate = nfcLoop(lastTrackUri);
215215
#else
216216
bool forceUpdate = false;
217217
#endif

0 commit comments

Comments
 (0)