Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (;;) {
- GPIOD->BSRRH = GPIO_Pin_12;
- Delay(1000000);
- GPIOD->BSRRL = GPIO_Pin_12;
- Delay(5000000);
- GPIOD->BSRRH = GPIO_Pin_12;
- while ((GPIOD->IDR && GPIO_Pin_13) == 0x00);
- TIM2_CNT = 0;
- while ((GPIOD->IDR && GPIO_Pin_13) != 0x00) {
- //STĄD NIE CHCE WYJŚĆ
- TIM2_CNT++;
- Delay(100);
- }
- TIM4_CNT = TIM2_CNT;
- Distance = (float) TIM4_CNT * 0.17;
- Delay(500000); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement