Loading...
  Show Posts
Pages: [1] 2
1  Community / Exhibition / Gallery / Re: ZORK for the Arduino on: July 14, 2012, 06:01:08 am
After endless attempts I gave up on the TVout and revert back to the GLCD.
So here is a version with paging (up to 6 at the moment).
It will only work on Mega 2560 (memory).
I'm going to work on a better "scrolling" interface, to make it smoother and not "page" blocked.
Code attached.
Would love to hear some feedback
2  Community / Exhibition / Gallery / Re: Fast 130ms Ping Pong Robot on YouTube on: July 12, 2012, 11:07:25 pm
Great job ! smiley
3  Community / Exhibition / Gallery / Re: Yaw Control Of Race Car on: July 07, 2012, 10:52:08 pm
Very nice ! smiley
4  Community / Exhibition / Gallery / Home brewed Arduino Duemilanove on: July 05, 2012, 02:57:31 am
After doing some projects on several arduino boards, I felt ready to try and use only the AT328P chip.
I found this great post:
http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard
And this led to some ebay ordering and that’s the first step:



Then I thought to my self, hey it will be cool to have a proper board to place the chip into. So started to plan one, and here is the process and the end result.






First test of "Blink"



Testing the D 2 --> 13 by making a "running light".
I also tested the A0 5 by placing a potentiometer and setting the speed of the
running light by reading the interval from the analog pin






The Aref pin is wired next to the 5V pin, and "short" by a jumper.

I added a ON/Off Switch.
Both of the build in LEDs: Power and Pin13, has a jumper, so you can disconnect them.
The chip was bought with an Duemilanove bootloader
5  Community / Exhibition / Gallery / Re: Hors Piste Tokyo - LED Immersion on: July 04, 2012, 12:53:40 am
GREAT work !!
Impressive clip, just shared it …
 smiley
6  Community / Exhibition / Gallery / Re: ZORK for the Arduino on: June 22, 2012, 09:55:21 pm
That was a very interesting challenge and I'm happy to say I got a BETA version.
Mega 2560 (only!!) , SD Card reader, PS2 connector and keyboard, TV out and screen = azipM2560.
It's far from being perfect but I got it to work, I even added the logo



in the near future list is to get the page scrolling up to work which won't be that hard since I got some of the logic from the receiver version I coded. probbly by the ned ofthe weekend.
The kb is "acting" strange; I can guess it has to do with the interrupters of both the SD and KB libraries. I'm not that knowledgeable in C, but I like learning new things
Hope you like it
Code attached in rar file

H/W connecting and libraries-

** SD CARD **
CS - D53
DI - D51
CLK - D52
DO - D50

** PS2 mouse **
Data - D2
CLK - D3
You can find information here
http://www.arduino.cc/playground/Main/PS2Keyboard



** TV - OUT **
Video - D29
Sync - D11
You can download the library (fonts included) & schematics here:
http://code.google.com/p/arduino-tvout/
ONE NOTE: I had to change the "static void inline sp" to "sptvout" since is z-types has an SP void as well. You will need to apply the change to the TVout.h and TVout.cpp (drop me a line if you want the revised version I got).

