Hi,
I'm very new to Daisy, I have just received my Seed a few days ago.
Basically, I'm trying to modify the oscillator frequency using a potentiometer. But the read of ADC always returns the same value whatever the pot position...
I have tested the Knob example from Web programmer, and it works.
If i comment the line seed.StartAudio(AudioCallback); it works. (PS I have tested with empty AudioCallback, same result, doesn't work)
I'm using
- libDaisy@
c5c1026 like in DaisyExample repo
- DaisySP@
5a6b618 like in DaisyExample repo
- STM32 Cube IDE
- Build in debug
The Cube project was created doing:
- File->New Project -> STM32 project from Existing STM32CubMx Configuration file
- Using
Daisy_Seed_Rev2.ioc from Daisy_Seed_Rev4 examples repo
- Removed all STM32 imported files (since present in libDAisy)
- clone libDaisy and DaisySP, but excluded from build. Libs built using the build script. (I have not been able to build the libs with CubeIDE)
Do you have experienced such issue ?
EDIT : I also have the issue if read the ADC in the AudioCallback
Here is my code :
int main(void)
{
// initialize seed hardware and oscillator daisysp module
float sample_rate;
seed.Configure();
seed.Init();
sample_rate = seed.AudioSampleRate();
// Oscillators init
for (int i = 0; i < OSC_COUNT; i++)
{
freqs[i] = BASE_FREQ + i*FREQ_INC_FACTOR;
oscs[i].Init(sample_rate);
oscs[i].SetWaveform(Oscillator::WAVE_RAMP);
oscs[i].SetFreq(freqs[i]);
oscs[i].SetAmp(0.5);
}
// ADC init
AdcChannelConfig adcConfig;
adcConfig.InitSingle(seed.GetPin(21));
seed.adc.Init(&adcConfig, 1);
seed.adc.Start();
// start callback
seed.StartAudio(AudioCallback);
volatile bool ledState = false;
while(1)
{
freqModifier = seed.adc.GetFloat(0);
seed.SetLed(ledState);
ledState = !ledState;
dsy_system_delay(100);
}
}
Hi,
I'm very new to Daisy, I have just received my Seed a few days ago.
Basically, I'm trying to modify the oscillator frequency using a potentiometer. But the read of ADC always returns the same value whatever the pot position...
I have tested the Knob example from Web programmer, and it works.
If i comment the line
seed.StartAudio(AudioCallback);it works. (PS I have tested with emptyAudioCallback, same result, doesn't work)I'm using
c5c1026like in DaisyExample repo5a6b618like in DaisyExample repoThe Cube project was created doing:
Daisy_Seed_Rev2.iocfrom Daisy_Seed_Rev4 examples repoDo you have experienced such issue ?
EDIT : I also have the issue if read the ADC in the AudioCallback
Here is my code :