Skip to content

Commit

Permalink
Cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
undera committed Dec 28, 2017
1 parent b0bdbeb commit e215828
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ Best way to start is to look into [`demo.py`](examples/demo.py) file, and run it

If you have Vernie assembled, you might run scripts from [`vernie`](examples/vernie/) directory.

Demonstrational video:
Demonstrational videos:

[![Demonstrational video](http://img.youtube.com/vi/oqsmgZlVE8I/0.jpg)](http://www.youtube.com/watch?v=oqsmgZlVE8I)
[![Demonstrational video](http://img.youtube.com/vi/ZbKmqVBBMhM/0.jpg)](https://youtu.be/ZbKmqVBBMhM)


## Features
Expand Down
2 changes: 1 addition & 1 deletion examples/plotter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _reset_caret(self):
self._hub.color_distance_sensor.unsubscribe(self._on_distance)

if self._marker_color == COLOR_CYAN:
self.move(- 0.1, 0)
self.move(-0.1, 0)
else:
self.move(-1.0, 0)

Expand Down
20 changes: 10 additions & 10 deletions examples/plotter/try.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import traceback

from examples.plotter import Plotter
from examples.plotter.lego import lego
from pylgbst import EncodedMotor, PORT_AB, PORT_C, PORT_A, PORT_B, MoveHub
from pylgbst.comms import DebugServerConnection, BLEConnection
from tests import HubMock
Expand Down Expand Up @@ -56,17 +57,18 @@ def circles():


def square_spiral():
rounds = 7
step = plotter.base_speed / rounds / 3.0
rounds = 5
step = plotter.base_speed / rounds / 5.0
for r in range(1, rounds):
plotter.line(step * r * 4, 0)
plotter.line(0, step * (r * 4 + 1))
plotter.line(-step * (r * 4 + 2), 0)
plotter.line(0, -step * (r * 4 + 3))
plotter.line(step * 2.0, step * 2.0) # cut


def christmas_tree():
t = FIELD_WIDTH / 5
t = FIELD_WIDTH / 3
plotter.line(t, t)
plotter.line(-t * 0.5, 0)
plotter.line(t, t)
Expand Down Expand Up @@ -208,12 +210,14 @@ def get_hub_mock():
try:
plotter.initialize()

# plotter._tool_down()
snowflake(0.75)
# christmas_tree()
# square_spiral()
# lego(plotter, FIELD_WIDTH / 7.0)

# plotter._tool_down()
# angles_experiment()

# try_speeds()

# moves()
# triangle()
# square()
Expand All @@ -223,10 +227,6 @@ def get_hub_mock():
# plotter.spiral(4, 0.02)
# plotter.rectangle(FIELD_WIDTH / 5.0, FIELD_WIDTH / 5.0, solid=True)

# square_spiral()
snowflake(0.75)
# christmas_tree()
# lego(plotter, FIELD_WIDTH / 5.0)
pass
finally:
plotter.finalize()

0 comments on commit e215828

Please sign in to comment.