Presentation is loading. Please wait.

Presentation is loading. Please wait.

Internet of Things with Intel Edison Led sensor lab

Similar presentations


Presentation on theme: "Internet of Things with Intel Edison Led sensor lab"— Presentation transcript:

1 Internet of Things with Intel Edison Led sensor lab
Pierre Collet Intel Software

2 Libmraa

3 Libmraa Libmraa How to install How to compile with mraa
Mraa is a library which is going to help us to communicate with the pins on the board. How to install Today we are using a package for Yocto, the linux proposed by default on Edison. ~# echo "src mraa-upm > /etc/opkg/mraa-upm.conf ~# opkg update ~# opkg install libmraa0 How to compile with mraa When you compile just link with the –lmraa flag

4 LedSensor lab with Libmraa
Hardware For this example, you need : A LED, a resistor, a sensor and four cables. Plug the LED Plug in a serial way one cable to the resistor, to the LED, to the other cable. Let’s plug the cables on the Digital pin 8 and the other on the ground (GND) Plug the sensor Plug the sensor between the analog input 0 (A0) and the 5V pin.

5 Libmraa Ledsensor with mraa

6 Libmraa Sources and Binaries
Go to the directory named : mraaLedSensor. In this directory, there is three examples of controlling the board with mraa. blinkled: It makes the the LED blink getanalog: It displays the value receive on the analog input 0 Ledsensor: It light up the LED if the value received on A0 is above a given threshold The value of the threshold and the pin number are define thank to some #define at the top of each file. You can change those numbers as you wish. In order to compile all these examples, just enter “make” when you are in the directory which contains the .c files.

7 Conclusion Low level direct access Libmraa
You can access GPIO directly from the command line. Libmraa But it’s a LOT easier to use a library like mraa. With mraa, GPIO is simple. And with mraa sample binaries, you can create scripts in various languages to access GPIO data.

8

9 License Creative Commons – By 3.0
You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work to make commercial use of the work Under the following conditions: Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). With the understanding that: Waiver — Any of the above conditions can be waived if you get permission from the copyright holder. Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights — In no way are any of the following rights affected by the license: Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; The author's moral rights; Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.


Download ppt "Internet of Things with Intel Edison Led sensor lab"

Similar presentations


Ads by Google