This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Interfacing External Sound Sensor with nRF52832

I have made following connection between nordic device and external sound sensor:

  1. VCC--> 5V
  2. GND--> GND
  3. GATE --> Pin 04
  4. ENVELOPE --> A0

I would like to know how to proceed with the code in eclipse. i have a code but i am not sure how to proceed with it.

Thanks in Advance

Parents Reply
  • static void nrf_gpio_cfg_input(GATE, NRF_GPIO_PIN_NOPULL) static void nrf_gpio_pin_read(GATE

    )

        void soundISR()
        {
          int pin_val;
        
          pin_val = digitalRead(PIN_GATE_IN);
          digitalWrite(PIN_LED_OUT, pin_val);
        }
        
        void setup()
        {
          Serial.begin(9600);
        
          //  Configure LED pin as output
          pinMode(PIN_LED_OUT, OUTPUT);
        
          // configure input to interrupt
          pinMode(PIN_GATE_IN, INPUT);
          attachInterrupt(IRQ_GATE_IN, soundISR, CHANGE);
        
          // Display status
          Serial.println("Initialized");
        }
    

    Does this makes sense ??

Children
No Data
Related