UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

Electromagnet Class

Module: electromagnet
  • ID: electromagnet
  • Name: Electromagnet
  • Category: electric
  • Manufacturer: seeed
  • Connection: gpio

The Electromagnet can hold up to 1 kg (approximately 2.2 lbs)
electromagnet.jpg

Item Index

Methods

Methods

Electromagnet

(
  • pin
)
Number

Electromagnet constructor

Parameters:

  • pin Number

    Digital pin to use

Returns:

Number:

on

()

Turns the magnet on

off

()

Turns the magnet off