marcel-licence / esp32_basic_synth

ESP32 based simple synthesizer project
GNU General Public License v3.0
245 stars 38 forks source link

#define doesn't seem right #80

Closed MichaelPNolan closed 2 years ago

MichaelPNolan commented 2 years ago

So I'm incorporating an analogue multiplexer over in the Organ_Example project but it comes from here. I am making changes in various files but I ran into this in file adc_module.ino

#ifdef ADC_MCP_CTRL_ENABLED
#define ADC_OVERSAMPLING   16
#else
#endif

I am not using the gpio expander (that I think MCP refers to) - in this particular project. Therefore I don't want to turn that on, however, the ADC_OVERSAMPLING 16 seems needed and I can't compile without defining ... so I think maybe this is a mistake.

marcel-licence commented 2 years ago

The mcp refers to the port expander. So that means that ADC_MCP_CTRL_ENABLED souldn't be enabled if you do not use it. The analog module is currently only support the use of it. Otherwise you can read only one analog input. You can also modify the code. The oversampling should be set to allow the predefined ranges to fit the calculations. It is not user friendly at the moment.