Skip to content

Commit

Permalink
Add starter zip folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikUmble committed Nov 17, 2024
1 parent d51d348 commit c165a54
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Workflow Using OpenMV

Here is how you can program your Arduino. You will need a file called `main.py` that contains your MicroPython code - you can create other files
and import them as usual, but `main.py` is the one that will be run on the Arduino. We'll explain a bit more about :ref:`MicroPython` below. For getting started quickly, we recommend downloading this installation check
:download:`main.py </../../tests/installation_check/main.py>` to verify that everything is working correctly so far. Alternatively, copy the following into a file called `main.py`:
:download:`main.py </../../tests/installation_check/nanonav_starter.zip>` to verify that everything is working correctly so far. Alternatively, copy the following into a file called `main.py`:

.. raw:: html

Expand Down
28 changes: 14 additions & 14 deletions tests/installation_check/main.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
from nanonav import BLE, NanoBot
import time

### test Bluetooth ###

# Create a Bluetooth object
ble = BLE(name="NanoNav")

ble.send(43)
response = ble.read()
# wait until something changes, indicating a response
while response == 43:
response = ble.read()
time.sleep(0.5)

print("Received: ", response)

### test motors and encoders ###

# Create a NanoBot object
Expand All @@ -41,6 +27,20 @@
# Stop
robot.stop()

### test Bluetooth ###

# Create a Bluetooth object
ble = BLE(name="NanoNav")

ble.send(43)
response = ble.read()
# wait until something changes, indicating a response
while response == 43:
response = ble.read()
time.sleep(0.5)

print("Received: ", response)

### test ir sensors ###
while True:
print(f'left: {robot.ir_left()} right: {robot.ir_right()}')
Expand Down
Binary file added tests/installation_check/nanonav_starter.zip
Binary file not shown.

0 comments on commit c165a54

Please sign in to comment.