Advertisement
Guest User

problem

a guest
Apr 23rd, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. for (;;) {
  2. GPIOD->BSRRH = GPIO_Pin_12;
  3. Delay(1000000);
  4. GPIOD->BSRRL = GPIO_Pin_12;
  5. Delay(5000000);
  6. GPIOD->BSRRH = GPIO_Pin_12;
  7. while ((GPIOD->IDR && GPIO_Pin_13) == 0x00);
  8. TIM2_CNT = 0;
  9. while ((GPIOD->IDR && GPIO_Pin_13) != 0x00) {
  10. //STĄD NIE CHCE WYJŚĆ
  11. TIM2_CNT++;
  12. Delay(100);
  13. }
  14. TIM4_CNT = TIM2_CNT;
  15. Distance = (float) TIM4_CNT * 0.17;
  16. Delay(500000); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement