Pi Pico Keyboard Emulator HELP?
Posted: Tue Mar 16, 2021 1:08 am
Tried to store the keys_pressed data in a file on the pico... info.txt as follows...
Keycode.A
"Hello, World!"
"https://cytro-pi-pico"
..................................
I added the following code to read the info.txt file...
keys_pressed = []
with open("/info.txt", "r") as file:
print("Reading file from PICO")
for line in file:
keys_pressed.append(line.strip())
the result is ...
['Keycode.A', '"Hello, World!"', '"https://cytron.io/p-maker-pi-pico\n"]
not like whats hard coded into the program...
[Keycode.A, "Hello, World!", "https://cytron.io/p-maker-pi-pico\n"]
tried taking out the single quotes, and other options, but cant find a way to make it work???
PLEASE HELP!!!
Thank you... Robert
Keycode.A
"Hello, World!"
"https://cytro-pi-pico"
..................................
I added the following code to read the info.txt file...
keys_pressed = []
with open("/info.txt", "r") as file:
print("Reading file from PICO")
for line in file:
keys_pressed.append(line.strip())
the result is ...
['Keycode.A', '"Hello, World!"', '"https://cytron.io/p-maker-pi-pico\n"]
not like whats hard coded into the program...
[Keycode.A, "Hello, World!", "https://cytron.io/p-maker-pi-pico\n"]
tried taking out the single quotes, and other options, but cant find a way to make it work???
PLEASE HELP!!!
Thank you... Robert