RB Peripherals programming using UPM
Last updated
Last updated
The UPM repository provides software drivers for a wide variety of commonly used sensors and actuators. These software drivers interact with the underlying hardware platform (or microcontroller), as well as with the attached sensors, through calls to [MRAA](https://github.com/intel-iot-devkit/mraa) APIs.
Programmers can access the interfaces for each sensor by including the sensor’s corresponding header file and instantiating the associated sensor class. In the typical use case, a constructor initializes the sensor based on parameters that identify the sensor, the I/O protocol used and the pin location of the sensor.
We endorse additions that implement the generic C and C++ interfaces provided with the libraries. Multiple sensor and actuator types have been defined, for instance:
Light controller
Light sensor
Temperature sensor
Humidity sensor
Pressure sensor
Gas sensor
Analog to digital converter
Simple diagram below depicts the use of Lib-UPM to interface various sensor modules.
The developer community is welcome to submit feedback on existing categories or suggest new ones. http://ruggedboard.wixsite.com/rugged-board/forum.
To test the Temperature and Humidity sensor on i.mx6ul-rugged board.
Sensor Tag
i.mx6ul-rugged board
USB cable
Connect the sensor tag on M1 connector of the Rugged board.
Boot the board with SD card/NAND.
Copy the below file to mnt directory of rugged board through tftp protocol.
vi aht25_sensor.py
Run the above code with below command in rugged board.