Javadoc link

LM75A is a simple temperature sensor that communicates thru i2c. 

It's service name in MRL is Lm75a.

You can find many different boards with this unit. On some of them you can change the i2c address, but several exists where you can't. If you want to use several lm75a on the same i2c bus use a board where you can change the addess, alternativley use the a multiplexer: http://myrobotlab.org/service/I2cMux

The default address is 0x48. The LM75A supports 8 different addresses from 0x48 thru 04F.

The LM75A can also be used as a thermostat. It has a OS pin that will change state when the temperature go above the set temperature limit, and change state again when the temperature goes below the set hysteresis limit.

 

Example code (from branch develop):
#file : Lm75a.py (github)
# This is an example of using the Lm75a temperature sensor connected on a WiFi
# network using the esp8266 service. 
# You can also use an Arduino or RasPi service to connect to the Lm75a
port="COM3"
 
if ('virtual' in globals() and virtual):
    virtualArduino = runtime.start("virtualArduino", "VirtualArduino")
    virtualArduino.connect(port)
    
 
lm75a = runtime.start("lm75a","Lm75a")
 
# esp8266 use
# esp = runtime.start("esp","Esp8266_01")
# esp.setHost("esp8266-02.local")
# lm75a.attach("esp","0","0x48")
 
# arduino use
arduino = runtime.start("arduino","Arduino")
arduino.connect(port)
lm75a.attach(arduino,"0","0x48")
 
print lm75a.getTemperature()
print lm75a.getConfig()
print lm75a.getTos()
print lm75a.getThyst()
 
lm75a.setTos(90)
lm75a.setThyst(88)
 
print lm75a.getTemperature()
print lm75a.getConfig()
print lm75a.getTos()
print lm75a.getThyst()

pedro

7 years 5 months ago

hello, i woudl be very interested in use temperature sensors with MRL, but i would liek to use up to minus 100 degrees celcius and with decimal values, is it possible?

 

thanks

In my work i use alot of temperature loggers but they are like thousens of euros same as the software is jsut incredible the prices, to put that working trough MRL would be awsome

 

kwatters

7 years 5 months ago

In reply to by pedro

These are also very cheap temperature / humidity sensors.  I have a few DHT22's , they're on the list to borg in :)  at some point.

 

Example configuration (from branch develop):
#file : Lm75a.py (github)
!!org.myrobotlab.service.config.ServiceConfig
listeners: null
peers: null
type: Lm75a