add digitalwrite directly after read in rpi_task_gpio.c