Sort:  

Of course, it´s a little bit the same code as on arduino. You just have to connect the bluetooth module to the UART pins into the Raspberry Pi board.