Step 7Do Something Cool!
The first thing I did with this was make a simple 3D Tic Tac Toe Interface. If you want to start with a working demo, the code is available here, just drop the folder "TicTacToe3D" in your Processing sketches folder.
Three helpful things that the Tic Tac Toe code demonstrates:
- Linearizes the raw data. The charge time actually follows a power law relative to distance, so you have to take the square root of one over the time (i.e., distance ~= sqrt(1/time))
- Normalizes the data. When you start up the sketch, hold the left mouse button down while moving your hand around to define the boundaries of the space you want to work with.
- Adding "momentum" to the data to smooth out any jitters.
| « Previous Step | Download PDFView All Steps | Next Step » |









































I have built the board and everything but my problem is with the code. Where exactly is the code for the arduino ?? Or is the program " Processing" code suppose to upload the code into the arduino ?? Sorry if this question seems noob but im really new at this =(
Thank you soo much for any help !!
But shouldnt there be a camera in the code somewhere so i can interact with the TicTacToe game in 3d ??? Where would that code be ??
Sorry once again if my questions seems completely retarded , im really new at all this unfortunately =
there is no camera involved here -- you just need to look at your hand :)
if you want to get a camera involved, you'll have to hack the processing sketch.
for the video i posted, i recorded the camera separately and composited them afterwards, just for demoing how things worked.
It seem that there were two files " Interface" and "Tic Tac Toe " in the download section .
So the interface code goes into the Arduino board and the TicTacToe code goes into Processing ??
Sorry but could you clarify that a little bit ??? Many many thanks for your help !!
Cheers
Pierce
serial = new Serial(this, Serial.list()[serialPort], 115200);
Has anyone solved this yet?
If you were getting that error from the serial line, you have to make sure that the serial variable at the top is the correct serial port. If you look above the error, it should show the serial port that you are using. Mine was com4 so it showed:
[0] "COM4"
Therefore in my situation I had to change the serial variable to 0.
I also got that error randomly sometimes when I would run the program. I think that came from the board sending data before the program starts receiving it and then the program starting halfway through a line. To fix this I just made sure to hit the reset button at the same time I hit run on the processing code and it solved my problem.
Hope that helped :)