add  self.comp = hal.component('drawing')         

        self.comp = hal.component('drawing')
        self.comp.newpin('segment', hal.HAL_S32, hal.HAL_OUT)
        self.comp.ready()