Skip to content

QuentinCG/Arduino-LM75A-Temperature-Sensor-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I2C Temperature Sensor (LM75A) Library for Arduino

Build Status Codacy Badge License: MIT Donate

What is it

This library (with example) is designed to be integrated in projects using LM75A sensors to get temperature with most Arduino boards.

You'll be able to use between 1 and 8 LM75A sensor on a single board (or up to 16 if your board handles multiple I2C).

How to install

  1. Download latest release

  2. On your Arduino IDE, click "Sketch" menu and then "Include Library > Add .ZIP Libraries"

  3. You can now use the library for your project or launch an example ("File > Examples")

How to connect the sensor to your Arduino

LM75A sensor Arduino
VCC 3.3V
GND GND
SDA A4 (SDA)
SCL A5 (SCL)
A0 GND (or VCC to increase I2C address of 1)
A1 GND (or VCC to increase I2C address of 2)
A2 GND (or VCC to increase I2C address of 4)
OS None

(Note: SDA and SCL of your board may change depending on your Arduino board)

Examples

Three examples are provided with this library:

Show temperature in degrees and fahrenheit every second (1 sensor)

Link to source code

Show temperature in degrees and fahrenheit every second (2 sensors in same I2C network)

Link to source code

Show temperature in degrees and fahrenheit every second (2 sensors in different I2C network)

Link to source code

Interesting forks

License

This project is under MIT license. This means you can use it as you want (just don't delete the library header).

Contribute

If you want to add more examples or improve the library, just create a pull request with proper commit message and right wrapping.

Contributors

  • Thank you andrzejboro for your help on a bug for negative temperature.
  • Thank you damianjwilliams for your idea and help on multi I2C handling.
  • Thank you BirdAPI for your idea to add a raw contructor using directly the I2C address.