Definition of numbers at the hearing: implementation on the Arduino

 3r3189. 3r3-31. In this article, I'm continue to embody his inspiration with laboratory work number 3 already in the gland It will be a question of detecting the digit of the sound in the tone mode dialing on the Arduino using the algorithm of Goertzel. 3r3176.  3r3189. Resource 3r33175. , but I will give my implementation:
 3r3189. 3r31-10. 3r3111. void goertzel (uint8_t * samples, float * spectrum) {3r3189. float v_? v_? v_2; 3r3189. float re, im,
3r3189. for (uint8_t k = 0; k < IX_LEN; k++) {
float cos = pgm_read_float (& (cos_t[k]));
float sin = pgm_read_float (& (sin_t[k])); 3r3r???.33).
V_0 = v_1 = v_2 = 0;
For (u222_t i = 0; i < N; i++) {
V_0 = v_1;
V_1 = v_2;
V_2 = (float) (samples w222_2;
V_2 = (float)) ;
}
Re = cos * v_2 - v_1;
Im = sin * v_2;
Amp = sqrt (re * re + im * im);
Spectrum[k]= 3r3r9. .3r3133.
 3r3189. Sines and cosines were pre-calculated for the samples corresponding to the desired frequencies. The full version of the code is
here
. 3r3176.  3r3189. 3r3176.  3r3189. 3r3143. Conclusions 3r3144. 3r3176.  3r3189. The most important thing that turned out and resources Arduino UNO enough for simple sound processing. 3r3176.  3r3189. 3r3176.  3r3189. 3r3151. 3r3152.
3r3154. 3r3185. 3r3185. 3r3185. 3r3176.  3r3189. 3r3176.  3r3189. The main lesson I learned was that the ADC is sensitive, after successfully recognizing and sending the symbol to the console, I spent a week debugging everything to work with the display, because I connected the microphone ground and max7219 and all the samples turned into noise at once. 3r3176.  3r3189. 3r3176.  3r3189. Could it have been made even better? Yes, it would be more correct to choose the sampling frequency and the number of samples so that the desired frequencies coincide with the sampling lattice, this would prevent the spreading of the spectrum. Such parameters are already f = 8 kHz, N = 20? in this case, you need to start the ADC not in the free-run mode, but the timer overflow, and the difference would be obvious. 3r3176.  3r3189. Definition of numbers at the hearing: implementation on the Arduino 3r3176.  3r3189. 3r3176.  3r3189. 3r3174. Course 3r3-3175. coming to an end, but many more ideas. 3r3176.  3r3189. Thanks for attention. 3r3185. 3r3189. 3r3189. 3r3189. 3r3182. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e. ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r3183. 3r3189. 3r3185. 3r3189. 3r3189. 3r3189. 3r3189.
+ 0 -

Add comment