Skip to content

Commit

Permalink
clock divider hotfix line 52
Browse files Browse the repository at this point in the history
An update to bring the SPI speed back to 4 megahertz.  Needed due to poor/improper SPI usage in MCP4XXX library.
  • Loading branch information
D34G committed Apr 18, 2021
1 parent fdc5f7e commit d3d1fcc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/Player/Player.ino
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ void setup()
AudioPlayer.selectDACPin(DAC_PIN); // used to set audio output pin on Arduino (defaults to pin A0)
AudioPlayer.selectDigitalPotPin(DIGITAL_POT); // used to set the digital potentiometer pin on the arduino in order to control amplifier volume (note, if using other SPI devices all pins will have to be set high first)
AudioPlayer.setVolume(100); // set the volume anywhere from 0 to 100 (note, if using other SPI devices all pins will have to be set high first)
SPI.setClockDivider(12);
//AudioPlayer.setBlocking(true); // code execution waits for audio to finish (default is set to false)
AudioPlayer.begin(sampleRate, NUM_AUDIO_CHANNELS, AUDIO_BUFFER_SIZE); // required inputs: sample rate, number of audio channels possible, size of audio buffer for processing

Expand Down

0 comments on commit d3d1fcc

Please sign in to comment.