Modified example to use serial commands.
Added set gain method and pointer to function
end recorder handler. Added class constructor.