A Sun sensor is a device that can detect the direction to the sun and are commonly used in spacecraft as part of the attitude determination system. The attitude of a spacecraft is the orientation in space with respect to an initial reference system. This thesis describe the development and implementation of a two-axis sun sensor for the CubeSTAR Nano Satellite. The design is based on four photodiodes placed in each quadrant of a cross. Depending on how the cross is shading the photodiodes the sensor finds a three dimensional vector pointing in the direction of the sun. A realisation of the sensor measuring 10x10$x1.9 mm have been made. The cross is made in a 3D-printer with ABS plastic and should be considered as a prototype. A full angular characterisation have been performed and it has been shown that the sensor has an accuracy better than +- 5 degrees. The sun sensor have been implemented onto the side panels of CubeSTAR and the connections between the backplane and the panels have been tested and verified.