Commit df439306 authored by Rousseau Vincent's avatar Rousseau Vincent

Add conversion in milli volt

parent 278bf2e9
......@@ -47,7 +47,10 @@ class ADS1115(Node):
def timer_callback(self):
msg = Float32()
msg.data = self.adc.get_last_result()
# Conversion in milli volt for gain 1
# https://github.com/kentegrate/rpi_drivers/blob/master/include/rpi_drivers/ads1115.hpp
# https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/ADS1115/ADS1115.h
msg.data = self.adc.get_last_result()*0.125000
self.get_logger().info('Publishing: "{0}"'.format(msg.data))
self.pub.publish(msg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment