Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement serial protocol for touchscreen #2

Closed
Austinpayne opened this issue Oct 19, 2017 · 1 comment
Closed

implement serial protocol for touchscreen #2

Austinpayne opened this issue Oct 19, 2017 · 1 comment

Comments

@Austinpayne
Copy link
Owner

Austinpayne commented Oct 19, 2017

Protocol

CMD [PARAMS]\n

  • CMD is cmd number (in hex)
  • PARAMS depend on the command and are comma separated, i.e p1,p2,p3,...,pN

Need

  • 0x0 status (params: 0=ok)
  • 0x1 start new game (params: player_type=<human|ai>)
  • 0x2 end turn
  • 0x3 move piece (params: move (in LAN format, ex. e2e4))
  • 0x4 promote pawn (need to figure out how chess-js handles this server side)
  • 0x5 calibrate (photon initiated on new game, probably don't need to have user access)
  • 0x6 end game (photon --> touchscreen, could also be touchscreen --> photon to indicate player wants to leave game)

Wow-factor

Nice-to-have

  • 0x9 get best move
  • 0xA query existing games
  • 0xB join existing game
@Austinpayne
Copy link
Owner Author

Seeing as this is shared by both photon and stm32 (no need to duplicate protocol parsing), this has been implemented here https://github.com/Austinpayne/chess-serial-protocol and is linked to stm32 as a submodule (see https://github.com/Austinpayne/steppers/tree/improve-uart-driver/Src) and implemented as a photon library for the photon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant