Can i use keyboard.write with spark core ?
I know arduino uno can not do it , leonardo only can do that . but what about spark core ?
Can i use keyboard.write with spark core ?
I know arduino uno can not do it , leonardo only can do that . but what about spark core ?
Having tried the āsearchā option, this came up: https://community.spark.io/t/usb-hid-support-on-core/
Perhaps youāll find some more information there, and if not, you can at least ask the responsible people.
@Gentmat, Iāve mainly been playing with HID Mouse on the Core and this works quite nicely.
About the HID Keyboard support, itās still quite rudimentary.
You can Keyboard.write()
but only one character/key at a time and if you want to use other than US keyboard layout, you may have to alter some key mappings.
AFAIK, to use it, youāll still have to build locally.
As I have not used vanilla Arduino HIDs but Teensy, Iām not sure what the Arduino has to offer, but Iām missing Teensyās multi HID support (Mouse + Keyboard + Serial), absolute mouse (like digitizer tablets) and to Keyboard.write()/.print()
whole strings (while this last one would be easy to add yourself, by using the already available functions).
"I've mainly been playing with HID Mouse on the Core and this works quite nicely. "
what library or code you used to play with mouse ?
any example please
Itās not a library but a branch of the core-firmware
So you have to fork/clone this branch, write your own application.cpp, build that firmware and upload it to the Core.
@satishgn has done a great job putting this together and he might have some idea if/when this feature might make it into compile-server2 for WebIDE use.
Hate to resurrect an old thread but @ScruffR would you mind sharing your application.cpp/.h that you have been using to test this feature? I know how to pull down the HID branch but Iām not quite sure how to use it
@harrisonhjones, sure thing.
Iāve only been testing the keyboard feature very briefly. I mainly focused on the mouse capabilities, so I only have a ācloud mouseā application.cpp
.
But once you figured out how this one works the keyboard thingy will be a piece of cake
You can download my application.cpp
from my Dropbox
Iāve also written a C# program to control this ācloud mouseā from my tablet - the cloud lags a bit, but itās fun
Edit: One thing I forgot to mention. In main.h
you need to alter this
//#define SPARK_USB_SERIAL
#define SPARK_USB_MOUSE
//#define SPARK_USB_KEYBOARD
Since we are at reviving things ;-):
Iād still like to see the Core to be able to act as a composite device (Mouse AND Keyboard AND Serial (AND MassStorageDevice if possible) AND ā¦) - at the moment itās only exclusive OR.
Also an āAbsolute Mouseā (like digitizer tablet) would be useful.
Maybe others could aswell vote for this enhancement there
and/or
If we could get even rudimentary massstoragedevice to work I would be so happy. We could configure the damn wifi settings using it! Think of how easy it would be to setup the device! No more serial terminals!!!
Iām new to Particle but have been involved in programming with Ardunio and Teensy. Re absolute Mouse.MoveTo(), Teensy has implemented this āout of the boxā meaning, if you are using a Teensy, then you have this feature, no includes or libraries to pull in.
Ardunio on the other hand, does NOT have absolute mouse move (it has relative mouse move) and they are not sure how to implement it IF they were going to add it. I get the feeling from reading their replies that they donāt have much interest in adding this feature.
The point of all of this is: Mouse.MoveTo() CAN be implemented (by that I mean it is possible, not impossible) because the Teensy folks have done it. Again, I am new around here and donāt know the major players/developers or how new things get done, but if Particle were to implement it as a new feature, you folks would be ahead of the Ardunio camp in that respect.
BTW the BIGGEST (by far) feature Particle has over BOTH Ardunio and Teensy is your remote flashing capability. This community (Ardunio, Teensy) primarily thinks in terms of using their boards for home projects, local projects. They donāt have a mind set about deploying code āinto the fieldā and then having to support it with updates. For those who are building projects to sell and need an easy way to update their code after deployment, Particle is THE solution.