Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.63 KB | None | 0 0
  1. #include "nrf.h"
  2. #include "nrf_gpio.h"
  3. #include "nrf_delay.h"
  4.  
  5. #define HTR2 5
  6. #define GRN 6
  7. #define RED 7
  8. #define FAN1 2
  9. #define Fan2 3
  10.  
  11.  
  12.  
  13. int main (void)
  14. {
  15.    nrf_gpio_cfg_output(HTR2);
  16.    nrf_gpio_pin_clear(HTR2);
  17.    nrf_gpio_cfg_output(FAN1);
  18.    nrf_gpio_pin_clear(FAN1);
  19.    nrf_gpio_cfg_output(Fan2);
  20.    nrf_gpio_pin_clear(Fan2);
  21.  
  22.  
  23.    while(1)
  24.    {
  25.        nrf_gpio_pin_toggle(HTR2);
  26.        //nrf_delay_ms(5000);
  27.        nrf_gpio_pin_toggle(GRN);
  28.        //nrf_delay_ms(1000);
  29.        nrf_gpio_pin_toggle(FAN1);
  30.        //nrf_delay_ms(5000);
  31.        nrf_gpio_pin_toggle(Fan2);
  32.        //nrf_delay_ms(5000);
  33.  
  34.  
  35.    }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement