Carbon nanostructure-based sensor