Grove - Electromagnet Release date: 9/20/2015 Version: 1.0 Wiki: http://www.seeedstudio.com/wiki/Grove_-_Electromagnet Bazaar: http://www.seeedstudio.com/depot/Grove-Electromagnet-p-1820.
Document Revision History Revision Date Author Description 1.0 Sep 21, 2015 Victor.
Contents Document Revision History ···································································································2 1. Introduction ···················································································································2 2. Features··························································································································3 3.
Disclaimer For physical injuries and possessions loss caused by those reasons which are not related to product quality, such as operating without following manual guide, natural disasters or force majeure, we take no responsibility for that. Under the supervision of Seeed Technology Inc., this manual has been compiled and published which covered the latest product description and specification. The content of this manual is subject to change without notice.
1. Introduction An electromagnet is a type of magnet in which the magnetic field is produced by electric current. An electric current flowing in a wire creates a magnetic field around the wire, due to Ampere's law (see drawing below). To concentrate the magnetic field, in an electromagnet the wire is wound into a coil with many turns of wire lying side by side. The magnetic field of all the turns of wire passes through the center of the coil, creating a strong magnetic field there.
2.
3.
4. Usage 4.1 With Arduino /* Turns on an Electromagnet on for one second, then off for one second, repeatedly. This example code is in the public domain. */ int Electromagnet = 0; int LED = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output.
digitalWrite(Electromagnet, HIGH); // turn the Electromagnet on (HIGH is the voltage level) digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(Electromagnet, LOW);// turn the Electromagnet off by making the voltage LOW 4.2 digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second With Raspberry Pi 1. You should have got a raspberry pi and a grovepi or grovepi+. 2.
grovepi.digitalWrite(electromagnet,0) print "off" time.sleep(2) except KeyboardInterrupt: grovepi.digitalWrite(electromagnet,0) break except IOError: print "Error"} 5. Run the demo. sudo python grove_electromagnet.
5. Resource File:Grove Electromagnet v1.0 SCH PCB.