Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mprentice/pyrovio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: lotu/pyrovio
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 10 commits
  • 11 files changed
  • 1 contributor

Commits on Mar 31, 2010

  1. add gitignore

    lotu committed Mar 31, 2010
    Copy the full SHA
    257fdcd View commit details
  2. Copy the full SHA
    b1e879f View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3461d33 View commit details
  4. adding init.py

    lotu committed Mar 31, 2010
    Copy the full SHA
    88767b7 View commit details
  5. Copy the full SHA
    e60c9c3 View commit details
  6. Copy the full SHA
    1fd8121 View commit details
  7. Copy the full SHA
    2a2787a View commit details
  8. Made a RovioAPI and added high level stuff

    Two classes now exist RovioAPI and Rovio
    New IR sensor info
    Turning is doing in degrees now
    Added: foward_until_wall
           patrol
           dock_and_undock
    lotu committed Mar 31, 2010
    Copy the full SHA
    b64d626 View commit details
  9. made readme

    lotu committed Mar 31, 2010
    Copy the full SHA
    166115e View commit details
  10. added set_led and made set_led retun an int

    also updated readme
    lotu committed Mar 31, 2010
    Copy the full SHA
    449379e View commit details
Showing with 1,313 additions and 1,401 deletions.
  1. +40 −0 README.txt
  2. +1 −0 src/.gitignore
  3. +0 −20 src/RovioView.py
  4. +0 −40 src/Test.py
  5. +0 −47 src/TimerTest.py
  6. +0 −44 src/Util.py
  7. +7 −0 src/init.py
  8. +0 −24 src/old_rovio.py
  9. +104 −1,225 src/rovio.py
  10. +1,160 −0 src/rovio_api.py
  11. +1 −1 src/showjpeg.py
40 changes: 40 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
To use:

import rovio
import time

r = rovio.Rovio( '192.168.0.10' ) # ip addess of rovio

# start at the rover's home
r.api.go_home()
r.forward()
r.forward_left(speed=4)
r.right()
r.backward()
r.rotate_right(speed=9,angle=90)
time.sleep(3) # let operation finish
r.turn_around(speed=2)
time.sleep(3)
r.back_right(speed=4)

#toggle the headlight
r.api.set_led(1)
r.api.set_led(0)

r.head_up()
time.sleep(2)
r.head_middle()
time.sleep(2)
r.head_down()
time.sleep(2)

# run back and forth
for x in range(4):
r.patrol(speed=5)

print r.battery()
#go back and recharge
r.api.go_home_and_dock()
# your battery only lasts a couple of minutes try:
# this may fix it.
r.dock_and_undock()
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pyc
20 changes: 0 additions & 20 deletions src/RovioView.py

This file was deleted.

40 changes: 0 additions & 40 deletions src/Test.py

This file was deleted.

47 changes: 0 additions & 47 deletions src/TimerTest.py

This file was deleted.

44 changes: 0 additions & 44 deletions src/Util.py

This file was deleted.

7 changes: 7 additions & 0 deletions src/init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/python
# Inits my rovio setup
# use $ipython -i init.py

import rovio

r = rovio.Rovio('rover')
24 changes: 0 additions & 24 deletions src/old_rovio.py

This file was deleted.

1,329 changes: 104 additions & 1,225 deletions src/rovio.py

Large diffs are not rendered by default.

1,160 changes: 1,160 additions & 0 deletions src/rovio_api.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/showjpeg.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
# set up Rovio and get jpeg
username = "mprentice"
password = "ecitnerp"
uri = "192.168.1.101"
uri = "rover"
port = 80
url_prefix = "http://" + uri + ":" + str(port) + "/"
jpeg_url = url_prefix + "Jpeg/CamImg.jpg"