wizzomafizzo / tapto

Launch games using physical objects
GNU General Public License v3.0
64 stars 9 forks source link

Support for generic Arduino devices #1

Open wizzomafizzo opened 5 months ago

wizzomafizzo commented 5 months ago

I'm proposing to add an alternative connection for TapTo which simply reads text from the specified serial device and looks for certain events to register as card scans. This would allow support for all existing MiSTerRFID devices and any other type of module that's hooked up to an Arduino (or whatever).

I'm thinking like:

From there, just run through the whole process as normal. I'm imagining it as a replacement for the processCard func maybe?

wizzomafizzo commented 5 months ago

@symm do you think that sounds ok? i wasn't sure if the format of the scan string should be different or more complex. also have to keep in mind it can be a pain building complex data formats on an arduino

wizzomafizzo commented 5 months ago

Is it easy for an Arduino to read over serial as well? Never tried. But if it is, could be a good time to look at adding support for activity LED control and reporting back the read status to the reader.

symm commented 5 months ago

scan:<UID>,<NDEF>

Sounds good to me, definitely keeps it simple. I like the backwards compatibility for config as well 👍

kaicherry commented 3 months ago

I've been watching this, have done some MiSTer work (Pixelcade) and am a fan of go...as well as uControllers, specifically pi picos and esp32s. While I don't know if an "Arduino proper" would be suited, pi pico and esp32 are well suited for this. If there is "genuine interest" here, I may be able to help as I was "musing" doing this/something like with pi picos.

I'd be a proponent of an implementation that is "read only" from a given serial port...regardless of how the string was generated, as a "ton" of 'plug and play' NFC readers simply spit out a string over a serial port; many as HID Keyboards (data entry aspect).

This of course would mean anything that sends a string could serve the purpose, which you guys might not want...

wizzomafizzo commented 2 months ago

I've been watching this, have done some MiSTer work (Pixelcade) and am a fan of go...as well as uControllers, specifically pi picos and esp32s. While I don't know if an "Arduino proper" would be suited, pi pico and esp32 are well suited for this. If there is "genuine interest" here, I may be able to help as I was "musing" doing this/something like with pi picos.

I'd be a proponent of an implementation that is "read only" from a given serial port...regardless of how the string was generated, as a "ton" of 'plug and play' NFC readers simply spit out a string over a serial port; many as HID Keyboards (data entry aspect).

This of course would mean anything that sends a string could serve the purpose, which you guys might not want...

Sorry!! I just saw this. Yes absolutely I would be interested in help and advice on this. It's not something I'm especially familiar with myself.

I have to ask though, why read only? I was hoping to have an implementation that could adjust settings back on the reader as well. For example, to set status LEDs. But if there could be issues with this I'm all ears

kaicherry commented 1 month ago

"Read Only" on your end. hat was confusing, wasn't it :)

"Basically" just an implementation where we set the serial port the "scanner data" is to come from, with some sort of flag/property/setter to indicate that this is a "raw serial" that doesn't need to have the NFC "verified"...it's just looking for valid control strings (tapTo) on that serial port.

So this is what I meant by you maybe not wanting to implement this, as while it would open it up to 'all kinds of NFC readers and all you have to worry about is the strings it sends'..it would also mean the same functionality could be achieved without NFC at all...which would not be bad (think Talk2Text, etc) just "out of scope/not the experience intended". So it is "double-edged" if you will.