Skip to content

Instantly share code, notes, and snippets.

View audio.h
#include <algorithm>
#include <vector>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/adc.h"
#include "driver/i2s.h"
#include "FastLED.h"
View audio.cpp
void Audio::initI2SDac() {
adc1_config_channel_atten(I2S_ADC_CHANNEL, ADC_ATTEN_11db);
i2s_config_t i2s_config = {
.mode = static_cast<i2s_mode_t>(I2S_MODE_MASTER | I2S_MODE_RX |
I2S_MODE_ADC_BUILT_IN),
.sample_rate = I2S_SAMPLE_RATE,
.bits_per_sample = static_cast<i2s_bits_per_sample_t>(I2S_SAMPLE_BITS),
.channel_format = static_cast<i2s_channel_fmt_t>(I2S_FORMAT),
.communication_format =
static_cast<i2s_comm_format_t>(I2S_COMM_FORMAT_I2S_MSB),
View keybase.md

Keybase proof

I hereby claim:

  • I am tomnz on github.
  • I am codingtom (https://keybase.io/codingtom) on keybase.
  • I have a public key ASCml76kO2nbICfgnFHSHXfumDGjeh5cKsElX3mm0Dh-0go

To claim this, I am signing this object: