Improving the energy resolution while mitigating the effects of dark-noise, for a microcontroller based SiPM sensor. (1st September 2020)