Comments (5)
(I hit return accidentally and it sent off the title!)
Suggest
Define constants for
MIN_SHUNT_VOLTAGE = const(0.00004)
MIN_BUS_VOLTAGE = const(0.008)
and use in code
This allows calling methods to compare values against the resolution available if needed
Like your version of the library. Much nicer.
Thanks John
from circuitpython_ina3221.
Hi @jmfloyd
I've added the 2 constants as:
# General constants
C_BUS_ADC_LSB = const(0.008) # VBus ADC LSB is 8mV
C_SHUNT_ADC_LSB = const(0.00004) # VShunt ADC LSB is 40µV
for both lite and full in this branch : https://github.com/barbudor/CircuitPython_INA3221/tree/pr_add_LSB_constants
Are you using lite or full ?
I don't have the time to setup a test platform, so could you please test and report back that I haven't broken anything ?
If this is ok, I will merge in the main branch.
Thanks for the suggestion.
from circuitpython_ina3221.
I have tested your changes and working as expected
John
from circuitpython_ina3221.
Closed by #4
Thanks
from circuitpython_ina3221.
Closed by #4
Thanks
from circuitpython_ina3221.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circuitpython_ina3221.