diff --git a/README.md b/README.md index c785c93..4388c7c 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ _Move Hub is central controller block of [LEGO® Boost Robotics Set](https://www In fact, Move Hub is just Bluetooth hardware, all manipulations are done with commands passed through Bluetooth Low Energy (BLE) wireless protocol. One of ways to issue these commands is to write Python program using this library. -Best way to start is to look into [`demo.py`](demo.py) file, and run it (assuming you have installed library). +Best way to start is to look into [`demo.py`](examples/demo.py) file, and run it (assuming you have installed library). -If you have Vernie assembled, you might run scripts from [`vernie`](vernie/) directory. +If you have Vernie assembled, you might run scripts from [`vernie`](examples/vernie/) directory. Demonstrational video: diff --git a/examples/__init__.py b/examples/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/demo.py b/examples/demo.py similarity index 100% rename from demo.py rename to examples/demo.py diff --git a/vernie/__init__.py b/examples/vernie/__init__.py similarity index 100% rename from vernie/__init__.py rename to examples/vernie/__init__.py diff --git a/vernie/android_remote.py b/examples/vernie/android_remote.py similarity index 98% rename from vernie/android_remote.py rename to examples/vernie/android_remote.py index a3d4198..9eafda1 100644 --- a/vernie/android_remote.py +++ b/examples/vernie/android_remote.py @@ -9,8 +9,8 @@ import logging import socket import time +from examples.vernie import Vernie from pylgbst.peripherals import ColorDistanceSensor -from vernie import Vernie host = '' port = 8999 diff --git a/vernie/go_towards_light.py b/examples/vernie/go_towards_light.py similarity index 97% rename from vernie/go_towards_light.py rename to examples/vernie/go_towards_light.py index 8b9ffec..f422237 100644 --- a/vernie/go_towards_light.py +++ b/examples/vernie/go_towards_light.py @@ -1,4 +1,4 @@ -from vernie import * +from examples.vernie import * logging.basicConfig(level=logging.INFO) diff --git a/vernie/playmat_path.py b/examples/vernie/playmat_path.py similarity index 93% rename from vernie/playmat_path.py rename to examples/vernie/playmat_path.py index bd3fa5a..0e2ba1f 100644 --- a/vernie/playmat_path.py +++ b/examples/vernie/playmat_path.py @@ -1,4 +1,4 @@ -from vernie import * +from examples.vernie import * robot = Vernie() diff --git a/vernie/read_typed_commands.py b/examples/vernie/read_typed_commands.py similarity index 88% rename from vernie/read_typed_commands.py rename to examples/vernie/read_typed_commands.py index 234bfef..99e0912 100644 --- a/vernie/read_typed_commands.py +++ b/examples/vernie/read_typed_commands.py @@ -1,6 +1,7 @@ -from vernie import * import six +from examples.vernie import * + robot = Vernie() robot.say('type commands') diff --git a/vernie/run_away_game.py b/examples/vernie/run_away_game.py similarity index 96% rename from vernie/run_away_game.py rename to examples/vernie/run_away_game.py index 1bd78ee..1ebe98f 100644 --- a/vernie/run_away_game.py +++ b/examples/vernie/run_away_game.py @@ -1,4 +1,4 @@ -from vernie import * +from examples.vernie import * robot = Vernie() running = True diff --git a/vernie/run_commands_file.py b/examples/vernie/run_commands_file.py similarity index 89% rename from vernie/run_commands_file.py rename to examples/vernie/run_commands_file.py index 2e3d0f6..bb66459 100644 --- a/vernie/run_commands_file.py +++ b/examples/vernie/run_commands_file.py @@ -1,4 +1,4 @@ -from vernie import * +from examples.vernie import * robot = Vernie() diff --git a/vernie/vernie.commands b/examples/vernie/vernie.commands similarity index 100% rename from vernie/vernie.commands rename to examples/vernie/vernie.commands