I am trying to generate a pulse train (using raspberry pi zero w) and read that pulse train (using an analog to digital converter AD1015 module). Below shows my code.