Coder Social home page Coder Social logo

dbus-adc's Introduction

dbus-adc

A daemon, part of Venus, that reads analog sensors info from the adc module and publishes it on dbus. Either as tank level information or temperature readings.

building

This is a velib project.

Besides on velib, it also depends on:

  • dbus libs + headers
  • libevent libs + headers

After cloning, and getting the velib submodule, create the Makefile:

cd software
./ext/velib/mk/init_build.sh

More information about this is in velib/doc/README_make.txt

For cross-compiling for a Venus device, see here. And then especially the section about velib projects.

dbus paths

Tank:

com.victronenergy.tank


/analogpinFunc
/Level              0 to 100%
/Remaining          m3
/Status             0=Ok; 1=Disconnected; 2=Short circuited; 3=Reverse polarity; 4=Unknown
/Capacity           m3
/FluidType          0=Fuel; 1=Fresh water; 2=Waste water; 3=Live well; 4=Oil; 5=Black water (sewage)
/Standard           0=European; 1=USA

Note that the FluidType enumeration is kept in sync with NMEA2000 definitions.

Temperature:

com.victronenergy.temperature

/analogpinFunc
/Temperature        degrees Celcius
/Status             0=Ok; 1=Disconnected; 2=Short circuited; 3=Reverse polarity; 4=Unknown
/Scale
/Offset
/TemperatureType    0=battery; 1=fridge; 2=generic

configuration

A configuration file is required in /etc/venus/dbus-adc.conf. The following directives are used:

Directive Description
device D Name of device under /sys/bus/iio/devices
vref V The reference voltage of the ADC as a floating-point number
scale S Maximum value of ADC reading, e.g. 4095 for a 12-bit device
tank N Tank level sensor at ADC input N
temp N Temperature sensor at ADC input N
label L Label for next sensor (optional)

The device, vref, and scale directives are mandatory and apply to subsequent sensor declarations.

A # character starts a comment. Blank lines are ignored.

dbus-adc's People

Contributors

edevries-victron avatar ehudfrank avatar izak avatar jhofstee avatar mansr avatar mpvader avatar osaether avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.