File tree 1 file changed +3
-3
lines changed
libraries/ESP_I2S/examples/Simple_tone
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;
43
43
i2s_mode_t mode = I2S_MODE_STD;
44
44
i2s_slot_mode_t slot = I2S_SLOT_MODE_STEREO;
45
45
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
47
47
48
48
int32_t sample = amplitude; // current sample value
49
49
unsigned int count = 0 ;
@@ -70,11 +70,11 @@ void loop() {
70
70
sample = -1 * sample;
71
71
}
72
72
73
- // Left channel, low 8 bit then high 8 bit
73
+ // Left channel, the low 8 bits then high 8 bits
74
74
i2s.write (sample);
75
75
i2s.write (sample >> 8 );
76
76
77
- // Right channel, low 8 bit then high 8 bit
77
+ // Right channel, the low 8 bits then high 8 bits
78
78
i2s.write (sample);
79
79
i2s.write (sample >> 8 );
80
80
You can’t perform that action at this time.
0 commit comments