Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: BenLewis

Search: Search took 0.00 seconds.

  1. Hi gfvalvo, thank you for your latest example...

    Hi gfvalvo, thank you for your latest example code. It works great! This is a very nice solution to my problem.
  2. Got it! Thank you so much.

    Got it! Thank you so much.
  3. Hi gfvalvo, thank you for your very useful...

    Hi gfvalvo, thank you for your very useful examples. They work great!

    I've made just one small change to your second example. Like in your first example, the counter needs to be reset ( with...
  4. Hi gfvalvo, thank you for your suggestion. I...

    Hi gfvalvo, thank you for your suggestion.

    I tried clearing the TOF flag in setup() but I get the same result. That is, no pulse on first run and one pulse for every run there after.

    Here is my...
  5. I'm now able to count PWM pulses and stop the PWM...

    I'm now able to count PWM pulses and stop the PWM output after a predefined number of pulses. However, on the first run after boot the number of pulses output is always one less than required.

    The...
  6. Hi manitou, thank you for your advice. It was...

    Hi manitou, thank you for your advice. It was very helpful.
  7. I like the idea of triggering the counts off the...

    I like the idea of triggering the counts off the FTM, but so far I can't get this to work.

    I think the problem might be due to the analogWrite() function using the same interrupt.

    Here is my...
  8. How to run PWM output for predefined number of pulses?

    I need to run a PWM output for a predefined number of pulses. The frequency is generally around 50 Hz. The duty cycle can be anywhere form 0 to 100 %.

    I'm currently using the Teensy pulsed output...
  9. Replies
    6
    Views
    581

    Thank you Theremingenieur and PaulStoffregen,...

    Thank you Theremingenieur and PaulStoffregen, I've made some good progress with my project since my last post. I'm using the FreqMeasureMulti library to measure the width of both high and low pulses...
  10. Replies
    6
    Views
    581

    I've had a look at the FreqMeasureMulti library...

    I've had a look at the FreqMeasureMulti library in more detail and it's not quite what I need. I need to count the total number of rising and falling edges over time. The period between each edge is...
  11. Replies
    6
    Views
    581

    Thank you. The FreqMeasureMulti library looks...

    Thank you. The FreqMeasureMulti library looks like it is exactly what I was looking for. I'll give it a try.
  12. Replies
    6
    Views
    581

    How to Count Rising and Falling Edges?

    I'm using a Teensy 3.5 to count pulses using the CountFreq (https://www.pjrc.com/teensy/td_libs_FreqCount.html) library. This is working well.

    I now would like to count both rising and falling...
Results 1 to 12 of 12