In this blog post, we will explore the ways of interfacing a temperature sensor using both mraa and upm.
The Grove temperature sensor that we are going to use is a class of transducer know as the thermistor. It is called so because it's resistance (the 'istor') part is controlled by the thermal energy ('therm' part) applied on the sensor. We are going to use the Grove temperature sensor.
We have already learned from the previous blog post that with ADC, we can measure the change in the resistance of a device connected to the analog input of Edison/Galileo.
ADC is a peripheral that lets you input an analog signal and outputs the digital representation of the input analog signal. The world in which we live in is surrounded by the analog signals. The temperature, sound that hear, the light that we see are all analog signals. If you want to interact or measure these signal in a digital system like Galileo/Edison, you’ll have to use ADC a.k.a Analog to Digital Converter.
In this blog post, we are going to look into the ways of mraa functions used for controlling the PWM module available on the Galileo/Edison. In this tutorial, we will using PWM to control the intensity with which the LED glows, connected to port D5. The LED starts of with lowest intensity and then gradually increase the intensity until it reaches the maximum intensity and then decreases the intensity gradually until the LED is at the lowest intensity and the cycle continues.
In this post, we will be looking at using mraa library on C for interfacing with a button. For this example, the button will be used to turn on and off an LED connected to the Edison/Galileo. This example is going to be very similar to the previous one. The only difference being that the state of the LED is controlled by a button instead of the program running on Edison/Galileo itself.
As soon as I saw these modules, the first question that came to my mind was how they hold up against Intel's Edison. Since both of these modules are advertised as IoT modules with lot of features packed into a single tiny module the comparison was obvious.