I need to write a program that utilizes the following parts: -arduino (of course) -magnet switch (mechanical, thin metal disk) -relay -48vdc motor -48vdc power supply (I will have a separate 5v power supply for the arduino) -mechanical power switch -magnet
The purpose of this program is this: when the motor is running, it's spinning a magnet which is attached to the shaft of the motor that goes by a magnet switch every rotation. Once 10 rotations are completed, I want the relay to power off the motor. Then I flip the power switch and the process starts all over again (this step I suppose doesn't even need to be programmed, the program should stop after 10 rotations). Rotations would be recognized using the on/off cycle of the magnet switch as the magnet on the motor shaft passes the magnet switch. This should be really simple to write except that I'm not an arduino/C# programmer. Thanks in advance for any assistance!