5 Replies Latest reply on Nov 8, 2018 4:53 AM by user_13463998

    How to mimic the PulsIn() function from arduino into PSoC Creator (PSoC LP5)

    mads-sh_3678521

      Hello,

      I'm making a color sensor (TCS3200), and i have a issue trying to make a function that works the same way as pulsin() from arduino.

       

      In a code i take my output value like this on arduino: PulsIn() function definition from arduino 

        // Reading the output frequency

        greenFrequency = pulseIn(sensorOut, LOW);

       

      and i have to do somthing like that on PSoC creator.

       

      Right now i only get 0 and 1 as output (the value of what i set my pins to).

      rgb.JPG

       

      in the attached code you can see what im trying to do.

       

       

      Thanks