Commit graph

5 commits

Author SHA1 Message Date
ladyada
c93ea16dd6 Integrate calibration loading and add comprehensive mode support
- Automatically load calibration constants in begin() method
- Remove separate getCalibrations() call from example sketch
- Add selectable measurement modes in example with commented options
- Implement proper SOC (Start of Conversion) triggering for step modes
- Support all measurement modes: Continuous, Step, and Sleeping Step
- Optimize loop for efficient new data flag handling
- Add automatic single measurement triggering for step-based modes
- Tested and verified both continuous and step mode operation
- Apply clang-format code formatting to all C++ files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-02 16:29:51 -04:00
ladyada
4552553eb3 Add complete object temperature calculation with debug controls
- Implement full getObjectTemperature() with Stefan-Boltzmann law calculation
- Add complete object temperature formula: TO = pow( STO / (emiss * Fa * Ha * (1 + Ga * (TODUT - TO0) + Fb * (TADUT - TA0))) + TAK^4, 0.25) - 273.15 - Hb
- Add TO0/TA0 member variables for iterative calculation state tracking
- Add scientific notation display for large values (TAK^4, TO_K^4) using custom formatting
- Add MLX90632_DEBUG define with ifdef controls for all debug output
- Add proper indentation (2 spaces) for all debug prints for better readability
- Convert all string literals to F() macro for SRAM optimization (1150 bytes saved)
- Complete temperature measurement system working: ambient ~24°C, object detection functional
- All intermediate calculations visible with proper formatting in debug mode

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-02 15:15:02 -04:00
ladyada
374dbc0494 Add calibration constants and ambient temperature calculation
- Implement getCalibrations() to read all EEPROM calibration constants with proper double precision scaling using multiplication (2^-n) instead of division
- Add getAmbientTemperature() with complete calculation: VRTA, AMB pre-calculations and final temperature formula P_O + (AMB - P_R)/P_G + P_T * (AMB - P_R)^2
- Add refresh rate control with setRefreshRate()/getRefreshRate() functions
- Add getEEPROMVersion() for version information
- Add RAM_6 register definition for ambient temperature calculations
- Update test sketch to display calibration constants and continuous ambient temperature readings
- All functions tested successfully on hardware with MLX90632 sensor showing stable ~23.36°C readings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 20:38:53 -04:00
ladyada
dfa2379739 Add comprehensive MLX90632 control and status register functionality
- Add getProductCode() function with product code decoding
- Add control register functions: startSingleMeasurement(), startFullMeasurement()
- Add mode control: setMode(), getMode() with enum support
- Add measurement select: setMeasurementSelect(), getMeasurementSelect()
- Add status register functions: isBusy(), isEEPROMBusy(), reset()
- Add data monitoring: readCyclePosition(), resetNewData(), isNewData()
- Add measurement mode and type enums (HALT, STEP, CONTINUOUS, MEDICAL, EXTENDED_RANGE)
- Update test sketch with full register testing and status monitoring
- All functions use proper RegisterBits for clean bit manipulation
- All setter functions return bool for I2C write verification

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 14:55:31 -04:00
Limor Fried
d38f88cb80 Initial commit: MLX90632 Far Infrared Temperature Sensor library
- Basic I2C communication with byte-swapped register addresses
- Chip detection via product code register
- getProductID() function for 48-bit unique product ID
- Test example sketch
- GitHub CI workflow and clang-format configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 19:25:34 -04:00