This article is about designing a robot that is able to interact and play with the alphabet blocks as well as a visual recognition technique for the robots to be able to recognize the blocks and the letters on the blocks. The background color of the blocks is white, and the letters on the blocks are in black, which creates a characteristic of isolating each target from the group. By using the quadrangle detection method mentioned in the article to obtain the position of each quadrangle face of each letter cube, and after filtering the shapes and other characteristics in order to obtain the possible area, the letter cube is able to be positioned and recognized from the background after implement template matching and sifting out the ratio scale of the color area. As for the interaction with the robot, the article has also presented the complete operation procedure from the recognition of the letter blocks' position, grabbing the blocks, locating the stocking platform, the correction of the position of the blocks, and piling the blocks. This allows the robot to have the interactive ability to search, grab, rotate, and pile the letter blocks based on the order of the inputted word.