Hi, i'm trying to create a real sized tatacon and need your help with something.
i will explain how i did it when everything will work properly. (don't worry! )
for know everything is OK, my arduino returns one d, f , j or k each time a piezo sensor is activated
then, a python script take this input and do like a key was pressed.
work properly everywhere but in osu.
could someone help me figuring out what's happening ?
the script:
i will explain how i did it when everything will work properly. (don't worry! )
for know everything is OK, my arduino returns one d, f , j or k each time a piezo sensor is activated
then, a python script take this input and do like a key was pressed.
work properly everywhere but in osu.
could someone help me figuring out what's happening ?
the script:
SPOILER
# don't forget to install pyserial if not already done.
#"pip install pyserial" on command prompt :
#if python is installed on C:\ it should look like that:
# C:\users\yourname> set PATH = %PATH%;C:\python\scripts
# C:\users\yourname> pip install requests
##########################
import serial
import win32com.client
ser = serial.Serial("COM4",9600)
# COM4 might be diferent for you. choose the port where your arduino is
ser.isOpen()
shell = win32com.client.Dispatch("WScript.Shell")
while (0==0): # because why not
command = ser.read()
if (command == 'f'):
shell.SendKeys('F')
elif (command == 'd'):
shell.SendKeys('D')
elif (command == 'j'):
shell.SendKeys('J')
elif (command == 'k'):
shell.SendKeys('K')
#"pip install pyserial" on command prompt :
#if python is installed on C:\ it should look like that:
# C:\users\yourname> set PATH = %PATH%;C:\python\scripts
# C:\users\yourname> pip install requests
##########################
import serial
import win32com.client
ser = serial.Serial("COM4",9600)
# COM4 might be diferent for you. choose the port where your arduino is
ser.isOpen()
shell = win32com.client.Dispatch("WScript.Shell")
while (0==0): # because why not
command = ser.read()
if (command == 'f'):
shell.SendKeys('F')
elif (command == 'd'):
shell.SendKeys('D')
elif (command == 'j'):
shell.SendKeys('J')
elif (command == 'k'):
shell.SendKeys('K')