====== c++ ====== ==== Type Cast ==== if(sensor_type == SensorBase::BUTTON){ Button* btn = static_cast(sensor); Serial.println(btn->isPressed()); }