Wish list for next versions:
* Pages for scroll up/down - in the near future since I got this code ready from the azip-reciver that I build before.
* Show Courser while typing.
* Show sand watch while "thinking" (reading from sd).
* Check kb presence on load (not just init)
* get the Save/Load to work?
* Start menu to allow change of font size (not sure it's doable)
* Start menu to choose game (I-II-III) - again not sure it's doable.
* check KB issues (interrupters?)


7  Community / Exhibition / Gallery / Re: grovercam.com Interactive website on: June 11, 2012, 07:45:46 am
Very cool, It immidatly got me thinking of makeinf one for our cats smiley
Great post !
8  Community / Exhibition / Gallery / Re: star wars blaster with arduino on: June 11, 2012, 01:00:33 am
Very Cool !!
Would love to see the comlete project smiley

9  Community / Exhibition / Gallery / Re: LPD8806 LED strip project on: June 06, 2012, 10:10:22 pm
Very cool !!!!! smiley

Would love to see the code when u post it, I defently know whats the next thing I'm orderign from ebay smiley-wink
Can you be kind and post a link to a simlir product that u used, like the piazo pickups and the led strip ?
Thanks for sharing smiley
10  Community / Exhibition / Gallery / Re: ZORK for the Arduino on: June 06, 2012, 12:57:19 am
code attachd ...
11  Community / Exhibition / Gallery / Re: ZORK for the Arduino on: June 06, 2012, 12:56:00 am
Thank you for your kind words Louis.
Since the text is longer then what the glcd screen can show on one page, I added pages (up to 6 – memory limitation), you can use the Page up / Down to move between them. Also if you are not on the CURRENT page and try to type (something else then pgup/pgdown) the screen will "jump" back to the current screen.
The Backspace is working as well so you can fix a typo if u made one.

Connect a ps2 keyboard to the Arduino. GLCD screen, and then connect between the arduino that has the SD card (the brain) and this one using the Tx/Rx (pin 0/1). Note when doing so TX  RX and RX  TX  so digt1 will go to digit2 on the other board and digt2 will go to digit1 on the other board.

I can not pass the code here as well (lenght limitation of the post) ... so I will post it in a new reply,
would love to hear comments/suggestions:

12  Community / Exhibition / Gallery / Re: ZORK for the Arduino on: June 04, 2012, 12:23:30 pm
It took me for ever …. But I made it.
The original plan was to use one arduino with TV-out and PS2 keyboard.
Due to lack of space and other tons of issues I ended up building a computer side, with GLCD (the TVout interrupters drove the serial communication crazy) and a PS2 keyboard using the PS2Keyboard library.
This way all I needed to do is to connect the 2 arduinos with RX/TX lines.

Some photos …






I still need to work on it a bit, to make the delete work for example…
But except that its working great.
I ordered a new MEGA2560 and I will try to put them all on the same board with the TV-out (since I can then cancel the Serial communication).

13  Community / Exhibition / Gallery / Re: ZORK for the Arduino on: May 29, 2012, 08:23:09 am
Your the best!! I missed the "line ending to Newline" ...
That is soooo cool ....
Defently will be great if it can be outputed on the TVout library ...
I will take a look and see if I can find a way to do it ....

Way to go smiley
14  Community / Exhibition / Gallery / Re: ZORK for the Arduino on: May 29, 2012, 12:48:14 am
Very nice
do u have any video of it working ?
did u try and have it all workign ONLY on the arduno ?
like for exampel connecting a TVout library to it and have a ps2 keyboard attached ?

I just gave ti a try and I can get the welcome screen to work. but nothign after that ... its juts dosn't do any thing smiley-sad
Any ideas What I might be doign wroung ?
15  Community / Exhibition / Gallery / Re: Tic Tac Toe – TV out version on: May 27, 2012, 11:59:33 pm
After sending the video to my brother he pointed out that the tic tac toe game when played by equal players will always end up in a tie.
I then remembered this scene from the "war games" movie from back in the 80's (one of the best computer movies)



So I took the challenge and here is a revised version of the "thinking" part, I would love to get comment if any one can beat the computer now.
If u want the full code just drop me a line,

Code:
void computNextMove(){
   // declare high points for tile
  int highpoints = 0;
  int highpointsRow = 4; //we use 4 as WAY bigger then the cube
  int highpointsCol = 4; //we use 4 as WAY bigger then the cube

  // lo0p over row
  for(int row = 0; row < 3; row++) {
       // loop over col
      for (int col = 0; col < 3; col++) {
       // if ZERO - free space
       if (tiles[row][col] ==0) {
           // Calc the total of the ROW
           int totalRow = tiles[row][0] +tiles[row][1] + tiles[row][2] ;
           int totalCol = tiles[0][col] +tiles[1][col] + tiles[2][col] ;
           // declare the othe player for the math
           int OtherPlayer = CurrentPlayer==0?1:0;
           int CurrentPlayerPlaceHolder=placeHolder[CurrentPlayer];
           int OtherPlayerPlaceHolder=placeHolder[OtherPlayer];
           int totalTilePoints =0;
           // make 2 for self = 1 point **  block 2 of oppisite = 3 **  make 3 (win) = 5
           // add row trotal points
           totalTilePoints = totalTilePoints + calcTotalPointsSetOfThree(totalRow);
           // add col total points
           totalTilePoints = totalTilePoints + calcTotalPointsSetOfThree(totalCol);
              // check center
          if (row ==1 && col ==1)  {
              //ADD point for crners
               totalTilePoints = totalTilePoints + 3 ;
              // on diag
             int diagTotalONE =  tiles[0][0] +tiles[1][1] + tiles[2][2];
                // add diagn poins
             totalTilePoints = totalTilePoints + calcTotalPointsSetOfThree(diagTotalONE);
               // secdiag
             int diagTotalTWO =  tiles[2][0] +tiles[1][1] + tiles[0][2];
                // add diagn poins
             totalTilePoints = totalTilePoints + calcTotalPointsSetOfThree(diagTotalTWO);
           
          } // end if (row ==1 && col ==1)
       
         
           // check diagonals
          if (row !=1 && col !=1)  {
            //ADD point for crners
           // totalTilePoints = totalTilePoints +1 ;
            // to know in wich dirctio nto go
            int rowDir =  row==0?1:-1;
            int colDir =  col==0?1:-1;
            int diagTotal =  tiles[row][col] +tiles[row+rowDir][col+colDir] + tiles[row+rowDir*2][col+colDir*2];
             // add diagn poins
             totalTilePoints = totalTilePoints + calcTotalPointsSetOfThree(diagTotal);
             // add 1 more tests :
          } // END if (row !=1 && col !=1)
         
         // any of the outer center cubes
         if ((row == 1  && col != 1) || (row != 1  && col == 1))   {
           // if u got the center, pick this one
           if(tiles[1][1] == CurrentPlayerPlaceHolder)  {
               totalTilePoints = totalTilePoints + 2 ;  }
           
         } // end if ((row == 1  && col != 1) || (row != 1  && col == 1))
     
         
           
          // check if maxed  high point
          if (highpoints<totalTilePoints)  {
               highpoints =  totalTilePoints;
               highpointsRow = row;
               highpointsCol = col;
           } // end if (highpoints<totalTilePoints)
        } // end (tiles[j][k] =!=0)
      } // end loop over col
  } // end loop over row
 
  // if found possible row
  if (highpoints >0)  { 
     playMove(highpointsRow,highpointsCol);  }
  // if not found match .. random choose one of the corners
   else {
     // first check fi (1,1) is avialble
      int fodunfreespace =  0;
       // lop over row
       for(int j = 0; j < 3; j++) {
           // loop over col
           for (int k = 0; k < 3; k++) {
           // set to zero = empty
           if(tiles[j][k] == 0 && fodunfreespace==0) {
              fodunfreespace = 1; 
              playMove(j,k);
              break;
              } // end if(tiles[j][k] == 0)
          }  // end loop over col
       } // end loop over row
       
        // if not foudn any open space ... end game
        if (fodunfreespace == 0) {
           isGameOver = 1;
           refreshDisplay = true;
          } // end if (fodunfreespace == 0)
     } // end if  (highpoints >0)
  } // end void computNextMove


Pages: [1] 2