Go to advanced search

by 15green
Sat Nov 24, 2018 9:53 am
Forum: Python
Topic: Combining pigpio callbacks
Replies: 3
Views: 939

Re: Combining pigpio callbacks

I'd try something like this using the same callback for each GPIO. GPIO_1=17 GPIO_2=23 gpio_1_level=0 gpio_2_level=0 tally=0 def cbf(gpio, level, tick): global gpio_1_level, gpio_2_level, tally if gpio == GPIO_1: gpio_1_level = level elif gpio == GPIO_2: gpio_2_level = level if (gpio_1_level == 1) ...
by 15green
Fri Nov 23, 2018 9:50 am
Forum: Python
Topic: Combining pigpio callbacks
Replies: 3
Views: 939

Combining pigpio callbacks

As a beginner I have learnt a lot lately in my quest to use interrupts to count input pulses over a set period of time. Most success using pigpio tally. My next need is to increment a counter by 1 only when two inputs are high (i.e when two pulses collide). I am wondering what is the easiest and/or ...
by 15green
Mon Nov 12, 2018 10:47 am
Forum: Python
Topic: pigpio tally question
Replies: 0
Views: 183

pigpio tally question

As a Pi beginner I am trying to make a device to count the difference between two sets of pulses within a given period. I thought the simplest way would be to use tally as below. However after a hour (3600 seconds) I always get a difference which I really don't think is there. The pulses I am counti...
by 15green
Fri Nov 02, 2018 1:21 pm
Forum: Troubleshooting
Topic: Avoiding False Hits with RPi.GPIO Edge Detection
Replies: 18
Views: 18934

Re: Avoiding False Hits with RPi.GPIO Edge Detection

Hi Paulv As a complete Pi newbie I have been trying to use your solution in a piece of code I have been testing to monitor inputs for a logging device. However I still do occasionally get two or three "1" triggers is a row. Can you (or anyone) confirm I have implemented your idea correctly? Thanks f...

Go to advanced search