From 1e61f2841d76b09b89464b4cce1589c7d6dfd47f Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Fri, 12 Mar 2021 14:27:02 +0100
Subject: [PATCH 01/10] changed shield examples
---
config.toml | 38 +++----
content/tutorials/expansionboards/_index.md | 15 ++-
content/tutorials/expansionboards/tracking.md | 99 +++++++++++++++++++
content/updatefirmware/expansionboard.md | 2 -
4 files changed, 119 insertions(+), 35 deletions(-)
create mode 100644 content/tutorials/expansionboards/tracking.md
diff --git a/config.toml b/config.toml
index 0d891501..539466c6 100644
--- a/config.toml
+++ b/config.toml
@@ -421,46 +421,34 @@ theme = "doc-theme"
parent = "tutorials"
weight = 50
[[menu.main]]
- name = "Pygate"
- url = "/tutorials/expansionboards/pygate/"
- identifier = "tutorials@expansionboards@pygate"
+ name = "Tracking"
+ url = "/tutorials/expansionboards/tracking/"
+ identifier = "tutorials@expansionboards@tracking"
parent = "tutorials@expansionboards"
weight = 10
[[menu.main]]
- name = "pysense"
- url = "/tutorials/expansionboards/pysense/"
- identifier = "tutorials@expansionboards@pysense"
+ name = "Sensing"
+ url = "/tutorials/expansionboards/sensing/"
+ identifier = "tutorials@expansionboards@sensing"
parent = "tutorials@expansionboards"
weight = 20
[[menu.main]]
- name = "pysense 2.0 X"
- url = "/tutorials/expansionboards/pysense2/"
- identifier = "tutorials@expansionboards@pysense2"
+ name = "Scanning"
+ url = "/tutorials/expansionboards/scanning/"
+ identifier = "tutorials@expansionboards@scanning"
parent = "tutorials@expansionboards"
weight = 30
[[menu.main]]
- name = "pytrack"
- url = "/tutorials/expansionboards/pytrack/"
- identifier = "tutorials@expansionboards@pytrack"
+ name = "Accelerometer sleep"
+ url = "/tutorials/expansionboards/sleep/"
+ identifier = "tutorials@expansionboards@sleep"
parent = "tutorials@expansionboards"
weight = 40
-[[menu.main]]
- name = "pytrack 2.0 X"
- url = "/tutorials/expansionboards/pytrack2/"
- identifier = "tutorials@expansionboards@pytrack2"
- parent = "tutorials@expansionboards"
- weight = 50
-[[menu.main]]
- name = "pyscan"
- url = "/tutorials/expansionboards/pyscan/"
- identifier = "tutorials@expansionboards@pyscan"
- parent = "tutorials@expansionboards"
- weight = 60
[[menu.main]]
name = "Sleep"
url = "/tutorials/expansionboards/sleep/"
identifier = "tutorials@expansionboards@sleep"
- parent = "tutorials@basic"
+ parent = "tutorials@expansionboards"
weight = 20
[[menu.main]]
name = "Advanced"
diff --git a/content/tutorials/expansionboards/_index.md b/content/tutorials/expansionboards/_index.md
index 2fb20d4d..1ab6cde9 100644
--- a/content/tutorials/expansionboards/_index.md
+++ b/content/tutorials/expansionboards/_index.md
@@ -1,5 +1,5 @@
---
-title: "Overview"
+title: "Shields"
aliases:
- tutorials/expansionboards/introduction.html
- tutorials/expansionboards/introduction.md
@@ -9,15 +9,14 @@ disable_breadcrumbs: true
>Note: Before using the Pysense, Pytrack and Pyscan boards, check the [GitHub](https://github.com/pycom/pycom-libraries) for the latest version of the libraries.
-To use the Pysense, Pytrack or Pyscan, make a folder inside your project folder and call it `lib`. Then, copy the appropiate sensor libraries from the github repository to the folder. Always copy the `pysense.py` or `pytrack.py` and `pycoproc.py` files if you want to use the boards' functions. The `pycoproc.py` library also allows for a special sleep mode. An example for this is provided [here](../expansionboards/sleep/)
+To use the Pysense, Pytrack or Pyscan, make a folder inside your project folder and call it `lib`. Then, copy the appropiate sensor libraries from the github repository to the folder. Always copy the `pysense.py` or `pytrack.py` and `pycoproc.py` files if you want to use the boards' functions. The `pycoproc.py` library also allows for a special sleep mode. An example for this is provided [here](sleep/)
+
+* [Asset tracking](tracking/)
+* [Environment sensing](sensing/)
+* [Scanning RFID / NFC Tags](scanning/)
+* [Wake on accelerometer](pysleep/)
-* [Pygate](../expansionboards/pygate/)
-* [Pysense](../expansionboards/pysense/)
-* [Pysense 2.0 X](../expansionboards/pysense2/)
-* [Pytrack](../expansionboards/pytrack/)
-* [Pytrack 2.0 X](../expansionboards/pytrack2/)
-* [Pyscan](../expansionboards/pyscan/)
>Note: Make sure to click `upload to device` to be able to `import` the appropriate libraries in your code!
diff --git a/content/tutorials/expansionboards/tracking.md b/content/tutorials/expansionboards/tracking.md
new file mode 100644
index 00000000..2a5613c4
--- /dev/null
+++ b/content/tutorials/expansionboards/tracking.md
@@ -0,0 +1,99 @@
+---
+title: "Asset Tracking"
+---
+Using the Pytrack, you are able to gather location data of your device. In this tutorial, we will go through how to set up your device, such that you can save the data on a SD card. Extending this example with a Pybytes integration on any network will allow you to forward any data to
+
+## Save data to a SD card
+For this example, you will need to insert a SD card into the Pytrack board to save the data locally. We will get the data every 60 seconds sleep in between.
+
+### main.py
+
+```python
+import machine
+import math
+import network
+import os
+import time
+import utime
+import gc
+import pycom
+from machine import RTC
+from machine import SD
+from L76GNSS import L76GNSS
+from pytrack import Pytrack
+from network import WLAN
+
+pycom.heartbeat(False)
+pycom.rgbled(0x0A0A08) # white
+
+time.sleep(2)
+gc.enable()
+
+py = Pytrack()
+
+time.sleep(1)
+l76 = L76GNSS(py, timeout=30, buffer=512)
+
+# Load SD card
+sd = SD()
+os.mount(sd, '/sd')
+os.listdir('/sd')
+
+# Read SD card
+print('Reading from file:')
+f = open('/sd/test.txt', 'r')
+print(f.readlines())
+f.close()
+print("Read from file.")
+
+time.sleep(1)
+
+while (True):
+ coord = l76.coordinates()
+ print("{} - {}".format(coord, gc.mem_free()))
+ f = open('/sd/test.txt', 'a') # Append
+ f.write("{}".format(coord[1]))
+ f.write(' ')
+ f.write("{}".format(coord[0]))
+ f.write(',\n')
+ f.close()
+ print('Sleep for 1 minute.')
+ time.sleep(60)
+```
+
+### Visualizing data
+The data in the textfile on the SD card will look like this:
+```
+latitude, longitude
+latitude, longitude
+```
+We can use this data to make a .kml file, or Keyhole Makrup Language, to display our tracks on for example Google Maps. Use the following format and save the file as a `.kml` file:
+```
+Placemark>
+ Untitled Path
+
+ 1
+ relativeToGround
+
+ Paste location data
+
+
+
+```
+
+## Forwarding data to Pybytes
+
+If we take the example above, and modify it such that instead of saving the data to a SD card, we send it to Pybytes. For this, make sure to [provision your device to Pybytes](/pybytes/gettingstarted/). If you already provisioned your device, make sure to start Pybytes from boot. Use the following to replace the loop:
+
+```
+while (True):
+ coord = l76.coordinates()
+ print("{} - {}".format(coord, gc.mem_free()))
+ pybytes.send_signal(1, coord)
+ time.sleep(60)
+```
+Using this, you will see your data show up as signal 1 in Pybytes
+
+## Save power
+
+Having the GPS enabled continuously
\ No newline at end of file
diff --git a/content/updatefirmware/expansionboard.md b/content/updatefirmware/expansionboard.md
index 12ace072..d5fa005f 100644
--- a/content/updatefirmware/expansionboard.md
+++ b/content/updatefirmware/expansionboard.md
@@ -8,8 +8,6 @@ aliases:
To update the firmware on any of the expansionboards, please see the following instructions. The firmware of can be updated via the USB port using the terminal tool, `DFU-util`.
-> There is currently **no firmware update** released for the new **Pytrack 2.0 X** and **Pysense 2.0 X**. Please do not try to flash these boards with firmware released for the old Version 1 hardware revision. The hardware revision is printed on the bottom of the shield.
-
The latest firmware DFU file can be downloaded from the links below:
* [Pygate](https://software.pycom.io/findupgrade?key=pygate.dfu&type=all&redirect=true)
From 1dfe8ffe735432d2b5f10a4df83c708d4984db9d Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Fri, 12 Mar 2021 14:31:08 +0100
Subject: [PATCH 02/10] changed shield links
---
content/gettingstarted/_index.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/content/gettingstarted/_index.md b/content/gettingstarted/_index.md
index 20d278de..1ca09960 100644
--- a/content/gettingstarted/_index.md
+++ b/content/gettingstarted/_index.md
@@ -131,9 +131,9 @@ If you need to remove files from your device you can use the following commands:
From here on, you can continue to use the additional features of your expansionboard:
>Note The Expansionboard requires no additional libraries and all functions work out of the box!
-|[ Pygate](/tutorials/expansionboards/pygate/)| [Pysense](/tutorials/expansionboards/pysense/) | [Pysense 2.0 X](/tutorials/expansionboards/pysense2/)| [Pytrack](/tutorials/expansionboards/pytrack/)| [Pytrack 2.0 X](/tutorials/expansionboards/pytrack2/)| [PyScan ](/tutorials/expansionboards/pyscan/)|
+|[ Pygate](/datasheets/expansionboards/pygate/)| [Pysense](/datasheets/expansionboards/pysense/) | [Pysense 2.0 X](/datasheets/expansionboards/pysense2/)| [Pytrack](/datasheets/expansionboards/pytrack/)| [Pytrack 2.0 X](/datasheets/expansionboards/pytrack2/)| [PyScan ](/datasheets/expansionboards/pyscan/)|
|:----|:-----|:-----|:-----|:-----|:----|
-| [](/tutorials/expansionboards/pygate/)|[](/tutorials/expansionboards/pysense/) | [](/tutorials/expansionboards/pysense2/)| [](/tutorials/expansionboards/pytrack/)| [](/tutorials/expansionboards/pytrack2/)| [](/tutorials/expansionboards/pyscan/) |
+| [](/datasheets/expansionboards/pygate/)|[](/datasheets/expansionboards/pysense/) | [](/datasheets/expansionboards/pysense2/)| [](/datasheets/expansionboards/pytrack/)| [](/datasheets/expansionboards/pytrack2/)| [](/datasheets/expansionboards/pyscan/) |
## Step 5: Connecting to a network
From c994d250dc29ec153e1fb09b779ddb33c169ef6e Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Fri, 12 Mar 2021 14:43:54 +0100
Subject: [PATCH 03/10] added example text
---
content/tutorials/expansionboards/sensing.md | 51 +++++++++++++++++++
content/tutorials/expansionboards/tracking.md | 27 ++++++++--
2 files changed, 75 insertions(+), 3 deletions(-)
create mode 100644 content/tutorials/expansionboards/sensing.md
diff --git a/content/tutorials/expansionboards/sensing.md b/content/tutorials/expansionboards/sensing.md
new file mode 100644
index 00000000..3dc836a6
--- /dev/null
+++ b/content/tutorials/expansionboards/sensing.md
@@ -0,0 +1,51 @@
+---
+title: "Sensing"
+---
+The Pysense has a variety of sensors available:
+* Accelerometer
+* Light sensor
+* Temperature / Humidity sensor
+* Pressure / Altitude sensor
+
+Lets make use of all of them:
+```python
+import time
+import pycom
+import machine
+
+from LIS2HH12 import LIS2HH12
+from SI7006A20 import SI7006A20
+from LTR329ALS01 import LTR329ALS01
+from MPL3115A2 import MPL3115A2,ALTITUDE,PRESSURE
+
+pycom.heartbeat(False)
+pycom.rgbled(0x0A0A08) # white
+
+py = Pycoproc()
+
+alt = MPL3115A2(py,mode=ALTITUDE) # Returns height in meters. Mode may also be set to PRESSURE, returning a value in Pascals
+print("MPL3115A2 temperature: " + str(alt.temperature()))
+print("Altitude: " + str(alt.altitude()))
+pres = MPL3115A2(py,mode=PRESSURE) # Returns pressure in Pa. Mode may also be set to ALTITUDE, returning a value in meters
+print("Pressure: " + str(press.pressure()))
+# send to pybytes
+
+
+dht = SI7006A20(py)
+print("Temperature: " + str(dht.temperature())+ " deg C and Relative Humidity: " + str(dht.humidity()) + " %RH")
+print("Dew point: "+ str(dht.dew_point()) + " deg C")
+#change to your ambient temperature
+t_ambient = 24.4
+print("Humidity Ambient for " + str(t_ambient) + " deg C is " + str(dht.humid_ambient(t_ambient)) + "%RH")
+
+
+li = LTR329ALS01(py)
+print("Light (channel Blue lux, channel Red lux): " + str(li.light()))
+
+acc = LIS2HH12(py)
+print("Acceleration: " + str(acc.acceleration()))
+print("Roll: " + str(acc.roll()))
+print("Pitch: " + str(acc.pitch()))
+
+print("Battery voltage: " + str(py.read_battery_voltage()))
+```
\ No newline at end of file
diff --git a/content/tutorials/expansionboards/tracking.md b/content/tutorials/expansionboards/tracking.md
index 2a5613c4..446f9eb0 100644
--- a/content/tutorials/expansionboards/tracking.md
+++ b/content/tutorials/expansionboards/tracking.md
@@ -1,7 +1,11 @@
---
title: "Asset Tracking"
---
-Using the Pytrack, you are able to gather location data of your device. In this tutorial, we will go through how to set up your device, such that you can save the data on a SD card. Extending this example with a Pybytes integration on any network will allow you to forward any data to
+Using the Pytrack, you are able to gather location data of your device. In this tutorial, we will go through how to set up your device, such that you can save the data on a SD card. Extending this example with a Pybytes integration on any network will allow you to forward any data to the cloud.
+On this page, we cover the following:
+* [Save data to a SD card](#save-data-to-a-sd-card)
+* [Forwarding data to Pybytes](#forwarding-data-to-pybytes)
+* [Save power](#save-power)
## Save data to a SD card
For this example, you will need to insert a SD card into the Pytrack board to save the data locally. We will get the data every 60 seconds sleep in between.
@@ -85,7 +89,7 @@ Placemark>
If we take the example above, and modify it such that instead of saving the data to a SD card, we send it to Pybytes. For this, make sure to [provision your device to Pybytes](/pybytes/gettingstarted/). If you already provisioned your device, make sure to start Pybytes from boot. Use the following to replace the loop:
-```
+```python
while (True):
coord = l76.coordinates()
print("{} - {}".format(coord, gc.mem_free()))
@@ -96,4 +100,21 @@ Using this, you will see your data show up as signal 1 in Pybytes
## Save power
-Having the GPS enabled continuously
\ No newline at end of file
+Having the GPS enabled continuously on can drain the battery quite quickly. We can put the GPS in standby mode while we deepsleep the module to save some additional power. This will have some drawbacks, as it could take some time to regain the location fix after waking up. Instead of the loop, you could use the following example. If you're looking to wake up from movement on the accelerometer, have a look at the [accelerometer sleep](../sleep/) example.
+
+```python
+coord = l76.coordinates()
+print("{} - {}".format(coord, gc.mem_free()))
+f = open('/sd/test.txt', 'a') # Append
+f.write("{}".format(coord[1]))
+f.write(' ')
+f.write("{}".format(coord[0]))
+f.write(',\n')
+f.close()
+print('Sleep for 1 minute.')
+py.setup_sleep() #sleep time in seconds
+# Shield version 1
+py.go_to_sleep(arguments)
+# Shield version 2
+py.go_to_sleep(different arguments)
+```
\ No newline at end of file
From e9ac38cad70a3aae5d5da30449dda4eee2451688 Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Mon, 15 Mar 2021 15:27:00 +0100
Subject: [PATCH 04/10] added getting-started
---
content/datasheets/expansionboards/pygate.md | 10 +++++++++-
content/datasheets/expansionboards/pyscan.md | 16 ++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/content/datasheets/expansionboards/pygate.md b/content/datasheets/expansionboards/pygate.md
index e6504e0d..5cf0361a 100644
--- a/content/datasheets/expansionboards/pygate.md
+++ b/content/datasheets/expansionboards/pygate.md
@@ -8,7 +8,15 @@ aliases:
---
**Store**: [Buy Here](https://pycom.io/product/pygate/)
-## 
+The Pygate is an 8-channel LoRa Gateway
+
+## Getting started
+1. Upload the latest stable `pygate` firmware release using the [firmware updater](/updatefirmware/device/).
+1. Follow the [tutorial](/tutorials/expansionboards/pygate/) to get your Pygate up and connected to The Things Network.
+
+## Features
+
+
## Datasheet
diff --git a/content/datasheets/expansionboards/pyscan.md b/content/datasheets/expansionboards/pyscan.md
index af84cf52..705ef304 100644
--- a/content/datasheets/expansionboards/pyscan.md
+++ b/content/datasheets/expansionboards/pyscan.md
@@ -8,6 +8,22 @@ aliases:
---
**Store**: [Buy Here](https://pycom.io/product/pyscan/)
+
+## Getting started
+1. Find the libraries for the Pyscan in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Download the files and extract them into the project folder in Pymakr
+1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
+1. Check the REPL:
+```
+example output
+```
+
+### Examples
+The Pyscan has several examples:
+* [Scanning](/tutorials/expansionboards/scanning/)
+
+## Features
+

## Datasheet & Pinout
From da58b9df539f8b284f3a226a80c2a0428a933de9 Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Mon, 15 Mar 2021 16:45:10 +0100
Subject: [PATCH 05/10] added getting started
---
content/datasheets/expansionboards/pyscan.md | 10 +++++-----
content/datasheets/expansionboards/pysense.md | 20 +++++++++++++++++--
.../datasheets/expansionboards/pysense2.md | 17 ++++++++++++++++
3 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/content/datasheets/expansionboards/pyscan.md b/content/datasheets/expansionboards/pyscan.md
index 705ef304..3f6f7a2a 100644
--- a/content/datasheets/expansionboards/pyscan.md
+++ b/content/datasheets/expansionboards/pyscan.md
@@ -8,6 +8,7 @@ aliases:
---
**Store**: [Buy Here](https://pycom.io/product/pyscan/)
+The Pyscan shield allows you to scan RFID and NFC tags and includes an accelerometer and light sensor.
## Getting started
1. Find the libraries for the Pyscan in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
@@ -18,21 +19,20 @@ aliases:
example output
```
-### Examples
+### Examples
The Pyscan has several examples:
* [Scanning](/tutorials/expansionboards/scanning/)
## Features
-
-
+
## Datasheet & Pinout
The pinout and datasheet of the Pyscan is available as a [PDF File](/gitbook/assets/pyscan-pinout.pdf)
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-Pyscan(8286-00031P)-20190523.pdf)
-
+
## Pyscan Libraries
@@ -64,4 +64,4 @@ The board features a single cell Li-Ion/Li-Po charger with a JST PHR‑2 connect
## 3D model for case design
-* Please see the [3D model] (/gitbook/assets/PyScan_v0.7.step) (step format)
+* Please see the [3D model](/gitbook/assets/PyScan_v0.7.step) (step format)
diff --git a/content/datasheets/expansionboards/pysense.md b/content/datasheets/expansionboards/pysense.md
index 8bb77699..0511ab9b 100644
--- a/content/datasheets/expansionboards/pysense.md
+++ b/content/datasheets/expansionboards/pysense.md
@@ -8,8 +8,24 @@ aliases:
---
**Store**: [Buy Here](https://pycom.io/product/pysense/)
+The Pyscan shield allows you to scan RFID and NFC tags and includes an accelerometer and light sensor.
-
+## Getting started
+1. Find the libraries for the Pysense in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Download the files and extract them into the project folder in Pymakr
+1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
+1. Check the REPL:
+```
+example output
+```
+
+### Examples
+The Pysense has several examples:
+* [Sensing](/tutorials/expansionboards/scanning/)
+
+## Features
+
+
## Datasheet
@@ -22,7 +38,7 @@ The datasheet of the Pysense is available as a [PDF File](/gitbook/assets/pysens
The pinout of the Pysense is available as a [PDF File](/gitbook/assets/pysense-pinout.pdf)
* The user button is connected to `P14`. This button can also be used to put the Pysense board in `dfu-bootloader` mode to update the firmware.
-
+
## Notes
### Battery Charger
diff --git a/content/datasheets/expansionboards/pysense2.md b/content/datasheets/expansionboards/pysense2.md
index 47598047..dd9830b9 100644
--- a/content/datasheets/expansionboards/pysense2.md
+++ b/content/datasheets/expansionboards/pysense2.md
@@ -7,6 +7,23 @@ aliases:
- chapter/datasheets/boards/pysense2
---
+The Pyscan shield allows you to scan RFID and NFC tags and includes an accelerometer and light sensor.
+
+## Getting started
+1. Find the libraries for the Pyscan in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Download the files and extract them into the project folder in Pymakr
+1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
+1. Check the REPL:
+```
+example output
+```
+
+### Examples
+The Pyscan has several examples:
+* [Scanning](/tutorials/expansionboards/scanning/)
+
+## Features
+

## Datasheet
From 02a1336e616c5f84970549cbf5ea810056740e99 Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Mon, 22 Mar 2021 12:10:11 +0100
Subject: [PATCH 06/10] upate shield getting started
---
content/datasheets/expansionboards/pysense.md | 6 +++++-
content/datasheets/expansionboards/pysense2.md | 12 ++++++++----
content/datasheets/expansionboards/pytrack.md | 17 +++++++++++++++++
content/datasheets/expansionboards/pytrack2.md | 17 +++++++++++++++++
4 files changed, 47 insertions(+), 5 deletions(-)
diff --git a/content/datasheets/expansionboards/pysense.md b/content/datasheets/expansionboards/pysense.md
index 0511ab9b..17729935 100644
--- a/content/datasheets/expansionboards/pysense.md
+++ b/content/datasheets/expansionboards/pysense.md
@@ -8,7 +8,11 @@ aliases:
---
**Store**: [Buy Here](https://pycom.io/product/pysense/)
-The Pyscan shield allows you to scan RFID and NFC tags and includes an accelerometer and light sensor.
+The Pysense shield allows you to sense the environment using 5 different sensors:
+* Accelerometer (LIS2HH12)
+* Light Sensor (LTR329ALS01)
+* Pressure Sensor (MPL3115A2)
+* Temperature / Humidity Sensor (SI7006A20)
## Getting started
1. Find the libraries for the Pysense in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
diff --git a/content/datasheets/expansionboards/pysense2.md b/content/datasheets/expansionboards/pysense2.md
index dd9830b9..dd13be0a 100644
--- a/content/datasheets/expansionboards/pysense2.md
+++ b/content/datasheets/expansionboards/pysense2.md
@@ -7,10 +7,14 @@ aliases:
- chapter/datasheets/boards/pysense2
---
-The Pyscan shield allows you to scan RFID and NFC tags and includes an accelerometer and light sensor.
+The Pysense 2.0 X shield allows you to sense the environment using 5 different sensors:
+* Accelerometer (LIS2HH12)
+* Light Sensor (LTR329ALS01)
+* Pressure Sensor (MPL3115A2)
+* Temperature / Humidity Sensor (SI7006A20)
## Getting started
-1. Find the libraries for the Pyscan in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Find the libraries for the Pysense 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
1. Check the REPL:
@@ -19,8 +23,8 @@ example output
```
### Examples
-The Pyscan has several examples:
-* [Scanning](/tutorials/expansionboards/scanning/)
+The Pysense has several examples:
+* [Sensing](/tutorials/expansionboards/sensing/)
## Features
diff --git a/content/datasheets/expansionboards/pytrack.md b/content/datasheets/expansionboards/pytrack.md
index ba905708..401a3337 100644
--- a/content/datasheets/expansionboards/pytrack.md
+++ b/content/datasheets/expansionboards/pytrack.md
@@ -8,6 +8,23 @@ aliases:
---
**Store**: [Buy Here](https://pycom.io/product/pytrack/)
+The Pytrack shield allows you track your location using the onboard GPS and accelerometer.
+
+## Getting started
+1. Find the libraries for the Pytrack in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Download the files and extract them into the project folder in Pymakr
+1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
+1. Check the REPL:
+```
+example output
+```
+
+### Examples
+The Pytrack has several examples:
+* [Tracking](/tutorials/expansionboards/tracking/)
+
+## Features
+

diff --git a/content/datasheets/expansionboards/pytrack2.md b/content/datasheets/expansionboards/pytrack2.md
index d6e30dc2..b484469f 100644
--- a/content/datasheets/expansionboards/pytrack2.md
+++ b/content/datasheets/expansionboards/pytrack2.md
@@ -7,6 +7,23 @@ aliases:
- chapter/datasheets/boards/pytrack2
---
+The Pytrack 2.0 X shield allows you track your location using the onboard GPS and accelerometer.
+
+## Getting started
+1. Find the libraries for the Pytrack 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Download the files and extract them into the project folder in Pymakr
+1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
+1. Check the REPL:
+```
+example output
+```
+
+### Examples
+The Pytrack has several examples:
+* [Tracking](/tutorials/expansionboards/tracking/)
+
+## Features
+

## Datasheet
From 019671f4bf74eb10efbfbf442d3670878fad15db Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Mon, 22 Mar 2021 12:10:18 +0100
Subject: [PATCH 07/10] add new examples
---
config.toml | 2 +-
.../pycom/expansionboards/_index.md | 2 +-
content/tutorials/expansionboards/_index.md | 3 +-
content/tutorials/expansionboards/scanning.md | 10 +++++
content/tutorials/expansionboards/sensing.md | 37 ++++++++++++++++++-
content/tutorials/expansionboards/sleep.md | 19 +++++++---
content/tutorials/expansionboards/tracking.md | 2 +
7 files changed, 64 insertions(+), 11 deletions(-)
create mode 100644 content/tutorials/expansionboards/scanning.md
diff --git a/config.toml b/config.toml
index 74266e89..d583af6b 100644
--- a/config.toml
+++ b/config.toml
@@ -439,7 +439,7 @@ theme = "doc-theme"
parent = "tutorials@expansionboards"
weight = 30
[[menu.main]]
- name = "Accelerometer sleep"
+ name = "Pysleep"
url = "/tutorials/expansionboards/sleep/"
identifier = "tutorials@expansionboards@sleep"
parent = "tutorials@expansionboards"
diff --git a/content/firmwareapi/pycom/expansionboards/_index.md b/content/firmwareapi/pycom/expansionboards/_index.md
index 333ee88d..e9aa598b 100644
--- a/content/firmwareapi/pycom/expansionboards/_index.md
+++ b/content/firmwareapi/pycom/expansionboards/_index.md
@@ -14,7 +14,7 @@ Note that this functionality is not built into the firmware, and you will need t
The API pages are separated per sensor:
* [Accelerometer](lis2hh12/) (LIS2HH12)
* [Light Sensor](ltr329als01/) (LTR329ALS01)
-* [Temperature Sensor](si7006a20/) (SI7006A20)
+* [Temperature / Humidity Sensor](si7006a20/) (SI7006A20)
* [Pressure Sensor](mpl3115a2/) (MPL3115A2)
* [RFID / NFC](mfrc630/) (MFRC630)
* [GPS](l76gnss/) (L76GNSS)
diff --git a/content/tutorials/expansionboards/_index.md b/content/tutorials/expansionboards/_index.md
index 1ab6cde9..903a722a 100644
--- a/content/tutorials/expansionboards/_index.md
+++ b/content/tutorials/expansionboards/_index.md
@@ -14,7 +14,8 @@ To use the Pysense, Pytrack or Pyscan, make a folder inside your project folder
* [Asset tracking](tracking/)
* [Environment sensing](sensing/)
* [Scanning RFID / NFC Tags](scanning/)
-* [Wake on accelerometer](pysleep/)
+* [Pysleep](sleep/)
+* [Movement detection](/accelerometer/)
diff --git a/content/tutorials/expansionboards/scanning.md b/content/tutorials/expansionboards/scanning.md
new file mode 100644
index 00000000..c81a5c0a
--- /dev/null
+++ b/content/tutorials/expansionboards/scanning.md
@@ -0,0 +1,10 @@
+---
+Title: "Scanning"
+---
+
+>This example can be used on the **Pyscan**
+
+You can use the example below to scan RFID / NFC cards presented to the scanner:
+```python
+example
+```
\ No newline at end of file
diff --git a/content/tutorials/expansionboards/sensing.md b/content/tutorials/expansionboards/sensing.md
index 3dc836a6..3af9fe49 100644
--- a/content/tutorials/expansionboards/sensing.md
+++ b/content/tutorials/expansionboards/sensing.md
@@ -1,13 +1,20 @@
---
title: "Sensing"
---
+> This example can be used on the **Pysense** and **Pysense 2.0 X**
+
The Pysense has a variety of sensors available:
* Accelerometer
* Light sensor
* Temperature / Humidity sensor
* Pressure / Altitude sensor
-Lets make use of all of them:
+The examples covered on this page:
+* [Using all sensors](#using-all-senors)
+* [Sending sensor data to Pybytes](#sensor-data-to-pybytes)
+
+## Using all sensors
+
```python
import time
import pycom
@@ -48,4 +55,30 @@ print("Roll: " + str(acc.roll()))
print("Pitch: " + str(acc.pitch()))
print("Battery voltage: " + str(py.read_battery_voltage()))
-```
\ No newline at end of file
+```
+
+## Sensor data to Pybytes
+Pybytes is an online IoT platform, where you can receive data from your sensors and visualize it over time.
+To forward generated sensor data to Pybytes, you'll first have to [provision your device](/pybytes/gettingstarted/) to Pybytes, and have it activated. Then, you can use the following example to send the light sensor data to Pybytes:
+
+```python
+import time
+import pycom
+import machine
+
+from LTR329ALS01 import LTR329ALS01
+sleeptime = 60*1000 # 1 minute
+
+pycom.heartbeat(False)
+pycom.rgbled(0x0A0A08) # white
+
+py = Pycoproc()
+
+li = LTR329ALS01(py)
+light = li.light();
+print("Light (channel Blue lux, channel Red lux): " + str(light))
+pybytes.send_signal(0, light[0]) # channel Blue
+pybytes.send_signal(1, light[1]) # channel Red
+time.sleep(2) # we need to sleep to make sure the signal gets sent
+
+machine.deepsleep(sleeptime)
\ No newline at end of file
diff --git a/content/tutorials/expansionboards/sleep.md b/content/tutorials/expansionboards/sleep.md
index 98814384..94217242 100644
--- a/content/tutorials/expansionboards/sleep.md
+++ b/content/tutorials/expansionboards/sleep.md
@@ -1,17 +1,24 @@
---
title: 'Sleep'
---
+> This example can be used on a **All shields**
-The expansionboards (Pysense 2.0 X, and Pytrack 2.0 X, DeepSleep shield) use a different mechanism to put the controller to sleep. A separate controller on the expansion board will put the main controller to sleep. This will actually cut all power from the module for the set amount of time, hard resetting it. Cutting power to the expansion board will work as well. Using this method, we can still recover the wake up reason and remaining sleep time. The example below works was written for a Pysense, but works on any of the boards by changing the first lines
-
+On these shields, an additional sleep method is available. Next to [`machine.deepsleep()`](/firmwareapi/pycom/machine/#machinedeepsleeptime_ms). there is `py.go_to_sleep()`, which is able to completely cut the power to the development board, and using only the coprocessor to keep track of when to wake up again. This way, we can save more power, which is especially useful when operating on a battery. On this page, we will cover the following:
+* [Simple Pysleep](#simple-pysleep)
+* [Wake up from accelerometer](#wake-up-from-accelerometer)
+*
+## Simple Pysleep
```python
-from pysense import Pysense
-py = Pysense()
-py.setup_sleep(10) # set sleep time of 10 seconds
+from pycoproc import Pycoproc
+py = Pycoproc
+# setup the sleep time in seconds
+py.setup_sleep(10)
+# go to pysleep
py.go_to_sleep()
print("this will never be printed")
```
-Using this method, we can also wake the board using the accelerometer interrupt method:
+## Wake up from accelerometer
+Using this method, we can also wake the board using the onboard accelerometer to wake up from pysleep after we detect movement. The example below shows how to achieve that:
```python
diff --git a/content/tutorials/expansionboards/tracking.md b/content/tutorials/expansionboards/tracking.md
index 446f9eb0..b3e256c4 100644
--- a/content/tutorials/expansionboards/tracking.md
+++ b/content/tutorials/expansionboards/tracking.md
@@ -1,6 +1,8 @@
---
title: "Asset Tracking"
---
+> This example can be used on a **Pytrack** and **Pytrack 2.0 X**
+
Using the Pytrack, you are able to gather location data of your device. In this tutorial, we will go through how to set up your device, such that you can save the data on a SD card. Extending this example with a Pybytes integration on any network will allow you to forward any data to the cloud.
On this page, we cover the following:
* [Save data to a SD card](#save-data-to-a-sd-card)
From 3f5109c7ee497e148a8ab68eb8722f263d4a9083 Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Mon, 22 Mar 2021 14:16:12 +0100
Subject: [PATCH 08/10] add sleep and scan examples
---
content/tutorials/expansionboards/scanning.md | 50 +++++++++++-
content/tutorials/expansionboards/sensing.md | 2 +-
content/tutorials/expansionboards/sleep.md | 76 ++++++++++++++++++-
3 files changed, 122 insertions(+), 6 deletions(-)
diff --git a/content/tutorials/expansionboards/scanning.md b/content/tutorials/expansionboards/scanning.md
index c81a5c0a..b60233bc 100644
--- a/content/tutorials/expansionboards/scanning.md
+++ b/content/tutorials/expansionboards/scanning.md
@@ -6,5 +6,53 @@ Title: "Scanning"
You can use the example below to scan RFID / NFC cards presented to the scanner:
```python
-example
+from pyscan import Pyscan
+from MFRC630 import MFRC630
+import time
+import pycom
+import _thread
+
+VALID_CARDS = [[0x43, 0x95, 0xDD, 0xF8],
+ [0x43, 0x95, 0xDD, 0xF9]]
+
+py = Pyscan()
+nfc = MFRC630(py)
+
+RGB_BRIGHTNESS = 0x8
+
+RGB_RED = (RGB_BRIGHTNESS << 16)
+RGB_GREEN = (RGB_BRIGHTNESS << 8)
+RGB_BLUE = (RGB_BRIGHTNESS)
+
+# Make sure heartbeat is disabled before setting RGB LED
+pycom.heartbeat(False)
+
+# Initialise the MFRC630 with some settings
+nfc.mfrc630_cmd_init()
+
+def check_uid(uid, len):
+ return VALID_CARDS.count(uid[:len])
+
+def discovery_loop(nfc, id):
+ while True:
+ # Send REQA for ISO14443A card type
+ atqa = nfc.mfrc630_iso14443a_WUPA_REQA(nfc.MFRC630_ISO14443_CMD_REQA)
+ if (atqa != 0):
+ # A card has been detected, read UID
+ uid = bytearray(10)
+ uid_len = nfc.mfrc630_iso14443a_select(uid)
+ if (uid_len > 0):
+ if (check_uid(list(uid), uid_len)) > 0:
+ pycom.rgbled(RGB_GREEN)
+ else:
+ pycom.rgbled(RGB_RED)
+ else:
+ # No card detected
+ pycom.rgbled(RGB_BLUE)
+ nfc.mfrc630_cmd_reset()
+ time.sleep(.5)
+ nfc.mfrc630_cmd_init()
+
+# This is the start of our main execution... start the thread
+_thread.start_new_thread(discovery_loop, (nfc, 0))
```
\ No newline at end of file
diff --git a/content/tutorials/expansionboards/sensing.md b/content/tutorials/expansionboards/sensing.md
index 3af9fe49..91e25531 100644
--- a/content/tutorials/expansionboards/sensing.md
+++ b/content/tutorials/expansionboards/sensing.md
@@ -59,7 +59,7 @@ print("Battery voltage: " + str(py.read_battery_voltage()))
## Sensor data to Pybytes
Pybytes is an online IoT platform, where you can receive data from your sensors and visualize it over time.
-To forward generated sensor data to Pybytes, you'll first have to [provision your device](/pybytes/gettingstarted/) to Pybytes, and have it activated. Then, you can use the following example to send the light sensor data to Pybytes:
+To forward generated sensor data to Pybytes, you'll first have to [provision your device](/pybytes/gettingstarted/) to Pybytes, and have it activated on boot. Then, you can use the following example to send the light sensor data to Pybytes:
```python
import time
diff --git a/content/tutorials/expansionboards/sleep.md b/content/tutorials/expansionboards/sleep.md
index 94217242..6fb4ec90 100644
--- a/content/tutorials/expansionboards/sleep.md
+++ b/content/tutorials/expansionboards/sleep.md
@@ -10,7 +10,7 @@ On these shields, an additional sleep method is available. Next to [`machine.dee
## Simple Pysleep
```python
from pycoproc import Pycoproc
-py = Pycoproc
+py = Pycoproc()
# setup the sleep time in seconds
py.setup_sleep(10)
# go to pysleep
@@ -18,6 +18,9 @@ py.go_to_sleep()
print("this will never be printed")
```
## Wake up from accelerometer
+
+> This example can be used on the first generation boards
+
Using this method, we can also wake the board using the onboard accelerometer to wake up from pysleep after we detect movement. The example below shows how to achieve that:
```python
@@ -27,9 +30,6 @@ from pysense import Pysense
from LIS2HH12 import LIS2HH12
import time
-#py = Pytrack()
-py = Pysense()
-
# display the reset reason code and the sleep remaining in seconds
# possible values of wakeup reason are:
# WAKE_REASON_ACCELEROMETER = 1
@@ -56,3 +56,71 @@ acc.enable_activity_interrupt(2000, 200)
py.setup_sleep(300)
py.go_to_sleep()
```
+
+## Pysleep Accelerometer 2
+Use this example for a **Pysense 2** or **Pytrack 2** shield:
+```python
+
+# This script demonstrates two examples:
+# * go to ultra low power mode (~10uA @3.75V) with all sensors, incl accelerometer and also pycom module (Fipy, Gpy, etc) off - tap the MCLR button for this
+# * go to low power mode (~165uA @3.75V) with accelerometer on, pycom module in deepsleep and wake from accelerometer interrupt - hold the MCLR button down for this
+
+# See https://docs.pycom.io for more information regarding library specifics
+
+import time
+import pycom
+import struct
+from machine import Pin
+from pycoproc import Pycoproc
+import machine
+
+from LIS2HH12 import LIS2HH12
+from SI7006A20 import SI7006A20
+from LTR329ALS01 import LTR329ALS01
+from MPL3115A2 import MPL3115A2,ALTITUDE,PRESSURE
+
+def accelerometer():
+ print("ACCELEROMETER:", "accel:", accelerometer_sensor.acceleration(), "roll:", accelerometer_sensor.roll(), "pitch:", accelerometer_sensor.pitch(), "x/y/z:", accelerometer_sensor.x, accelerometer_sensor.y, accelerometer_sensor.z )
+
+def activity_int_handler(pin_o):
+ if pin_o():
+ print('[Activity]')
+ pycom.rgbled(0x00000A) # blue
+ else:
+ print('[Inactivity]')
+ pycom.rgbled(0x0A0A00) # yellow
+
+def activity_int_handler_none(pin_o):
+ pass
+
+###############################################################
+sleep_time_s = 300 # 5 min
+pycom.heartbeat(False)
+pycom.rgbled(0x0a0a0a) # white
+print("pycoproc init")
+py = Pycoproc()
+print("battery {:.2f} V".format(py.read_battery_voltage()))
+py.setup_sleep(sleep_time_s)
+
+# init accelerometer
+accelerometer_sensor = LIS2HH12()
+# read accelerometer sensor values
+accelerometer()
+print("enable accelerometer interrupt")
+
+# enable_activity_interrupt( [mG], [ms], callback)
+# accelerometer_sensor.enable_activity_interrupt(8000, 200, activity_int_handler) # low sensitivty
+# accelerometer_sensor.enable_activity_interrupt(2000, 200, activity_int_handler) # medium sensitivity
+accelerometer_sensor.enable_activity_interrupt( 100, 200, activity_int_handler) # high sensitivity
+# accelerometer_sensor.enable_activity_interrupt(63, 160, activity_int_handler) # ultra sensitivty
+
+print("enable pycom module to wake up from accelerometer interrupt")
+wake_pins = [Pin('P13', mode=Pin.IN, pull=Pin.PULL_DOWN)]
+machine.pin_sleep_wakeup(wake_pins, machine.WAKEUP_ANY_HIGH, True)
+
+print("put pycoproc to sleep and pycom module to deepsleep")
+py.go_to_sleep(pycom_module_off=False, accelerometer_off=False, wake_interrupt=True)
+machine.deepsleep(sleep_time_s * 1000)
+
+print("we never reach here!")
+```
\ No newline at end of file
From 448bb84bf7534edf83c76d736376286a0253a577 Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Fri, 26 Mar 2021 11:30:09 +0100
Subject: [PATCH 09/10] update links
---
config.toml | 2 +-
content/datasheets/expansionboards/pyscan.md | 2 +-
content/datasheets/expansionboards/pysense.md | 2 +-
content/datasheets/expansionboards/pysense2.md | 2 +-
content/datasheets/expansionboards/pytrack.md | 2 +-
content/datasheets/expansionboards/pytrack2.md | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/config.toml b/config.toml
index d583af6b..064b61d7 100644
--- a/config.toml
+++ b/config.toml
@@ -1050,7 +1050,7 @@ theme = "doc-theme"
weight = 60
[[menu.main]]
- name = "Expansion Boards and Shields"
+ name = "Shields"
url = "/datasheets/expansionboards/"
identifier = "datasheets@boards"
parent = "datasheets"
diff --git a/content/datasheets/expansionboards/pyscan.md b/content/datasheets/expansionboards/pyscan.md
index 3f6f7a2a..39dedbc7 100644
--- a/content/datasheets/expansionboards/pyscan.md
+++ b/content/datasheets/expansionboards/pyscan.md
@@ -11,7 +11,7 @@ aliases:
The Pyscan shield allows you to scan RFID and NFC tags and includes an accelerometer and light sensor.
## Getting started
-1. Find the libraries for the Pyscan in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Find the libraries for the Pyscan in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
1. Check the REPL:
diff --git a/content/datasheets/expansionboards/pysense.md b/content/datasheets/expansionboards/pysense.md
index 17729935..bf1f8495 100644
--- a/content/datasheets/expansionboards/pysense.md
+++ b/content/datasheets/expansionboards/pysense.md
@@ -15,7 +15,7 @@ The Pysense shield allows you to sense the environment using 5 different sensors
* Temperature / Humidity Sensor (SI7006A20)
## Getting started
-1. Find the libraries for the Pysense in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Find the libraries for the Pysense in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
1. Check the REPL:
diff --git a/content/datasheets/expansionboards/pysense2.md b/content/datasheets/expansionboards/pysense2.md
index dd13be0a..d3f6919a 100644
--- a/content/datasheets/expansionboards/pysense2.md
+++ b/content/datasheets/expansionboards/pysense2.md
@@ -14,7 +14,7 @@ The Pysense 2.0 X shield allows you to sense the environment using 5 different s
* Temperature / Humidity Sensor (SI7006A20)
## Getting started
-1. Find the libraries for the Pysense 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Find the libraries for the Pysense 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
1. Check the REPL:
diff --git a/content/datasheets/expansionboards/pytrack.md b/content/datasheets/expansionboards/pytrack.md
index 401a3337..18d22a66 100644
--- a/content/datasheets/expansionboards/pytrack.md
+++ b/content/datasheets/expansionboards/pytrack.md
@@ -11,7 +11,7 @@ aliases:
The Pytrack shield allows you track your location using the onboard GPS and accelerometer.
## Getting started
-1. Find the libraries for the Pytrack in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Find the libraries for the Pytrack in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
1. Check the REPL:
diff --git a/content/datasheets/expansionboards/pytrack2.md b/content/datasheets/expansionboards/pytrack2.md
index b484469f..4ce38e1c 100644
--- a/content/datasheets/expansionboards/pytrack2.md
+++ b/content/datasheets/expansionboards/pytrack2.md
@@ -10,7 +10,7 @@ aliases:
The Pytrack 2.0 X shield allows you track your location using the onboard GPS and accelerometer.
## Getting started
-1. Find the libraries for the Pytrack 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/shields/) repository on Github.
+1. Find the libraries for the Pytrack 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
1. Check the REPL:
From 13cb989dfd6009710b3f01f9ae0b481a70705470 Mon Sep 17 00:00:00 2001
From: gijsio <67470426+gijsio@users.noreply.github.com>
Date: Mon, 12 Apr 2021 16:20:22 +0200
Subject: [PATCH 10/10] changed links to release
---
content/datasheets/expansionboards/pyscan.md | 7 ++-----
content/datasheets/expansionboards/pysense.md | 10 ++++------
content/datasheets/expansionboards/pysense2.md | 8 +++-----
content/datasheets/expansionboards/pytrack.md | 8 +++-----
content/datasheets/expansionboards/pytrack2.md | 8 +++-----
5 files changed, 15 insertions(+), 26 deletions(-)
diff --git a/content/datasheets/expansionboards/pyscan.md b/content/datasheets/expansionboards/pyscan.md
index 39dedbc7..2afb4a95 100644
--- a/content/datasheets/expansionboards/pyscan.md
+++ b/content/datasheets/expansionboards/pyscan.md
@@ -11,13 +11,10 @@ aliases:
The Pyscan shield allows you to scan RFID and NFC tags and includes an accelerometer and light sensor.
## Getting started
-1. Find the libraries for the Pyscan in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
+1. Find the libraries for the Pyscan in the [Pycom libraries](https://github.com/pycom/pycom-libraries/releases/) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
-1. Check the REPL:
-```
-example output
-```
+1. Check the REPL. If you have Pybytes activated, the example will send the sensor data to Pybytes automatically. Note that the Pyscan will return command to the REPL while it scans for NFC cards in the background. Note that the example also allows the decoding of cards by changing the variable `DECODE_CARD = True`
### Examples
The Pyscan has several examples:
diff --git a/content/datasheets/expansionboards/pysense.md b/content/datasheets/expansionboards/pysense.md
index bf1f8495..13c34e1c 100644
--- a/content/datasheets/expansionboards/pysense.md
+++ b/content/datasheets/expansionboards/pysense.md
@@ -15,17 +15,15 @@ The Pysense shield allows you to sense the environment using 5 different sensors
* Temperature / Humidity Sensor (SI7006A20)
## Getting started
-1. Find the libraries for the Pysense in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
+1. Find the libraries for the Pysense in the [Pycom libraries](https://github.com/pycom/pycom-libraries/releases/) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
-1. Check the REPL:
-```
-example output
-```
+1. Check the REPL. If you have Pybytes activated, the example will send the sensor data to Pybytes automatically.
+
### Examples
The Pysense has several examples:
-* [Sensing](/tutorials/expansionboards/scanning/)
+* [Sensing](/tutorials/expansionboards/sensing/)
## Features
diff --git a/content/datasheets/expansionboards/pysense2.md b/content/datasheets/expansionboards/pysense2.md
index d3f6919a..b5a8d6e6 100644
--- a/content/datasheets/expansionboards/pysense2.md
+++ b/content/datasheets/expansionboards/pysense2.md
@@ -14,13 +14,11 @@ The Pysense 2.0 X shield allows you to sense the environment using 5 different s
* Temperature / Humidity Sensor (SI7006A20)
## Getting started
-1. Find the libraries for the Pysense 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
+1. Find the libraries for the Pysense 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/releases/) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
-1. Check the REPL:
-```
-example output
-```
+1. Check the REPL. If you have Pybytes activated, the example will send the sensor data to Pybytes automatically.
+
### Examples
The Pysense has several examples:
diff --git a/content/datasheets/expansionboards/pytrack.md b/content/datasheets/expansionboards/pytrack.md
index 18d22a66..60919542 100644
--- a/content/datasheets/expansionboards/pytrack.md
+++ b/content/datasheets/expansionboards/pytrack.md
@@ -11,13 +11,11 @@ aliases:
The Pytrack shield allows you track your location using the onboard GPS and accelerometer.
## Getting started
-1. Find the libraries for the Pytrack in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
+1. Find the libraries for the Pytrack in the [Pycom libraries](https://github.com/pycom/pycom-libraries/releases/) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
-1. Check the REPL:
-```
-example output
-```
+1. Check the REPL. If you have Pybytes activated, the example will send the location data to Pybytes automatically.
+
### Examples
The Pytrack has several examples:
diff --git a/content/datasheets/expansionboards/pytrack2.md b/content/datasheets/expansionboards/pytrack2.md
index 4ce38e1c..08d97f83 100644
--- a/content/datasheets/expansionboards/pytrack2.md
+++ b/content/datasheets/expansionboards/pytrack2.md
@@ -10,13 +10,11 @@ aliases:
The Pytrack 2.0 X shield allows you track your location using the onboard GPS and accelerometer.
## Getting started
-1. Find the libraries for the Pytrack 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/tree/master/shields) repository on Github.
+1. Find the libraries for the Pytrack 2.0 X in the [Pycom libraries](https://github.com/pycom/pycom-libraries/releases/) repository on Github.
1. Download the files and extract them into the project folder in Pymakr
1. Click the `upload project to device` button. This will store all necessary files on the device and allow you to import them in the example `main.py`.
-1. Check the REPL:
-```
-example output
-```
+1. Check the REPL. If you have Pybytes activated, the example will send the location data to Pybytes automatically.
+
### Examples
The Pytrack has several examples: