Skip to content

Commit 593f75c

Browse files
authored
Merge pull request #41 from Open-STEM/v097
v0.9.7 basic changes
2 parents 0e62192 + f7a0e87 commit 593f75c

File tree

5 files changed

+13
-75
lines changed

5 files changed

+13
-75
lines changed

README.md

Lines changed: 6 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,13 @@
11
# Getting Starting with your XRP Robot
22

3-
- First steps of tutorial borrowed from [here](https://projects.raspberrypi.org/en/projects/get-started-pico-w/1)
3+
### Step 1: Plug XRP Robot Controller Board into Computer
44

5-
# Step 1: Install Micropython on your XRP Robot Controller:
5+
### Step 2: Navigate to [xrpcode.wpi.edu](https://xrpcode.wpi.edu)
66

7+
- Follow instructions there to install MicroPython and the libraries onto the board
78

8-
### Download the latest version of Raspberry Pi Pico W firmware [here](https://rpf.io/pico-w-firmware)
9+
### Step 3: Navigate to the tutorial linked there to learn how to use the bot!
910

10-
Connect the small end of your micro USB cable to the Raspberry Pi Pico W.
11+
$~$
1112

12-
![A Raspberry Pi Pico W connected to the small end of a micro USB cable.](https://projects-static.raspberrypi.org/projects/get-started-pico-w/0b627b5c80e71000b5116ecc35acaa49094aef84/en/images/pico-top-plug.png)
13-
14-
Hold down the BOOTSEL button on your Raspberry Pi Pico W.
15-
16-
![A Raspberry Pi Pico W with the BOOTSEL button highlighted](https://projects-static.raspberrypi.org/projects/get-started-pico-w/0b627b5c80e71000b5116ecc35acaa49094aef84/en/images/bootsel.png)
17-
18-
Connect the other end to your desktop computer, laptop, or Raspberry Pi.
19-
20-
![A Raspberry Pi Pico W connected to a laptop via a micro USB cable.](https://projects-static.raspberrypi.org/projects/get-started-pico-w/0b627b5c80e71000b5116ecc35acaa49094aef84/en/images/plug-in-pico.png)
21-
22-
Your file manager should open up, with Raspberry Pi Pico being show as an externally connected drive. Drag and drop the firmware file you downloaded into the file manager. Your Raspberry Pi Pico should disconnect and the file manager will close.
23-
24-
![Image of the Windows file manager opened, showing Raspberry Pi Pico connected as an external drive](https://projects-static.raspberrypi.org/projects/get-started-pico-w/0b627b5c80e71000b5116ecc35acaa49094aef84/en/images/file_manager.png)
25-
26-
27-
# Step 2: Installing dev environment (Mu)
28-
29-
30-
### Download the latest version of the Mu editor [here](https://codewith.mu)
31-
32-
Open Mu, and select the RP2040 Option (Or whichever option represents using Micropython for the board you have)
33-
34-
![](https://codewith.mu/img/en/tutorials/mode_selector1-1.png)
35-
36-
## Step 3: Installing the library using mip
37-
38-
Open up a new file in mu.
39-
40-
Copy the following code into that file:
41-
42-
```python
43-
import network
44-
import mip
45-
import time
46-
47-
def install_update_library(wifi_ssid, wifi_password, timeout = 5):
48-
49-
wlan = network.WLAN(network.STA_IF)
50-
# Configure board to connect to wifi
51-
wlan.active(True)
52-
wlan.connect(wifi_ssid,wifi_password)
53-
start_time = time.time()
54-
# Wait until connection is confirmed before attempting install
55-
while not wlan.isconnected():
56-
print("Connecting to network, may take a second")
57-
if time.time() > start_time+timeout:
58-
print("Failed to connect to network, please try again")
59-
wlan.disconnect()
60-
return
61-
time.sleep(0.25)
62-
# Install up-to-date library files and dependencies
63-
mip.install("github:Open-STEM/XRP_MicroPython")
64-
# Disconnect and disable wifi, since it is no longer needed
65-
wlan.disconnect()
66-
wlan.active(False)
67-
68-
install_update_library("your-ssid","your-password")
69-
```
70-
71-
Edit the method call at the bottom to include your wifi's details, then hit run.
72-
73-
Check the Serial Monitor to confirm that the libraries were properly installed.
13+
### That's it! Happy Learning!

XRPLib/version.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

XRPLib/webserver.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import network
66
import time
77

8+
logging.log_file = "webserverLog.txt"
9+
810
class Webserver:
911

1012
@classmethod

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
import os
88
import sys
99
import datetime
10+
import json
1011

1112
sys.path.insert(0, os.path.abspath(".."))
1213

13-
from XRPLib.version import __version__
14+
with open("../package.json", "r") as read_file:
15+
__version__ = json.load(read_file)["version"]
1416

1517
# -- General configuration ------------------------------------------------
1618

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@
2424
["XRPExamples/installation_verification.py", "github:Open-STEM/XRP_Micropython/Examples/installation_verification.py"],
2525
["XRPExamples/misc_examples.py", "github:Open-STEM/XRP_Micropython/Examples/misc_examples.py"],
2626
["XRPExamples/sensor_examples.py", "github:Open-STEM/XRP_Micropython/Examples/sensor_examples.py"],
27-
["XRPExamples/webserver_example.py", "github:Open-STEM/XRP_Micropython/Examples/webserver_example.py"],
28-
["XRPExamples/xrp_test.py", "github:Open-STEM/XRP_Micropython/Examples/xrp_test.py"]
27+
["XRPExamples/webserver_example.py", "github:Open-STEM/XRP_Micropython/Examples/webserver_example.py"]
2928
],
3029
"deps": [
3130
["github:pimoroni/phew", "latest"],
3231
["collections-defaultdict", "latest"],
3332
["os-path", "latest"]
3433
],
35-
"version": "0.9.6"
34+
"version": "0.9.7"
3635
}

0 commit comments

Comments
 (0)