-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shoji Imamura
committed
May 14, 2018
1 parent
7b6fcf5
commit a9fa882
Showing
11 changed files
with
1,131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.