background preloader

Welcome to pySerial’s documentation — pySerial v2.6 documentation

Welcome to pySerial’s documentation — pySerial v2.6 documentation

Related:  Python serial

Short introduction — pySerial v2.6 documentation Opening serial ports Open port 0 at “9600,8,N,1”, no timeout: >>> import serial>>> ser = serial.Serial(0) # open first serial port>>> print # check which port was really used>>> ser.write("hello") # write a string>>> ser.close() # close port Open named port at “19200,8,N,1”, 1s timeout: PIL The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities. Status The current free version is PIL 1.1.7.

pybluez PyBluez is an effort to create python wrappers around system Bluetooth resources to allow Python developers to easily and quickly create Bluetooth applications. PyBluez works on GNU/Linux and Windows XP (Microsoft and Widcomm Bluetooth stacks). It is freely available under the GNU General Public License. Documentation Python » Dr. Rainer Hessmer A lot has happened since my last blog. The big news is that basic balancing is working now. Let’s start with the now almost obligatory photo of the current robot state: For better weight distribution the batteries, motor controller and the Arduino Mega board have been rearranged. The gray box between the wheels underneath the robot platform houses the 3-axis accelerometer ADX330 and the dual axis gyroscope IDG300. I used the same components as in my Lego prototype (for details see Building a Self-Balancing Robot – The Prototype).

The environment dictionary A simple but integral aspect of Fabric is what is known as the “environment”: a Python dictionary subclass, which is used as a combination settings registry and shared inter-task data namespace. The environment dict is currently implemented as a global singleton, fabric.state.env, and is included in fabric.api for convenience. Keys in env are sometimes referred to as “env variables”. Sniffing RS232 traffic with python « Things and thoughts Today, I had to check that traffic between an embedded java application (in an eWON 4101) and a Coronis WavePort modem was following a given rule (less than 10 milliseconds between the bytes). I have used a great thing : the SpyCable. It allowed me to monitor either the send traffic or the received one using two serial ports.

Installing Django on an Ubuntu Linux Server Today I had the task of installing a development server running the Django Python framework for one of our web developers. I learned a few things and I figured a quick tutorial might help someone else out. None of this covers new ground, but perhaps another telling of the story will help someone out there. I started from scratch, with a basic install of Ubuntu 7.04 Server Edition. I did not choose any extra packages, such as the LAMP option or DNS server.

OEM USB Drivers If you are developing on Windows and would like to connect an Android-powered device to test your applications, then you need to install the appropriate USB driver. This document provides links to the web sites for several original equipment manufacturers (OEMs), where you can download the appropriate USB driver for your device. However, this list is not exhaustive for all available Android-powered devices. If you're developing on Mac OS X or Linux, then you probably don't need to install a USB driver. To start developing with your device, read Using Hardware Devices. Easily Download And Install Google Web Fonts In Ubuntu With TypeCatcher TypeCatcher is an application that allows to easily browse, search, download and install fonts from the Google Web Fonts collection, which includes hundreds of open source fonts. "Google Fonts makes it quick and easy for everyone to use web fonts, including professional designers and developers. We believe that everyone should be able to bring quality typography to their web pages and applications". TypeCatcher features:preview the fonts with adjustable size and text;search fonts;download and install the fonts on your computer;uninstall any fonts you've installed using TypeCatcher;for more info about a font, it can open its webpage in your default web browser.

Python and Real-time Web Introduction I had interview for the Flask book recently and some questions were related to realtime functionality - how it works, how to integrate realtime portion with conventional WSGI applications, how to structure application code and so on. We used Google Hangouts and it was supposed to record interview, but it failed. So, I decided to write elaborate blog post instead, in which I will try to cover basics, give short introduction into asynchronous programming in Python, etc. Little Bit of Theory Lets try to solve server "push" problem.

Advanced Regular Expression Tips and Techniques Regular Expressions are the Swiss Army knife for searching through information for certain patterns. They have a wide arsenal of tools, some of which often go undiscovered or underutilized. Today I will show you some advanced tips for working with regular expressions. Adding Comments Sometimes, regular expressions can become complex and unreadable.