Last active
April 3, 2019 08:28
-
-
Save f13dev/b56a40553f670ffc3c521c07f47637b2 to your computer and use it in GitHub Desktop.
HP 39/40 Eliquid mixing calculator. Copy this code to a new program in your calculator and then when ran you are asked to enter: A VG ratio, A concentrate nicotine strength, A desired nicotine strength, A flavour percentage and the quantity to make. You will be presented with the required quantities. This assumes that your flavour and nicotine i…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXPORT ELIQUID() | |
BEGIN | |
LOCAL DP = 2) | |
INPUT(V,"VG percentage"); | |
INPUT(N,"Concentrate nicotine mg/ml"); | |
INPUT(D,"Desired nicotine mg/ml"); | |
INPUT(F,"Flavour percentage"); | |
INPUT(M,"Quantity to make (ml)"); | |
PRINT(); | |
LOCAL VGML = V/100*M; | |
Local NICML = (D/N)*M; | |
LOCAL FLAVML = F/100*M; | |
LOCAL PGML = M-VGML-NICML-FLAVML-PGML; | |
LOCAL PGR = 100-V; | |
PRINT(M + "ml, VG" + V + "/" + PGR + "PG, " + D + "mg/ml, " + F + "%"; | |
PRINT(""); | |
PRINT("VG: " + ROUND(VGML,DP) + "ml"); | |
PRINT("PG: " + ROUND(PGML,DP) + "ml"); | |
PRINT("Flavour: " + ROUND(FLAVML,DP) + "ml"); | |
PRINT("Nicotine: " + ROUND(NICML,DP) + "ml"); | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Screenshot of results: