title: How to connect MAX30100 pulse sensor to a different i2c pins of ESP32 and read data?
body: <p>I'm using a ESP32 30 pin board, MAX30100 pulse sensor for my project.
  I can interface this sensor to ESP32's different i2c pins i.e. not default pins(21,22).</p>
  <p>But I don't know how to read data from the MAX30100 if it connected to different pins - (Let's say 32, 33)</p>
  <p>This is the program I used for default i2c pins to read data from MAX30100</p>
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;Wire.h&gt;
  #include &quot;MAX30100_PulseOximeter.h&quot;
  #define BLYNK_PRINT Serial
  #include &lt;Blynk.h&gt;
  #include &lt;WiFi.h&gt;
  #include &lt;BlynkSimpleEsp32.h&gt;
  
  #define REPORTING_PERIOD_MS 1000
  
  char auth[] = &quot;*******************&quot;;             // You should get Auth Token in the Blynk App.
  
  // Connections : SCL PIN - D1 , SDA PIN - D2 , INT PIN - D0
  PulseOximeter pox;
  
  float BPM, SpO2;
  uint32_t tsLastReport = 0;
  
  
  void onBeatDetected()
  {
      Serial.println(&quot;Beat Detected!&quot;);
  }
  
  void setup()
  {
      Serial.begin(115200);
  
      pinMode(19, OUTPUT);
      Blynk.begin(auth,&quot;************&quot;, &quot;**********&quot;);
  
      Serial.print(&quot;Initializing Pulse Oximeter..&quot;);
  
  if (!pox.begin()) {
      Serial.println(&quot;FAILED&quot;);
      for(;;);
  }     
  else
  {
      Serial.println(&quot;SUCCESS&quot;);
      pox.setOnBeatDetectedCallback(onBeatDetected);
  }
  
      // The default current for the IR LED is 50mA and it could be changed by uncommenting the following line.
      pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);
  
  }
  
  void loop()
  {
      pox.update();
      Blynk.run();
  
      BPM = pox.getHeartRate();
      SpO2 = pox.getSpO2();
      if (millis() - tsLastReport &gt; REPORTING_PERIOD_MS)
      {
          Serial.print(&quot;Heart rate:&quot;);
          Serial.print(BPM);
          Serial.print(&quot; bpm / SpO2:&quot;);
          Serial.print(SpO2);
          Serial.println(&quot; %&quot;);
  
          Blynk.virtualWrite(V3, BPM);
          Blynk.virtualWrite(V4, SpO2);
  
          tsLastReport = millis();
      }
  }
  </code></pre>
  <p>How do I interface MAX30100 to other pins? What should be the instructions?</p>
  <pre><code>PulseOximeter pox;
  </code></pre>
  <p>What does this instruction mean?</p>