pyupm_a110x module

class pyupm_a110x.A110X(pin)[source]

Bases: object

API for the A110X Hall Effect sensors.

ID: a110x

Name: Hall Effect Sensor

Other Names: Grove Hall Sensor

Other Chips: A1101, A1102, A1103, A1004, A1106

Category: electric

Manufacturer: seeed

Link:http://www.allegromicro.com/en/Products/Magnetic-Digital- Position- Sensor-ICs/Hall-Effect-Unipolar-Switches/A1101-2-3-4-6.aspx

Connection: gpio

Kit: robok UPM module for the A110X (A1101, A1102, A1103, A1104, and A1106) Hall Effect sensors. It outputs a digital signal indicating whether it is detecting a magnetic field with south polarity perpendicular to the sensor element.

An example showing a simple test for the presence of a fieldAn example demonstrating the use of an interrupt handler to count pulses

C++ includes: a110x.hpp

installISR(isr, arg)[source]

void installISR(void(*isr)(void *), void *arg)

Installs an interrupt service routine (ISR) to be called when the appropriate magnetic field is detected

isr: Pointer to a function to be called on interrupt

arg: Pointer to an object to be supplied as an argument to the ISR.

magnetDetected()[source]

bool magnetDetected()

Determines whether a magnetic field of south polarity has been detected

True if magnetic field detected

uninstallISR()[source]

void uninstallISR()

Uninstalls the previously installed ISR