Git Product home page Git Product logo

python-bluezero's Introduction

python-bluezero

Build Status

Code Climate

Test Coverage

Issue Count

A simple Python interface to BlueZ stack

Name and aim

The aim of this library is to provide an API to access to Bluez with zero boilerplate code.

Goal

To provide a simplified API to people that want to use Bluetooth functionality in their code. The library will use calls to the Bluez D-Bus API and use 'sensible' defaults to help with that simplification. It aims to support the ability to create interesting STEM activities without needing to explain the Bluez API or write an event loop.

In addition to the API it will contain examples of how to connect to common Bluetooth Smart (BLE) objects around them (or at least easily accessible to them). These examples will need to be written without the need to sign (or break) non-disclosure agreements.

Status

This is an early-stage experiment that we are developing in the open. This currently should only be of interest to developers looking to provide feedback and to contribute.

Examples

If you are coming here for the first time then looking at the examples is probably the place to start

Adapter

adapter_example.py

This will check that it can find the Bluetooth adapter on the computer running the code. It will print to screen various information and check it is powered before scanning for nearby devices

GATT Client (Central role)

read_sensortag_CC2650.py

This is a simple example of how to read the Ti Sensortag CC2650

microbit_button.py

This example simply reads the button values from the micro:bit and displays them on LEDs attached to the hardware

Beacon

eddystone-url-beacon.py

Simple Eddystone URL beacon. Can be read with any Physical Web application

Scanner

No example currently.

GATT Server (Peripheral role)

fatbeacon.py

Experiment with Eddystone FatBeacon. Contains service for beacon to connect to that sends html page.

lightswitch.py

A simple light switch example using an LED and a switch. Write a value to the switch characteristic to change the state of the light

blinkt_ble.py

This can be controlled from web page via web bluetooth. This example advertises the URL via Eddystone URL. Once you attached you can change the colours of the LEDs on the Pimoroni Blinkt.

cpu_temperature.py

This example transmits the temperature of the CPU over the single characteristic. If your hardware does not support the vcgencmd then change the get_cpu_temperature() function to use the randomly generated temperature. Values are only updated when notification are switched on.

python-bluezero's People

Contributors

btashton avatar cotsog avatar mdxs avatar mr499 avatar ukbaz avatar waynekeenan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.