Investigation of the mechanical bending and frequency shift induced by adsorption and temperature using micro- and nanocantilever sensors