Before anyone rush off to implement the above reference, you may want to note that this will put in excess of 300V across the current limiting resistor and this is typically outside specifications for most common resistors.
Good point...most chip resistors are rated for 200V. Putting two resistors in series is a simple enough method to address this. I'll make a note of that.
Also you need to verify that your mains supply is of the star shaped type (has a hot and neutral wire). Many AC generators will not and some countries (I know of Albania and Norway) use a delta shaped mains net.
That's interesting...I did not know that. How does that affect the functionality of the circuit?
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons