Arachnid / boneio

A Python library for hardware IO support on the TI Beaglebone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

************************************************************************
boneio - v0.3.1
Created: 12/2011
Authors: Alexander Hiam - ahiam@marlboro.edu - www.alexanderhiam.com
         Nicholas Johnson - arachnid@notdot.net - www.notdot.net
Website: https://github.com/arachnid/boneio

A Python library for hardware IO support on the TI Beaglebone.

This is a fork of PyBBIO (https://github.com/alexanderhiam/PyBBIO), modified
to act as a standard Python library instead of an arduino-like environment.

Copyright 2012 Alexander Hiam, Nicholas Johnson

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
************************************************************************

The goal of this library is to create a simple programming environment 
similar to the Arduino. At the moment it supports basic digital IO
through digitalRead() and digitalWrite() functions, as well as ADC
support through analogRead(). PWM and UART are on the way, so keep 
checking the Github page for updates.  

I am using the same pin names as are assigned to the BeagleBone's two
female expansion headers in the schematic, which can be found here:
  http://beagleboard.org/hardware/design/

The libraries directory is a place to put PyBBIO specific libraries. 
When PyBBIO is installed, the path to the libraries directory is added
to the installed configuration file. This way these libraries are stored
where they can be easily accessed and added to. The libraries in the 
directory can be imported using standard Python syntax after bbio is 
imported. This is demonstrated in tests/library_test.py using the example
library at libraries/example.py.

The python-mmap module is required and was not installed on my BeagleBone,
despite it usually being part of the standard Python modules. 
It can easily be installed by running at the BeagleBone shell:
  # opkg update; opkg install python-mmap

Python setuptools support is a work in progress.

Hardware access is acheived using a memory map of the special file /dev/mem, 
which is a map of the entire physical memory of the AM3358 ARM processor. 
The addresses of all the processor's memory registers, as well as details
on how to properly use them, can be found in the AM335x Technical Reference 
Manual (TI document spruh73c.pdf) which can be found here:
  http://www.ti.com/dsp/docs/dspsupporttechdocs.tsp?sectionId=3&tabId=409&docCategoryId=6&viewType=mostuseful&rootFamilyId=44&familyId=2920
Direct link:
 http://www.ti.com/litv/pdf/spruh73d

About

A Python library for hardware IO support on the TI Beaglebone

License:Apache License 2.0


Languages

Language:Python 93.3%Language:Shell 6.7%