File: sample.py

package info (click to toggle)
comedilib 0.7.18-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,776 kB
  • ctags: 883
  • sloc: ansic: 6,754; perl: 702; makefile: 249; sh: 61; python: 9
file content (23 lines) | stat: -rwxr-xr-x 464 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /usr/bin/env python

# Sample.py sample code to use python with comedi via the compy interface.
# Compy: COMedi PYthon interface
#
# Blaine Lee Copyright 11/2000 Licence GPL 2.0
#
# V0 hacked out of working code for others to look at.

############# imports
import os
import stat
import time
import comedi			# important if you want to use compy
from string import *

comedi.open(0,"/dev/comedi0",1)

val = comedi.data_read((0,0,0));
print val

comedi.close(0)