Closed justinjools22 closed 1 month ago
I looked in Mozziguts.hpp from the error at 175. The sketches need to change:
adcStartConversion(adcPinToChannelNum(AUDIO_INPUT_PIN)); // -> result is ignored, but first thing in the next cycle, a second reading is taken.
break;
Or the other way around?
This comes from the changes to Mozzi2, trying to make internal variables less likely to conflict. Please don't hesitate submit a PR if you solved it :)
@tomcombriat You fixed that one a month ago, yourself: https://github.com/sensorium/Mozzi/commit/fdd36681c08e2f5306fa8a2cb1080198904df58a
Perhaps we should have a quick bugfix release?
Ah... Aging.... And I thought it rang a bell when I saw it.
Yes, maybe we should..
Or the other way around?
This comes from the changes to Mozzi2, trying to make internal variables less likely to conflict. Please don't hesitate submit a PR if you solved it :)
Yes, I guess your naming intention is MOZZI_AUDIO_INPUT_PIN. Because it is incorrectly named AUDIO_INPUT_PIN works.
Yes, maybe we should..
You are more experienced in this step. Could you take a look at my draft: https://github.com/sensorium/Mozzi/releases/tag/untagged-64bc2f81715cb7b13227 . Anything else missing?
Could you take a look at my draft: https://github.com/sensorium/Mozzi/releases/tag/untagged-64bc2f81715cb7b13227 . Anything else missing?
Looks good to me! I will publish it.
Closing. Fixed by #260
Hi, I tried to compile this code as is and get error - other sketches under 04.AudioInput the same. I am using Windows 11 Mozzi@2.0.0 STM32F4 and Arduino Nano boards same error.
In file included from c:\Users\m\Documents\Arduino\libraries\Mozzi/MozziGuts.h:205, from c:\Users\m\Documents\Arduino\libraries\Mozzi/Mozzi.h:33, from C:\Users\m\AppData\Local\Temp.arduinoIDE-unsaved2024626-3808-2cxc72.nn99x\Audio_Input\Audio_Input.ino:29: c:\Users\m\Documents\Arduino\libraries\Mozzi/internal/MozziGuts.hpp: In function 'void MozziPrivate::advanceADCStep()': c:\Users\m\Documents\Arduino\libraries\Mozzi/internal/MozziGuts.hpp:175:43: error: 'AUDIO_INPUT_PIN' was not declared in this scope; did you mean 'MOZZI_AUDIO_INPUT_PIN'? 175 | adcStartConversion(adcPinToChannelNum(AUDIO_INPUT_PIN)); // -> result is ignored, but first thing in the next cycle, a second reading is taken. | ^
~~~~~~ | MOZZI_AUDIO_INPUT_PINexit status 1
Compilation error: exit status 1
https://github.com/sensorium/Mozzi/blob/master/examples/04.Audio_Input/Audio_Input/Audio_Input.ino