找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2260|回復(fù): 0
收起左側(cè)

stm32線性ccd采集 cubemx工程

[復(fù)制鏈接]
ID:496935 發(fā)表于 2020-5-15 09:26 | 顯示全部樓層 |閱讀模式
int main(void)
{
  /* USER CODE BEGIN 1 */
  int i=0;
  /* USER CODE END 1 */
  


  /* MCU Configuration--------------------------------------------------------*/


  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();


  /* USER CODE BEGIN Init */


  /* USER CODE END Init */


  /* Configure the system clock */
  SystemClock_Config();


  /* USER CODE BEGIN SysInit */


  /* USER CODE END SysInit */


  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_ADC1_Init();
  MX_USART1_UART_Init();
  /* USER CODE BEGIN 2 */
   StartIntegration();
  /* USER CODE END 2 */




  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
                CalculateIntegrationTime();
                ImageCapture(Pixel);
                Find_CCD_Zhongzhi();//ccd找中值
                Pixel[0]='T';
                for(i=0;i<128;i++)
                {
                        if(i==0)
                        printf("%c",Pixel[ i]);
                        else
                                printf("%c",Pixel[ i]);
                }
//                printf("\r\n");
//                printf("%d  %d",CCD_Zhongzhi,CCD_Error);
//                printf("hello ,baiyong\r\n");
                HAL_Delay(300);
    /* USER CODE END WHILE */


    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */
}

7stag2ttnhsk7g.7z

287.59 KB, 下載次數(shù): 24, 下載積分: 黑幣 -5

stm32 ccd

回復(fù)

使用道具 舉報(bào)

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表