I have a 'pulse train' generated from a photo interrupter and slotted disc mounted on a rotating shaft. My goal is to measure the time between each rising edge.
I have looked at the data sheet for the SAM3X8E and figured out that I need to configure a timer in 'capture mode' to do this.
My problem is that I am new to Arduino Due / this level of programming so I do not know how to set-up all the prerequisites before this (PIO, PMC, SYSCLK? etc.)
I have spent an extensive period trying to find help/ example code to no avail. Anything I do find is on Arduino Uno or Mega and therefore is of little help because of the different architecture.
Can anyone help or has anyone else done this/ similar problem?
(I am using Atmel Studio 7 as it seems to be the go-to for advanced SAM3X8E programming)
Thanks