Skip to content

Commit

Permalink
first files
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoji Imamura committed May 14, 2018
1 parent 7b6fcf5 commit a9fa882
Show file tree
Hide file tree
Showing 11 changed files with 1,131 additions and 0 deletions.
Empty file added README.md
Empty file.
25 changes: 25 additions & 0 deletions cat_csv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

from logging import getLogger
logger = getLogger('omron_envsensor')

import sys
from omron_envsensor import OmronEnvSensor
from omron_envsensor.sensorbeacon import csv_header

def main():
sys.stdout.write(csv_header())
sys.stdout.write("\r\n")

before_seq = None
o = OmronEnvSensor('pudge', 0)

def callback(beacon):
sys.stdout.write(beacon.csv_format())
sys.stdout.write("\r\n")

o.on_message = callback
o.init()
o.loop()

if __name__ == '__main__':
main()
11 changes: 11 additions & 0 deletions omron_envsensor/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
"""
from __future__ import absolute_import

__version__ = '0.0.0'

from logging import getLogger, NullHandler
logger = getLogger('omron_envsensor')
logger.addHandler(NullHandler())

from .omron import OmronEnvSensor
Loading

0 comments on commit a9fa882

Please sign in to comment.