From 10870f9ac8023df32843742cf44aec8415527ae0 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Sat, 25 Nov 2023 00:53:56 -0500 Subject: [PATCH] [U] Update receiver --- receiver.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/receiver.py b/receiver.py index 7a82113..37f86cd 100644 --- a/receiver.py +++ b/receiver.py @@ -3,12 +3,10 @@ from pathlib import Path import time import serial import re -from pynput.keyboard import Key, Controller - -keyboard = Controller() +from vk import * # Configure your serial port and baud rate -SERIAL_PORT = 'COMx' # Replace 'COMx' with your serial port (e.g., 'COM3' on Windows or '/dev/ttyUSB0' on Linux) +SERIAL_PORT = 'COM3' # Replace 'COMx' with your serial port (e.g., 'COM3' on Windows or '/dev/ttyUSB0' on Linux) # SERIAL_PORT = '/dev/ttyACM0' BAUD_RATE = 115200 PATH = Path('C:/MUGS/felica.txt') @@ -46,10 +44,10 @@ def parse_uid(data): from playsound import playsound playsound(str(AUDIO_EFFECT)) - # Press ENTER button - keyboard.press(Key.enter) - time.sleep(0.5) - keyboard.release(Key.enter) + # Press scan button + press_key() + time.sleep(2) + release_key() return uid