Check it out at http://henrythach.github.io/morse-code.
First you will need to calibrate the speed of your dits (•) by pressing the spacebar 10 times. Each time you press the spacebar will calculate the running mean average of how long you hold down the spacebar. After that's finished, you can start experimenting with writing Morse code.
The simplest one is: • • •, — — —, • • •