Scanning probe microscopic study of piezotronics and triboelectrification for their applications in mechanical sensing