Advertisement
ArBa

motor_run

Jan 23rd, 2020
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1.     bool val=false;
  2.     nrf_gpio_pin_dir_set(NRF_GPIO_PIN_MAP(1, 10), NRF_GPIO_PIN_DIR_OUTPUT);
  3.  
  4.     while(1){
  5.         nrf_gpio_pin_write(NRF_GPIO_PIN_MAP(1, 10), val);
  6.         nrf_delay_ms(200);
  7.         if(val) val=false;
  8.         else val=true;
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement