If I wanted a keylogger, there are many already available, and they’re almost perfect, but I want them to be self powered without having to be connected to a computer.
This is for creative writing.
I am the creator of ilys.com and am looking into hardware now.
Currently Particles don’t support USB Host mode without additional hardware, but it has been discussed and should be possible (some time).
But I’ve (re)written a (base)library for PS/2 devices like keyboards (quite a few USB keyboards still feature this legacy protocol).
Pass through PS/2 -> Photon -> Serial/USB HID keyboard/WiFi can be done with this too.
To store your data to a file, you could use an SD card for which there is a library already too.
The upload to your computer can be done via USB Serial, or by just taking the SD card, or also via WiFi (which is the main domain of Particle Photon - 2G/3G would be Electron)
The last point is a bit nebulous, what kind of interference do you expect or want to prevent? How techy will your average user be?
If you only store one file on your SD card there wouldn’t be anything else to see than it
The options above are just a subset of what’s possible
The user experience I am wanting is as simple as possible, meaning on the file side of things, they see nothing but their output file so they can’t possibly mess anything up that the system might depend on.
Being able to use any standard usb keyboard is a essential to this, though a ps2 might be okay for a prototype.
Can you please tell me what I would need to build a prototype for this idea, including a ps2 port and sd card slot?
I have never created hardware before and am at the very start of my learning curve.
Depending if you need keyboard pass-through or not, you might also like to look at this thread. Photon - USB Host Mode
If you don’t this might solve the USB side of things.
I think that USB keyboard passthough is not important because I imagine a different use case for this. This device is to be self-contained and used on the go…
From what I understand, to create this, I need something like this to test the PS/2 side, even though it looks like it s a USB port:
Would I need to have an SD card, if there is some writable space on the board?
In other words, can the board be programmed to allow a file to be written to it, through some filesystem, and when the board is plugged into a computer, only show that datafile, and none of the system files?
I imagine this scenario:
The user takes the device, plugs it into the USB port of their computer, and they see a drive, as if a USB memory stick, and on that memory stick is a text file with the things they have written in writing mode… And writing mode is:
Having the device not connected to the computer, just by itself. Plug a USB or PS/2 keyboard into it and power it up. Now we only have the device and the keyboard and nothing else. The user types. As they type, the system keeps appending to the text file. If for whatever reason the file isn’t there to append it, it creates a new file and then continues to append to it.
I appreciate your help with this and your patience with me as I try to begin to understand this world… It’s new to me
The Photon only has a 2KB emulated EEPROM flash area for application use, which could be used.
For a selfcontained device I'd guess this is a bit small.
And currently there is no USB HID mass storage profile implemented on the Particle devices, so even with an SD card, you'd need a program to pull the data off the device, if you don't want to pull the SD card out of the device.
Plans are to implement more USB HID profiles, but with no ETA what so ever.
BTW: Would your device not need any kind of display to reflect what the user was typing?
If so, there are several LCDs featuring on-board SD card slots too.
I think for the first version(s) the LCD wouldn’t be needed, but eventually I’d build up to that, though intend to keep it simple, simple, simple… Can you please point me at the LCD’s with SD cards your’re referring to?