Audio enable pin required for some cheap yellow displays.
- Dominant language
- Jupyter Notebook
- Stars
- 270
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
In order to get audio output on my CYD I had to add the following lines to the `setup` function in `main.cpp`:
``` cpp
#ifdef AUDIO_ENABLE_PIN
// Enable audio (if required)
pinMode(AUDIO_ENABLE_PIN, OUTPUT);
Serial.printf("Enabling audio by setting Pin %d to %d", AUDIO_ENABLE_PIN, AUDIO_ENABLE_VAL);
digitalWrite(AUDIO_ENABLE_PIN, AUDIO_ENABLE_VAL);
#endif
```
Then I added this to the `build_flags` for my CYD:
```
-DAUDIO_ENABLE_PIN=GPIO_NUM_4
-DAUDIO_ENABLE_VAL=LOW
```
Hopefully this helps someone out 😁
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in main.cpp and locate the setup function, then check the CYD build_flags configuration where AUDIO_ENABLE_PIN and AUDIO_ENABLE_VAL would be defined. Verify the optional audio-enable pin behavior on displays that require it, and confirm audio output works for the reported GPIO_NUM_4/LOW configuration without affecting displays that do not define the flags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100