22[ ![ Arduino CI] ( https://github.com/RobTillaart/weight/workflows/Arduino%20CI/badge.svg )] ( https://github.com/marketplace/actions/arduino_ci )
33[ ![ Arduino-lint] ( https://github.com/RobTillaart/weight/actions/workflows/arduino-lint.yml/badge.svg )] ( https://github.com/RobTillaart/weight/actions/workflows/arduino-lint.yml )
44[ ![ JSON check] ( https://github.com/RobTillaart/weight/actions/workflows/jsoncheck.yml/badge.svg )] ( https://github.com/RobTillaart/weight/actions/workflows/jsoncheck.yml )
5+ [ ![ GitHub issues] ( https://img.shields.io/github/issues/RobTillaart/weight.svg )] ( https://github.com/RobTillaart/weight/issues )
6+
57[ ![ License: MIT] ( https://img.shields.io/badge/license-MIT-green.svg )] ( https://github.com/RobTillaart/weight/blob/master/LICENSE )
68[ ![ GitHub release] ( https://img.shields.io/github/release/RobTillaart/weight.svg?maxAge=3600 )] ( https://github.com/RobTillaart/weight/releases )
9+ [ ![ PlatformIO Registry] ( https://badges.registry.platformio.org/packages/robtillaart/library/weight.svg )] ( https://registry.platformio.org/libraries/robtillaart/weight )
710
811
912# Weight
1013
11- Library of weight conversion functions .
14+ Arduino library to convert weight units .
1215
1316
1417## Description
@@ -18,6 +21,13 @@ Weight.h is a library containing weight conversion functions.
1821Open for additions, including obscure weight metrics or
1922weight related math functions and constants.
2023
24+ #### Related
25+
26+ - https://github.com/RobTillaart/AtomicWeight
27+ - https://github.com/RobTillaart/VolumeConverter
28+ - https://github.com/RobTillaart/HX711
29+ - https://github.com/RobTillaart/HX711_MP
30+
2131
2232## Interface
2333
@@ -68,7 +78,10 @@ New conversions are possible by providing a setXYZ and getXYZ() function.
6878These two should convert to and from grams respectively.
6979Additions are welcome, please open an issue.
7080
71- Internal representation is the gram as it the standard.
81+ Internal representation is the gram as it the ISO standard.
82+
83+ Since version 0.3.0 the converter can also add different units.
84+
7285
7386## Interface
7487
@@ -77,7 +90,7 @@ Internal representation is the gram as it the standard.
7790
7891- ** weightConverter()**
7992
80- #### setters
93+ #### Setters
8194
8295- ** void setKilogram(float value = 0)**
8396- ** void setGram(float value = 0)**
@@ -98,8 +111,28 @@ Internal representation is the gram as it the standard.
98111- ** void setGrain(float value = 0)**
99112- ** void setCarat(float value = 0)**
100113
101-
102- #### getters
114+ #### Adders
115+
116+ - ** void addKilogram(float value = 0)**
117+ - ** void addGram(float value = 0)**
118+ - ** void addLBS(float value = 0)**
119+ - ** void addStone(float value = 0)**
120+ - ** void addOunce(float value = 0)**
121+ - ** void addLongTonUK(float value = 0)**
122+ - ** void addShortTonUS(float value = 0)**
123+ - ** void addQuarterUK(float value = 0)**
124+ - ** void addQuarterUS(float value = 0)**
125+ - ** void addSlug(float value = 0)**
126+ - ** void addTroyPound(float value = 0)**
127+ - ** void addTroyOunce(float value = 0)**
128+ - ** void addRobie(float value = 0)**
129+ - ** void addDram(float value = 0)**
130+ - ** void addDrachme(float value = 0)**
131+ - ** void addPoint(float value = 0)**
132+ - ** void addGrain(float value = 0)**
133+ - ** void addCarat(float value = 0)**
134+
135+ #### Getters
103136
104137- ** float getKilogram()**
105138- ** float getGram()**
@@ -120,32 +153,32 @@ Internal representation is the gram as it the standard.
120153- ** float getGrain()**
121154- ** float getCarat()**
122155
123-
124156## Future
125157
126- #### must
158+ #### Must
127159- improve documentation
128160 - where are units used
129161
130- #### should
162+ #### Should
131163
132164
133- #### could
165+ #### Could
134166- create data types of stone lbs kilo etc.?
135167
136168
137- #### won 't (unless)
169+ #### Won 't (unless)
138170- large masses - sun planets ? (see relativity library)
139171- gravity constants of planets REL or ABS eg REL_GRAVITY_EARTH 1.0
140- - mass of all elements
141- - an array of floats
142- - a compressed format with access function (1 byte/ element)
143- - constants e.g. MASS_OXYGEN
144- - separate periodicTable.h file ?
145172- molarity functions
146173- mass of common substances.
147- - teaspoon
148- - that is a volume unit.
149- - volume conversion too?
174+
175+
176+ ## Support
177+
178+ If you appreciate my libraries, you can support the development and maintenance.
179+ Improve the quality of the libraries by providing issues and Pull Requests, or
180+ donate through PayPal or GitHub sponsors.
181+
182+ Thank you,
150183
151184
0 commit comments