User Tools

Site Tools


esp32:wm8782

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
esp32:wm8782 [2021/05/18 12:32] – aistisesp32:wm8782 [2021/05/18 12:33] (current) – aistis
Line 10: Line 10:
 some code that helped: https://www.esp32.com/viewtopic.php?t=3658 some code that helped: https://www.esp32.com/viewtopic.php?t=3658
  
-<code> +<code cpp>
- +
 #include <driver/i2s.h> #include <driver/i2s.h>
-#include <WiFi.h> 
-#include <WiFiMulti.h> 
-#include <AsyncUDP.h> 
-//#include "mbedtls/aes.h" 
  
 const i2s_port_t I2S_PORT = I2S_NUM_0; const i2s_port_t I2S_PORT = I2S_NUM_0;
  
 #include "driver/mcpwm.h" #include "driver/mcpwm.h"
-//#include "soc/mcpwm_periph.h" 
  
 void setup() { void setup() {
-  //Serial.begin(2000000); 
   Serial.begin(115200);   Serial.begin(115200);
  
Line 40: Line 32:
     .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT,     .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT,
 //    .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, // 2-channels //    .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, // 2-channels
- 
-    // although the SEL config should be left, it seems to transmit on right 
     .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB),     .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB),
     .intr_alloc_flags = 0,     .intr_alloc_flags = 0,
Line 106: Line 96:
   auto v2 = *((int32_t*)communicationData + 1);   auto v2 = *((int32_t*)communicationData + 1);
   Serial.printf("%d, %d, %d\n", num_bytes_read, v1, v2);   Serial.printf("%d, %d, %d\n", num_bytes_read, v1, v2);
- 
- 
- 
 } }
 </code> </code>
esp32/wm8782.1621330328.txt.gz · Last modified: by aistis