The reference method is to bake a sample at 105C/220F in a convection oven for 24 hours and note the weight loss, 1 - (weight after)/(weight before). If you bake exactly 100 grams, then the percentage is 100 - after.bake.weight. This is called the ISO6673 or Karl Fisher method.
The standard field method for measuring moisture is capacitance metering. These cost around $300. An interesting low cost alternative is to measure the RH and temperature of the air in a sealed plastic bag with the green coffee inside after it has stabilized for a few hours. The equilibrium relationship between bean moisture content and RH/Temperature is shown in this graph:

Producers try to keep their coffee as close to the maximum 13% as possible, since its cheaper to produce water than coffee. Coffees that hav dried below 9% are probably past crop. Coffees over 13%, maybe even 12%, may have mold problems.
You may want to adjust the drop in and drying period to mathc moisture when roasting coffees





