Light activated switch to turn on and off a magnet

Hi,

I'm trying to create a light activated switch to turn on and off a magnet for my project in my design projects in Physics. I have no experience in code or arduino what so ever. It would be awesome if you guys could help me write the code.

Thanks,
Hammad Iqbal
Summit High School

Post a link to the datasheet for your light activated switch.

What voltage and current is required by your electromagnet?

Have you studied the example programs that come with the Arduino IDE.

...R