Line 6... |
Line 6... |
6 |
import datetime |
6 |
import datetime |
7 |
import sys |
7 |
import sys |
8 |
|
8 |
|
9 |
from pymlab import config |
9 |
from pymlab import config |
10 |
|
10 |
|
- |
|
11 |
#uncomment for debbug purposes |
- |
|
12 |
import logging |
- |
|
13 |
logging.basicConfig(level=logging.DEBUG) |
- |
|
14 |
|
11 |
|
15 |
|
12 |
#### Script Arguments ############################################### |
16 |
#### Script Arguments ############################################### |
13 |
|
17 |
|
14 |
if len(sys.argv) != 2: |
18 |
if len(sys.argv) != 2: |
15 |
sys.stderr.write("Invalid number of arguments.\n") |
19 |
sys.stderr.write("Invalid number of arguments.\n") |
Line 20... |
Line 24... |
20 |
|
24 |
|
21 |
|
25 |
|
22 |
#### Sensor Configuration ########################################### |
26 |
#### Sensor Configuration ########################################### |
23 |
|
27 |
|
24 |
cfg = config.Config( |
28 |
cfg = config.Config( |
- |
|
29 |
i2c = { |
25 |
port = port, |
30 |
"port": port, |
- |
|
31 |
}, |
- |
|
32 |
|
26 |
bus = [ |
33 |
bus = [ |
27 |
{ |
34 |
{ |
28 |
"type": "i2chub", |
35 |
"type": "i2chub", |
29 |
"address": 0x72, |
36 |
"address": 0x72, |
30 |
"children": [ |
37 |
"children": [ |