Search found 2 matches

by nickc20
Wed Jan 02, 2019 10:38 pm
Forum: Robotics & Automation
Topic: trigger event when variable equals x - python
Replies: 2
Views: 76

Re: trigger event when variable equals x - python

I would highly recommend having a google and learning the basics and fundamentals of python :) otherwise you'll spend all your time waiting for replies on the forum :P To answer your question, yes checking the value of your counter is a good way of doing this. Here is an example of how this could w...
by nickc20
Tue Jan 01, 2019 2:10 pm
Forum: Robotics & Automation
Topic: trigger event when variable equals x - python
Replies: 2
Views: 76

trigger event when variable equals x - python

Hi I am using this script - https://www.modmypi.com/blog/how-to-use-a-rotary-encoder-with-the-raspberry-pi - to count button presses. I would like to modify it so that when the counter variable reaches 10 an event is triggered. The simplest way to do this I've been informed is to check the counter e...