Nanocomposite microbeams for sensing applications