I was wondering how to create an array on STM32cubeIDE. I like to fill this array with values from an independent LDR.
Below is the set-up code for the ADC:
/*User Begin PV*/
uint16_t value_DAC = 0;uint16_t value_ADC =0;uint32_t state_DAC = 0;
/*User Begin 2*/
HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED); // Calibrate ADC
HAL_ADC_Start_DMA(&hadc1, (uint32_t *) &value_ADC, 1); // Start ADC with DMA
HAL_DAC_Start(&hdac1, DAC_CHANNEL_2); // Start the DAC
Any help would be much appreciated.
I haven't tried anything yet because I really don't know where to start.