ASCII Bell support and Fruit Jam example #2
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added optional support for ASCII bell escape
"\x07"
To enable it user code must pass an initialized audio_interface to the ColorTerminal constructor, it can also optionally pass custom wave file to use for the sound.Also added a new Fruit Jam specific example with resolution for #1 in it. I think that in the example code is the best place to do this check rather than the library itself because ColorTerminal an be used with other types of displays as well and on different hardware which is may not support the adafruit_fruitjam library. In the new Fruit Jam example it checks the color depth and if it's too low warns the user before requesting a default size and color depth of 640x480 and 8.
One more new example illustrates how to use the ASCII bell functionality with Fruit Jam using the builtin DAC with headphone out via the adafruit_fruitjam library.