bitluni / ESP32AMRadioTransmitter

131 stars 34 forks source link

AMRadio tramsmitter + URLstreaming radio > AM modulator stops #9

Closed Fre19 closed 2 years ago

Fre19 commented 2 years ago

I want to replace the audio file sample.h in the AMTransmitter with real URL audiostreams. I use the Audio.h library for that. Both, the url streaming radio as well as the AM modulator work perfect independently. But as soon as audio->loop() is active (from Audio.h), the AM modulator stops working, yet sizeof(buff) contains 2048 bytes. The AMmodulator uses i2s_0 and for audio stream i have setup i2s_1. The idea is to 'spool' the DMA of i2s1 to the DMA of i2s 0. Any idea why audio->loop() stops the AM modulator?

Thank for you assist. ps I love the AM modulator project since i repare old AM radio's! This my first c++ project with the ESP32 in Arduino IDE FLW

philippedc commented 2 years ago

@Fre19 hi, I also collect tube old radios... And I'm very curious how you made your web radio with Audio.h. With the Atmega328 I didn't get any good result to make a AM radio transmitter, I recently discovered this solution with an esp32 and I'm waiting after my order to start development. However, for real time MPU working mode reason, I do not think I is possible to use the same MPU for both operations. That is why I'm interested for your Web radio solution.

Fre19 commented 2 years ago

@philippedc hi, url radio and the bitluni AM modulator can coecist in one ESP32, but, as soon as the audio.loop() in void loop() runs, the modulation stops working. When i comment out this audio.loop the modulation is perfect. The 835kHz carrier is present only the modulation fails. This is where i am stuck. Currently i use the P Schatzmann audio lib, the Schreibfaul also works and strangy enough, with the same effect: audio.loop() does stop AM modulation but the 835kHz carrier is there (so the internal DAC function is ok). Any idea??? (btw i am new in c++ so this is a challenge though i have programming experience)