Check if Keyboard is present?
Goran (Sweden)
Posts: 68
I have a project where a keyboard connected now and then.
Now I want to know, in my main object, (when starting the keyaboard.spin) if the keyboard is connected.
I have tried the "PUB present : truefalse
'' Check if keyboard present - valid ~2s after start
'' returns t|f
· truefalse := -par_present
but i have not figured out how to pass the variabel to my main object where I can test this flag.
Anyone have a idea?
The whole idea with my project is to have a keyboard connected to be able to write some data and store in a SD-card and when restarting the propeller, it read from the SD-card and act depending of what stored in the SD-card.
Goran
Now I want to know, in my main object, (when starting the keyaboard.spin) if the keyboard is connected.
I have tried the "PUB present : truefalse
'' Check if keyboard present - valid ~2s after start
'' returns t|f
· truefalse := -par_present
but i have not figured out how to pass the variabel to my main object where I can test this flag.
Anyone have a idea?
The whole idea with my project is to have a keyboard connected to be able to write some data and store in a SD-card and when restarting the propeller, it read from the SD-card and act depending of what stored in the SD-card.
Goran
Comments
Does this help?
Mike
I did not wait enough, when I added 2 sec it worked.
You did it again
Thanks again
Goran