Learning BeagleBone Python Programming by Alexander Hiam

By Alexander Hiam

BeagleBone is a barebone machine that may be configured and customised for various purposes and is sort of part the cost of a customary desktop. This ebook will hide the fundamentals of the way BeagleBone Black's interface subsystems paintings, and will be managed utilizing well known Python libraries for BeagleBone Black. you can be brought to BeagleBone Black's GPIO, PWM, ADC, UART, SPI, I2C, and eQEP subsystems. we'll then dive deep into extra advanced integrated peripherals, demonstrating alternative ways to obtain enter from a consumer together with buttons, potentiometers, and rotary encoders with the eQEP module. we'll additionally know about interfacing with exterior units; this can be confirmed utilizing the serial modules to interface with exterior units akin to temperature sensors and accelerometers. in the direction of the tip of the ebook, we'll current a number of real-world difficulties and reveal the right way to resolve them with the abilities you've received.

Show description

Read Online or Download Learning BeagleBone Python Programming PDF

Best python books

Fundamentals of Python: From First Programs through Data Structures

In basics OF PYTHON: FROM FIRST courses via facts constructions, Washington and Lee college professor Kenneth A. Lambert offers all the vital themes in CS1 and CS2 in a single quantity. This reasonably-priced structure offers teachers with a constant method of educating introductory programming and knowledge buildings over a customary two-term direction series.

Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython

Python for info research is worried with the nuts and bolts of manipulating, processing, cleansing, and crunching information in Python. it's also a realistic, sleek advent to medical computing in Python, adapted for data-intensive functions. this can be a ebook in regards to the elements of the Python language and libraries you'll have to successfully remedy a extensive set of knowledge research difficulties.

Python and AWS

When you intend to exploit Amazon internet prone (AWS) for distant computing and garage, Python is a perfect programming language for constructing purposes and controlling your cloud-based infrastructure. This cookbook will get you all started with greater than dozen recipes for utilizing Python with AWS, in response to the author’s boto library.

Artificial Intelligence with Python

Construct real-world man made Intelligence functions with Python to intelligently have interaction with the realm round you approximately This e-book Step into the superb international of clever apps utilizing this accomplished consultant input the area of synthetic Intelligence, discover it, and create your individual functions paintings via basic but insightful examples that would get you up and working with man made Intelligence very quickly Who This e-book Is For This publication is for Python builders who are looking to construct real-world man made Intelligence functions.

Additional resources for Learning BeagleBone Python Programming

Sample text

For instance, to use the GPIO API you have to import the GPIO package: from Adafruit_BBIO import GPIO Otherwise, to use the PWM API you would import the PWM package: from Adafruit_BBIO import PWM This structure follows a more standard Python library model, and can also save some space in your program's memory because you're only importing the parts you need (the difference is pretty minimal, but it is worth thinking about). output() is setting the state. Notice that we needed to import Python's built-in time library to sleep, whereas in PyBBIO we used the built-in delay() function.

When the GPIO pin is set high, enough current flows through R2 into the base of the transistor to allow it to pass a larger current (by a current gain factor, which is a specified parameter of the specific transistor being used) from the collector (c) to the emitter (e), and therefore, through the LED1 and R1. 3 V power supply, and the 68 Ω resistor limits it to the 20 mA we need. If you put an ammeter in series with the LED and measure the current through it, you will see that it is actually a bit lower than 20 mA.

HDMI is enabled by default, and si006Ece capemgr won't allow you to load an overlay that includes pins that are already in use, this is the only version that will work without disabling HDMI, which is explained in Appendix A, The BeagleBone Black Pinout. Since capemgr won't load overlays with conflicting pins, the universal-io overlay is incompatible with PyBBIO's custom overlays. This means that PyBBIO and Adafruit_BBIO programs shouldn't be run at the same time, so if you're running multiple Python programs asynchronously, you'll want to stick to just one library.

Download PDF sample

Rated 4.06 of 5 – based on 49 votes