<commit_before>import RPi.GPIO as GPIO
import time

# Use GPIO numbers, not pin numbers (alt=BOARD for the numbers on the GPIO header pins)
GPIO.setmode(GPIO.BCM)

#set up the GPIO BCM channel 17 for input
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP)

lv=True;
cv=True;

while (True):
	limiter_val = GPIO.input(17)
	cam_val = GPIO.input(22)

	if limiter_val and not lv:
		print("Limiter switch closed")
	if not limiter_val and lv:
		print("Limiter switch opened")
	lv = limiter_val

	if cam_val and not cv:
		print("Cam switch closed")
	if not cam_val and cv:
		print("Cam switch opened")
	cv = cam_val
	
	time.sleep(0.1)<commit_msg>Update proximitySwTest.py<commit_after>import RPi.GPIO as GPIO
import time

# Use GPIO numbers, not pin numbers (alt=BOARD for the numbers on the GPIO header pins)
GPIO.setmode(GPIO.BCM)

#set up the GPIO BCM channel 17 for input
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP)

lv=True;
cvA=True;

while (True):
	limiter_val = GPIO.input(17)
	cam_valA = GPIO.input(27)
	cam_valB = GPIO.input(22)

#End stop switch
	if limiter_val and not lv:
		print("Limiter switch closed")
	if not limiter_val and lv:
		print("Limiter switch opened")
	lv = limiter_val

#Limit pan right from camera's POV
	if cam_valA and not cvA:
		print("Cam switch A closed")
	if not cam_valA and cvA:
		print("Cam switch A opened")
	cvA = cam_valA
	
#Limit pan left from camera's POV
	if cam_valB and not cvB:
		print("Cam switch B closed")
	if not cam_valB and cvB:
		print("Cam switch B opened")
	cvB = cam_valB

	time.sleep(0.1)
{'fraction_non_alphanumeric': 0.10094451003541913, 'fraction_numerical': 0.01652892561983471, 'mean_word_length': 4.503246753246753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5242744', 'n_tokens_mistral': 685, 'n_tokens_neox': 648, 'n_words': 206}