Python Forum
Controller Buzzer as Distance Decreases
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Controller Buzzer as Distance Decreases
#3
thank you, that cleaned that up. Any ideas as to how I can prevent this beep code to get fired so much that it keeps going even after this statement is no longer true?

if int(float(dist)) <= 100 and int(float(dist)) >= 50:
                speed = int(float(dist))/1000
                print("Speed:" + str(speed))
                GPIO_BEEP.beep(speed,speed)
Reply


Messages In This Thread
RE: Controller Buzzer as Distance Decreases - by barkster - Oct-29-2021, 03:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python and DMX (aka, light controller) ScottAF 4 2,782 Apr-06-2023, 07:09 PM
Last Post: ScottAF
  How can flask find the controller? 3lnyn0 3 1,415 Jul-08-2022, 10:05 AM
Last Post: Larz60+
  Auto re-pair / re-sync Controller via Script? User3000 2 2,392 Nov-30-2020, 11:42 AM
Last Post: User3000
  Tuning PID controller Sancho_Pansa 4 4,479 Nov-09-2020, 07:51 AM
Last Post: Sancho_Pansa
  Xbox Controller arki 0 1,744 Jun-30-2020, 10:32 AM
Last Post: arki
  Please help! Akai APC20 midi controller script versusliveact 0 2,175 Feb-14-2020, 05:37 AM
Last Post: versusliveact
  Visualize Geo Map/Calculate distance zarize 1 1,936 Dec-05-2019, 08:36 PM
Last Post: Larz60+
  managing command codes for external controller box Oolongtea 0 1,951 Sep-19-2019, 08:32 AM
Last Post: Oolongtea
  euclidean distance jenya56 3 2,896 Mar-29-2019, 02:56 AM
Last Post: scidam
  organizing by distance gonzo620 7 4,043 Oct-16-2018, 01:41 AM
Last Post: stullis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020