Carbon materials in electronics and photonics