diff options
author | dakkar <dakkar@thenautilus.net> | 2020-08-28 19:49:18 +0100 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2020-08-28 19:49:18 +0100 |
commit | 46e30e894edd3faa6e12f6eb6decd6129f791641 (patch) | |
tree | ac0a3eb6704adb49c688c0519523d97060bf9e2b | |
parent | using the i2c-to-internal-dac functions, it sounds a bit better (diff) | |
download | lego-piano-46e30e894edd3faa6e12f6eb6decd6129f791641.tar.gz lego-piano-46e30e894edd3faa6e12f6eb6decd6129f791641.tar.bz2 lego-piano-46e30e894edd3faa6e12f6eb6decd6129f791641.zip |
change sample rate
it still sounds pretty bad, though
-rw-r--r-- | esp32/lego-piano.ino | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/esp32/lego-piano.ino b/esp32/lego-piano.ino index 8991f07..73dce79 100644 --- a/esp32/lego-piano.ino +++ b/esp32/lego-piano.ino @@ -40,7 +40,7 @@ const int ampEnable = 32; const int octave_shift = 2; -const int sampleRate = 8000; +const int sampleRate = 11025; char pressed[row_count*col_count] = { 0 }; @@ -69,7 +69,6 @@ void setup() { i2s_driver_install(i2sPort, &i2s_config, 0, NULL); i2s_set_dac_mode(I2S_DAC_CHANNEL_RIGHT_EN); // only dac1 - i2s_set_sample_rates(i2sPort, sampleRate); // ?? for (int i=0;i<row_count;++i) { pinMode(rows[i], OUTPUT|PULLUP); |