add error state
added pi-gpio