File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
libraries/ESP_I2S/examples/Simple_tone Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ i2s_data_bit_width_t bps = I2S_DATA_BIT_WIDTH_16BIT;
4343i2s_mode_t mode = I2S_MODE_STD;
4444i2s_slot_mode_t slot = I2S_SLOT_MODE_STEREO;
4545
46- const int halfWavelength = sampleRate / frequency / 2 ; // half wavelength of square wave
46+ const unsigned int halfWavelength = sampleRate / frequency / 2 ; // half wavelength of square wave
4747
4848int32_t sample = amplitude; // current sample value
4949unsigned int count = 0 ;
@@ -70,11 +70,11 @@ void loop() {
7070 sample = -1 * sample;
7171 }
7272
73- // Left channel, low 8 bit then high 8 bit
73+ // Left channel, the low 8 bits then high 8 bits
7474 i2s.write (sample);
7575 i2s.write (sample >> 8 );
7676
77- // Right channel, low 8 bit then high 8 bit
77+ // Right channel, the low 8 bits then high 8 bits
7878 i2s.write (sample);
7979 i2s.write (sample >> 8 );
8080
You can’t perform that action at this time.
0 commit comments