So my idea is to be able to input my move in 1 player chess mode of my chess robot via my iPad. This will be done using the Touch OSC app

I have made an app using their program. It is basically a chess board layout of buttons.

So far I have the app and a little Processing sketch. The app sends a message to the Processing sketch which will pick it apart and figure out which button was pressed. The processng sketch uses the oscP5 library and netP5 library. When the messages come through the oscEvent function is run. The button presses come through in the form of "/1/push(button#)". So the first button would come through like "/1/push1". I have the buttons arranged in ascending order from a1 being button '1', a2 is "2"... This allows my processing sketch to turn the number into a chess square position. A message is sent at the press and release of a button. The program ignores the release when it comes to figuring out which chess square is pressed. After 4 messages, the program adds an ending character ('z') to be sent to the Arduino.

Hopefully this can be integrated into MRL.

admin

13 years 3 months ago

The video was very helpful.  Just recently I did an update to the CKEditor of Drupal .. and now found that they changed the video embed code..   Just growing pains..  I'll get it fixed shortly.

But, back to your project.  MRL already has a TCP and UDP server in it.  I thought at first that the plugin for oscP5 was using a Processing message, but at this point I'm not sure Processing has a standard message.   Anyway, MRL uses a standardized message format to get from one Service to another.  This is a "good" think because it allows simplification of creating and consuming messages.  This allows you for example to create message routes graphically in addition to many other capabilities.

The TCP & UDP Service is in the RemoteAdapter.  I thought about implementation and it would be quite simple to make the RemoteAdapter service take a datagram from oscP5.  It would then turn the text sent into a message and deliver it to the ChessGame.  

At the moment I'll put the logic you have regarding parsing the text into ChessGame, but I have plans to create a Groovy service. This will be like the Arduino IDE embedded into MRL.  It will allow scripting so that users such as your self can easily create new   Services without the Eclipse IDE - but directly in MRL.  I chose Groovy, for a variety of reasons, one of the most important is that it follows Java very closely in notation.  Once users are comfortable learning Groovy they can easily move onto more complex Service creation with Eclipse and Java.

I'll keep you updated regarding progress.  Also, if you can tell me if you were notified by my comment ... as I'm continually trying to get a handle of how Drupal works :P

 

patrickmccabe

13 years 3 months ago

In reply to by admin

Glad the video helped. The Groovy service sounds really nice. It would be really useful to have scripts where you could route the output of a service into the script and then output anything you want from that into another service. The little code I wrote is pretty simple. The chess engine needs to recieve the move and, if it is legal, send it to the chess robot. This means it should not need to be looking at the serial port for  a move to come in. This I hope will turn the chess robot into just a moving machine. The only thing it will have to stay on top of is removing pieces that need to be removed and some of the castling stuff. Then when both players are basically being controlled by MRL we might be able to work on getting it on the intertubes :).

No email for your comment btw.

admin

13 years 3 months ago

I suspect you don't need it (now).  But it might be a nice thing in the future for MRL to communicate back to touchOSC - do you know if the oscP5 library can do this?  I haven't seen any good documentation regarding this library yet... Do you have links or Info?  

This would be useful for example if something (e.g. ChessBot) faulted and you could get a flashing "TILT" sign on your tablet.