iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
You can use a MAX30102 with an ESP32 in the Arduino IDE by wiring the sensor module to the ESP32’s I²C pins, installing SparkFun’s MAX3010x library, and adapting one of its example sketches to your board. The MAX30102 measures optical signals used for pulse-oximetry and heart-rate projects; a hobby assembly is not, on the evidence available here, a clinically validated measuring device.
What the MAX30102 does in an ESP32 project
The MAX30102 is the optical sensing component. It contains LEDs, photodetectors, optical elements, and low-noise electronics with ambient-light rejection. It communicates with a host such as an ESP32 over an I²C-compatible interface. Analog Devices describes the MAX30102 as an integrated pulse-oximetry and heart-rate monitor module and lists wearable, fitness, smartphone, and tablet applications for the device. Analog Devices’ MAX30102 product information and datasheet provide the manufacturer’s specifications.
In practical terms, the sensor supplies optical samples; software can use those samples to calculate values such as pulse rate or oxygen saturation. The sensor itself is not a complete, validated medical instrument, and a number displayed by a hobby sketch should not be treated as a diagnosis or as equivalent to a regulated pulse oximeter. The measurement chain includes the sensor, the breakout board, the wiring, and the sketch’s processing; the fact that a library can read samples does not validate that full chain.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Chip specifications versus breakout-board specifications
The manufacturer’s datasheet, revision 1 dated November 8, 2018, gives the optical module dimensions as 5.6 mm × 3.3 mm × 1.55 mm. It specifies a 1.8 V supply for the sensor and a separate 3.3 V supply for its internal LEDs, as well as an operating-temperature range of −40 °C to +85 °C. These are specifications for the chip/module described by the manufacturer, not a universal wiring recipe or operating guarantee for every hobby breakout board.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
A breakout may add supporting voltage circuitry, but board designs vary. Before connecting one to an ESP32, check the exact module’s pin labels, schematic, and voltage documentation. Do not assume that a board marked “MAX30102” can accept any voltage just because the sensor communicates with a 3.3 V-capable controller. The chip’s two supply specifications describe the sensor’s internal power arrangement; they do not tell you which breakout pin to connect to the ESP32.
What you need
- An ESP32 development board.
- A MAX30102 breakout module with documentation for its power and I²C connections.
- A breadboard and suitable jumper wires for prototyping.
- The Arduino IDE and the SparkFun MAX3010x Sensor Library.
SunFounder’s ESP32 lesson uses an ESP32 development board, MAX30102 module, and breadboard, and directs readers to install SparkFun’s library. It does not establish a universal ESP32 model, pin mapping, or jumper-wire specification. Use the documentation for your specific board and module rather than copying a pinout from a different product. SunFounder’s ESP32 MAX30102 lesson is an example of this project route.
Choosing a MAX30102 module
When comparing breakout boards, look for more than the sensor name. Confirm that the listing or documentation identifies the board’s power input and voltage handling, labels the I²C connections, and provides a schematic or wiring instructions. Check whether it gives ESP32-specific guidance, but still verify that the guidance matches your exact development board and the pins your sketch uses.
The available sources do not compare breakout-board designs, prices, or performance. In particular, they do not establish that every MAX30102 breakout includes the same voltage-support circuitry. If the documentation does not explain its power input, treat that as an unresolved requirement rather than assuming the chip specifications are sufficient. A breadboard and prototyping supplies are useful for the documented maker route, but the sources do not specify a particular breadboard size, wire type, or ESP32 model.
Wire the module to the ESP32 safely
The MAX30102 uses I²C, so the essential signal connections are the module’s I²C data and clock lines, plus power and ground as required by the breakout. The actual ESP32 pins depend on the development-board model and the pin configuration expected by the sketch. Neither a universal pin pair nor a voltage arrangement for all breakout boards is established here.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
- Identify the exact board and module. Read the ESP32 board’s pin documentation and the MAX30102 breakout’s pin labels, voltage range, and schematic.
- Confirm the module’s power input. Distinguish the breakout’s documented input from the MAX30102 chip’s internal supply requirements. The chip-level 1.8 V and 3.3 V specifications do not by themselves tell you which breakout pin to connect to the ESP32’s supply.
- Connect ground and I²C. Connect grounds together and connect the module’s SDA and SCL pins to the I²C pins selected for the ESP32. Confirm those same pins are configured in the sketch.
- Check the wiring before powering up. Verify power polarity, voltage compatibility, and that SDA and SCL have not been swapped. Follow the module maker’s instructions for any additional pins.
If the board documentation is unclear about voltage handling, do not infer compatibility from the sensor name alone. Choose a module with a schematic and explicit ESP32-compatible wiring guidance, or resolve the electrical requirements before connecting it. The project sources do not give a single pin table that safely applies to every ESP32 board or breakout.
Install the Arduino library and choose an example
SparkFun’s MAX3010x library states that it supports the MAX30102 and includes example sketches usable from the Arduino IDE. The library handles I²C communication and sample reading. Its examples and documentation may use MAX30105 in names, but that naming does not mean the MAX30102 is unsupported. SparkFun’s hookup guide specifically describes MAX30102 support as using the red and infrared LEDs. The SparkFun MAX3010x Sensor Library repository and SparkFun’s library hookup instructions explain the library and its examples.
Recommended Free Tools
- Open the Arduino IDE and open Library Manager using the IDE’s library-management interface.
- Search for
SparkFun MAX3010xand install the SparkFun MAX3010x Sensor Library. SunFounder’s ESP32 lesson gives this search phrase for its project route. - Open the IDE’s examples menu and locate the examples grouped under the installed SparkFun MAX3010x library. Select an example that matches what you want to inspect—such as raw sensor readings or a higher-level calculation—after checking its comments and requirements.
- Select the ESP32 board model you are using and its connected port in the IDE. Review the example’s I²C pin setup and change it only as needed to match the wiring and the selected ESP32 board.
- Compile the sketch before uploading. Resolve missing-library or board-selection errors first; then upload it and use the output interface expected by that example to inspect readings.
The available sources establish library compatibility and example availability, but not the exact example contents, serial settings, ESP32 pin definitions, or a single sketch that works unchanged on every board. Avoid assuming that a tutorial’s board configuration will match your own. The library route provides a starting point for communication and samples; it does not remove the need to match the board configuration or check what a particular example calculates.
Raw samples versus calculated values
Library examples can differ in what they demonstrate. A raw-reading example is useful for observing sensor output, but a raw optical sample is not itself a heart-rate or oxygen-saturation result. A higher-level example may calculate values from the sensor data, but check its comments and stated purpose rather than assuming every example reports both. SparkFun’s guide documents red and infrared LED support for MAX30102, while the reviewed material does not rank libraries or establish the accuracy of a particular calculation.
Choose the right project route
| Route | What it offers | What to verify |
|---|---|---|
| MAX30102 breakout plus ESP32 | A direct sensor-to-controller maker project using I²C. SunFounder documents an ESP32 lesson with a MAX30102 module and breadboard. | Breakout power handling, pin labels, ESP32 I²C pin selection, and sketch configuration are module- and board-specific. |
| SparkFun MAX3010x library | Explicit MAX30102 support, I²C communication and sample-reading support, and Arduino IDE examples. | Inspect each example for its output and configuration; the sources do not establish accuracy rankings among libraries. |
| MAX30101 plus MAX32664 sensor-hub board | A different product architecture that combines a MAX30101 with a MAX32664 sensor hub. | It is not a MAX30102 breakout. Do not treat its hardware or instructions as interchangeable with the MAX30102 project. See SparkFun’s sensor-hub hookup guide. |
For a first build, the direct MAX30102 route is the closest match to this project. The library route is useful because it provides a documented starting point, but the existence of examples does not establish that every sketch exposes the same calculated values or works without board-specific configuration.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
The sensor-hub option is worth recognizing when comparing project architectures, not as a drop-in substitute. It uses a MAX30101 and MAX32664 rather than the MAX30102 board described here, so its hardware and instructions should not be treated as interchangeable. The sources do not provide a cost comparison or establish that one route is more accurate than another.
Understand what the readings can—and cannot—tell you
A library example may expose sensor samples or calculated values, depending on the sketch. Read its comments to determine which it produces; do not assume that a raw optical reading is already a heart rate or oxygen-saturation result. The MAX30102’s LEDs and photodetectors are the sensing hardware, while a sketch and its processing determine how readings are represented.
Keep the distinction between a working electronics demonstration and a reliable measurement. The cited manufacturer, library, and tutorial material does not validate a particular ESP32, breakout, wiring arrangement, and sketch as a clinical device. It provides no controlled accuracy, stability, or battery-life results for that assembled combination. Do not use its output to diagnose a condition, make treatment decisions, or substitute for a regulated pulse oximeter.
For the same reason, do not infer a clinical performance claim from the chip’s specified operating-temperature range or its inclusion in a hobby tutorial. Those specifications describe the component, not the performance of your assembled project. If your goal is a maker demonstration, describe it as such; if you need a medical measurement, use an appropriate validated device and professional guidance rather than relying on this project.
Troubleshoot common setup problems
The IDE cannot find the library
Check that the installed library is SparkFun MAX3010x, rather than searching only for a MAX30102-named package. Reopen Library Manager, search the documented library name, and confirm installation before compiling. The example or library may mention MAX30105 while still supporting MAX30102.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallRank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
The sketch compiles but the sensor does not respond
- Recheck the module’s power input and ground against its own documentation.
- Confirm SDA and SCL connect to the pins configured by the sketch, not merely to pins that happen to be labeled or used as I²C on another ESP32 board.
- Verify that the selected breakout’s voltage handling is compatible with the connection you made.
- Inspect the chosen example’s setup and comments to see whether it expects a particular board configuration.
The project shows data but not the value you expected
Check whether the selected example prints raw samples or calculated output. Library availability alone does not establish that an example produces both heart rate and oxygen saturation. Choose an example whose documented purpose matches the result you are seeking, and do not reinterpret raw readings as a clinical value.
The wiring guide does not match your parts
Use the exact ESP32 and breakout documentation as the authority for pins and power. Tutorials demonstrate a project path, not a universal pinout. If the module lacks clear power and pin specifications, pause rather than adapting another board’s wiring by appearance.
The project works in one example but not another
Examples can have different purposes and configuration assumptions. Compare their comments, I²C pin setup, and expected output before concluding that the sensor or library is faulty. The reviewed sources confirm that examples are available, but they do not document a single universal example or guarantee identical output across sketches.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Frequently Asked Questions
How do I use a MAX30102 with an ESP32 in the Arduino IDE?
Use a documented MAX30102 breakout, connect its power, ground, SDA, and SCL according to that board’s documentation, install SparkFun MAX3010x through Library Manager, and adapt a library example to the ESP32 board and I²C pins you selected. There is no universal pin mapping for all ESP32 boards in the reviewed sources.
Free tools Windows power users keep installed
One-click scans. No signup required.
Does the SparkFun MAX3010x library support MAX30102?
Yes. SparkFun says its MAX3010x library supports MAX30102 and provides Arduino examples. Some example or library names may mention MAX30105; SparkFun’s hookup guide identifies MAX30102 support using the red and infrared LEDs.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Can I connect the MAX30102 chip directly to the ESP32’s 3.3 V supply?
Do not decide from the chip specifications alone. Analog Devices specifies a 1.8 V sensor supply and a separate 3.3 V LED supply, but breakout boards may add supporting circuitry and vary. Check the exact breakout’s schematic, pin labels, and voltage documentation before wiring it.
Does every MAX30102 Arduino example report both heart rate and SpO₂?
No such guarantee is established by the sources. Examples may show raw samples or calculated values. Inspect the specific example’s comments and purpose; a raw optical reading is not itself a heart-rate or oxygen-saturation result.
Is an ESP32 MAX30102 project a medical-grade pulse oximeter?
The cited manufacturer, library, and tutorial sources do not validate this assembled hobby project as a clinical device. Do not use its output for diagnosis or treatment decisions or treat it as equivalent to a regulated pulse oximeter.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The Bottom Line
A MAX30102 and ESP32 make a documented maker-project combination: use a breakout with clear power guidance, match its I²C wiring to your board and sketch, then start with SparkFun’s MAX3010x examples. Check whether an example returns raw samples or calculated values, and treat the build as an educational project—not a clinically validated pulse oximeter.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

