Wrote code for pio_init