Skip to content

Commit

Permalink
Merge pull request qmk#1445 from qmk/dual_audio
Browse files Browse the repository at this point in the history
Allow for duophony (C6 and B5) and B5 audio
  • Loading branch information
jackhumbert authored Jun 27, 2017
2 parents 4ba9438 + 7d28a41 commit a52836e
Show file tree
Hide file tree
Showing 6 changed files with 303 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/modding_your_keyboard.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

## Audio output from a speaker

Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any keyboard that allows access to the C6 port, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.

The audio code lives in [quantum/audio/audio.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/audio.h) and in the other files in the audio directory. It's enabled by default on the Planck [stock keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c). Here are the important bits:

Expand Down
2 changes: 2 additions & 0 deletions keyboards/atomic/keymaps/pvc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING

#define C6_AUDIO

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

Expand Down
1 change: 1 addition & 0 deletions keyboards/planck/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS

#define AUDIO_VOICES
#define C6_AUDIO

#define BACKLIGHT_PIN B7

Expand Down
1 change: 1 addition & 0 deletions keyboards/preonic/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS

#define AUDIO_VOICES
#define C6_AUDIO

#define BACKLIGHT_PIN B7

Expand Down
Loading

0 comments on commit a52836e

Please sign in to comment.