mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 00:04:15 +01:00
Merge branch 'docs-restructure' of https://github.com/pycom/pycom-documentation into docs-restructure
This commit is contained in:
958
config.toml
958
config.toml
File diff suppressed because it is too large
Load Diff
@@ -12,21 +12,11 @@ Pycom ecosystem makes IoT development easy
|
||||
* Write [MicroPython](https://micropython.org/) code and up to three times faster compared to C/C++.
|
||||
|
||||
* Send data to [Pybytes IoT platform](https://pybytes.pycom.io/?utm_source=docs&utm_medium=web&utm_campaign=getting-started-top) or use your device standalone with the range of supported networks.
|
||||
* Start using our products [here!](/gettingstarted/)
|
||||
|
||||

|
||||
|
||||
## [Setting up the hardware](gettingstarted/connection)
|
||||
Firstly we will cover how to connect the module to your computer either via USB or WiFi.
|
||||
Secondly, we will explain how to connect various accessories such as antennas or SIM cards to your module.
|
||||
|
||||
## [Setting up your computer and Pymakr plugin](gettingstarted/installation)
|
||||
You will need to install some software on your computer to interface with it.
|
||||
The second part of this guide will guide you through installing drivers and performing firmware updates for your module/accessories.
|
||||
And how to set up the Pymakr plugins and other software use to program your device.
|
||||
|
||||
## [MicroPython crash course](/gettingstarted/programming)
|
||||
Now that you have a connected module and all the required software installed it is time to begin programming your device.
|
||||
This part of the guide will get you started with a basic example and point you in the right direction for getting your device connected to your chosen network.
|
||||
|
||||
## [Connecting to Pybytes IoT platform](pybytes/introduction)
|
||||
Connect your device to [Pybytes](https://pybytes.pycom.io/?utm_source=docs&utm_medium=web&utm_campaign=getting-started-bottom) with Wi-Fi, LoRa or Sigfox. Send data from your device just with one line command.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: ""
|
||||
title: "Product info & Datasheets"
|
||||
aliases:
|
||||
- datasheets/introduction.html
|
||||
- datasheets/introduction.md
|
||||
@@ -11,42 +11,28 @@ The follow pages contain all information relating to each product, for example:
|
||||
|
||||
## Development Modules
|
||||
|
||||
- {{% refname "development/wipy2.md" %}}.
|
||||
|
||||
- {{% refname "development/wipy3.md" %}}
|
||||
|
||||
- {{% refname "development/lopy.md" %}}
|
||||
|
||||
- {{% refname "development/lopy4.md" %}}
|
||||
|
||||
- {{% refname "development/sipy.md" %}}
|
||||
|
||||
- {{% refname "development/gpy.md" %}}
|
||||
|
||||
- {{% refname "development/fipy.md" %}}
|
||||
- [Wipy 2.0](/datasheets/development/wipy2.md)
|
||||
- [Wipy 3.0](/datasheets/development/wipy3.md)
|
||||
- [Lopy](/datasheets/development/lopy.md)
|
||||
- [Lopy 4](/datasheets/development/lopy4.md)
|
||||
- [Gpy](/datasheets/development/gpy.md)
|
||||
- [Sipy](/datasheets/development/sipy.md)
|
||||
|
||||
## OEM modules
|
||||
|
||||
- {{% refname "oem/w01.md" %}}
|
||||
- [W01](/datasheets/oem/w01.md)
|
||||
- [L01](/datasheets/oem/l01.md)
|
||||
- [L04](/datasheets/oem/l04.md)
|
||||
- [Baseboard](datasheets/oem/universal_reference.md)
|
||||
- [Deepsleep](datasheets/oem/deepsleep.md)
|
||||
|
||||
- {{% refname "oem/l01.md" %}}
|
||||
## Expansion boards
|
||||
- [Expansion 2](/datasheets/expansionboards/expansion2.md)
|
||||
- [Expansion 3](/datasheets/expansionboards/expansion3.md)
|
||||
- [Pygate](/datasheets/expansionboards/pygate.md)
|
||||
- [Pysense](/datasheets/expansionboards/pysense.md)
|
||||
- [Pysense 2.0 X](/datasheets/expansionboards/pysense.md)
|
||||
- [Pytrack](/datasheets/expansionboards/pytrack.md)
|
||||
- [Pysense 2.0 X](/datasheets/expansionboards/pysense.md)
|
||||
|
||||
- {{% refname "oem/g01.md" %}}
|
||||
|
||||
- {{% refname "oem/l01_reference.md" %}}
|
||||
|
||||
- {{% refname "oem/universal_reference.md" %}}
|
||||
|
||||
## Expansion Boards and Shields
|
||||
|
||||
- {{% refname "boards/expansion3.md" %}}
|
||||
|
||||
- {{% refname "boards/pytrack.md" %}}
|
||||
|
||||
- {{% refname "boards/pysense.md" %}}
|
||||
|
||||
- {{% refname "boards/pyscan.md" %}}
|
||||
|
||||
- {{% refname "boards/expansion2.md" %}}
|
||||
|
||||
- {{% refname "boards/deepsleep/" %}}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
---
|
||||
title: "Expansion Boards and Shields"
|
||||
aliases:
|
||||
- product-info/boards
|
||||
- chapter/datasheets/boards
|
||||
---
|
||||
|
||||
This section contains all of the datasheets for the Pycom Expansion Boards and Shields. This includes the Expansion Board, Pytrack, Pysense and Deep Sleep Shield.
|
||||
|
||||
{{% refname "expansion3.md" %}}
|
||||
|
||||
{{% refname "pytrack.md" %}}
|
||||
|
||||
{{% refname "pysense.md" %}}
|
||||
|
||||
{{% refname "pyscan.md" %}}
|
||||
|
||||
{{% refname "expansion2.md" %}}
|
||||
|
||||
{{% refname "deepsleep/" %}}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: "Expansion Boards and Shields"
|
||||
aliases:
|
||||
---
|
||||
|
||||
This section contains all of the datasheets for the Pycom Expansion Boards and Shields. This includes the Expansion Board, Pytrack, Pysense and Deep Sleep Shield.
|
||||
|
||||
{{% refname "pygate.md" %}}
|
||||
|
||||
{{% refname "expansion3.md" %}}
|
||||
|
||||
{{% refname "pytrack.md" %}}
|
||||
|
||||
{{% refname "pysense.md" %}}
|
||||
|
||||
{{% refname "pyscan.md" %}}
|
||||
|
||||
{{% refname "expansion2.md" %}}
|
||||
|
||||
{{% refname "deepsleep/" %}}
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
title: "Pygate"
|
||||
aliases:
|
||||
- datasheets/boards/pygate.html
|
||||
- datasheets/boards/pygate.md
|
||||
- product-info/boards/pygate
|
||||
- chapter/datasheets/boards/pygate
|
||||
---
|
||||
|
||||
## 
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the Pygate Board is available as a PDF File.
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_Pygate_v1.pdf" target="_blank"> Pygate Datasheet </a>
|
||||
|
||||
## Battery Charger
|
||||
|
||||
The Pygate features a single cell Li-Ion/Li-Po charger. When the board is being powered via the USB-C connector, the Pygate will charge the battery \(if connected\).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
* If PIC stays in bootloader mode, the [`dfu-util` update](/pytrackpysense/installation/firmware) should be performed
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "Development Modules"
|
||||
aliases:
|
||||
- product-info/development
|
||||
- chapter/datasheets/development
|
||||
---
|
||||
|
||||
This section contains all of the datasheets for the Pycom Development Devices. This includes the WiPy 2.0 and 3.0, LoPy, LoPy 4, SiPy, GPy, and FiPy.
|
||||
|
||||
{{% refname "wipy2.md" %}}
|
||||
|
||||
{{% refname "wipy3.md" %}}
|
||||
|
||||
{{% refname "lopy.md" %}}
|
||||
|
||||
{{% refname "lopy4.md" %}}
|
||||
|
||||
{{% refname "sipy.md" %}}
|
||||
|
||||
{{% refname "gpy.md" %}}
|
||||
|
||||
{{% refname "fipy.md" %}}
|
||||
|
||||
@@ -5,17 +5,10 @@ aliases:
|
||||
|
||||
This section contains all of the datasheets for the Pycom Development Devices. This includes the WiPy 2.0 and 3.0, LoPy, LoPy 4, SiPy, GPy, and FiPy.
|
||||
|
||||
{{% refname "wipy2.md" %}}
|
||||
|
||||
{{% refname "wipy3.md" %}}
|
||||
|
||||
{{% refname "lopy.md" %}}
|
||||
|
||||
{{% refname "lopy4.md" %}}
|
||||
|
||||
{{% refname "sipy.md" %}}
|
||||
|
||||
{{% refname "gpy.md" %}}
|
||||
|
||||
{{% refname "fipy.md" %}}
|
||||
|
||||
- [Wipy 2.0](/datasheets/development/wipy2/)
|
||||
- [Wipy 3.0](/datasheets/development/wipy3/)
|
||||
- [Lopy](/datasheets/development/lopy/)
|
||||
- [Lopy 4](/datasheets/development/lopy4/)
|
||||
- [Sipy](/datasheets/development/sipy/)
|
||||
- [Gpy](/datasheets/development/gpy/)
|
||||
- [Fipy](/datasheets/development/fipy/)
|
||||
|
||||
@@ -22,13 +22,13 @@ aliases:
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the FiPy is available as a PDF File.
|
||||
The datasheet of the FiPy is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_FiPy_v2.pdf)
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_FiPy_v2.pdf" target="_blank"> FiPy Datasheet </a>
|
||||
The drawing of the LTE-M antenna is available as a [PDF File](/gitbook/assets/lte-m-antenna-drawing.pdf).
|
||||
|
||||
The drawing of the LTE-M antenna is available as a PDF File.
|
||||
<a href="/gitbook/assets/lte-m-antenna-drawing.pdf" target="_blank"> LTE-M Antenna Drawing </a>
|
||||
The Fipy is certified for [CE RED](/gitbook/assets/fipy_c03-b0-red-final.pdf) and [FCC DSS](/gitbook/assets/pycom-2ajmtfipy01r-fcc-grant-dss.pdf) [FCC DTS](/gitbook/assets/pycom-2ajmtfipy01r-fcc-grant-dts.pdf) [FCC DXX](/gitbook/assets/pycom-2ajmtfipy01r-fcc-grant-dxx.pdf) [FCC TNB](/gitbook/assets/pycom-2ajmtfipy01r-fcc-grant-tnb.pdf)
|
||||
|
||||
[ROHS certification](gitbook/assets/RoHs_declarations/RoHS-for-FiPy(8217-00091P)-20190523.pdf)
|
||||
## Pinout
|
||||
|
||||
The pinout of the FiPy is available as a PDF File
|
||||
|
||||
@@ -15,7 +15,7 @@ aliases:
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/gpy)
|
||||
|
||||
**Getting Started:** [Click Here](/gettingstarted/connection/gpy)
|
||||
**Getting Started:** [Click Here](/gettingstarted/)
|
||||
|
||||
## Datasheet
|
||||
|
||||
@@ -24,19 +24,17 @@ Please Note: We have removed the labels from the pictures in the documentation d
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
The datasheet of the GPy is available as a PDF File.
|
||||
The datasheet of the GPy is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_GPy_v2.pdf")
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_GPy_v2.pdf" target="_blank"> GPy Datasheet </a>
|
||||
The drawing of the LTE-M antenna is available as a [PDF File](/gitbook/assets/lte-m-antenna-drawing.pdf")
|
||||
|
||||
The drawing of the LTE-M antenna is available as a PDF File.
|
||||
The Gpy is certified for [CE RED](/gitbook/assets/gpy_c03-b0-red-final.pdf) and [FCC DSS](/gitbook/assets/pycom-2ajmtgpy01r-fcc-grant-dss.pdf) [FCC DTS](/gitbook/assets/pycom-2ajmtgpy01r-fcc-grant-dts.pdf) [FCC TNB](//gitbook/assets/pycom-2ajmtgpy01r-fcc-grant-tnb.pdf)
|
||||
|
||||
<a href="/gitbook/assets/lte-m-antenna-drawing.pdf" target="_blank"> LTE-M Antenna Drawing </a>
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-GPy(8217-00090P)-20190523.pdf)
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the GPy is available as a PDF File
|
||||
|
||||
<a href="/gitbook/assets/gpy-pinout.pdf" target="_blank"> GPy Pinout </a>
|
||||
The pinout of the GPy is available as a [PDF File](/gitbook/assets/gpy-pinout.pdf)
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -21,14 +21,15 @@ Please Note: We have removed the labels from the pictures in the documentation d
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the LoPy is available as a PDF File.
|
||||
The datasheet of the LoPy is available as a [PDF File](gitbook/assets/specsheets/Pycom_002_Specsheets_LoPy_v2.pdf)
|
||||
|
||||
The Lopy is certified for [CE RED](/gitbook/assets/16-213298_expertise_pycom_lopy-1.0r.pdf) and [FCC ACC](/gitbook/assets/2090acc16_grant.pdf") [FCC BCC](/gitbook/assets/2090bcc16_grant.pdf) [FCC CCC](/gitbook/assets/2090ccc16_grant.pdf)
|
||||
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_LoPy_v2.pdf" target="_blank"> LoPy Datasheet </a>
|
||||
## Pinout
|
||||
|
||||
The pinout of the LoPy is available as a PDF File
|
||||
The pinout of the LoPy is available as a [PDF File](/gitbook/assets/lopy-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/lopy-pinout.pdf" target="_blank"> LoPy Pinout </a>
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -17,19 +17,21 @@ aliases:
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/lopy4/)
|
||||
|
||||
**Getting Started:** [Click Here](/gettingstarted/connection/lopy4)
|
||||
**Getting Started:** [Click Here](/gettingstarted/)
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the LoPy4 is available as a PDF File.
|
||||
The datasheet of the LoPy4 is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_LoPy4_v2.pdf)
|
||||
|
||||
The Lopy 4 is certified for [CE RED](/gitbook/assets/C03-B0-RED-final.pdf) and [FCC DSS](/gitbook/assets/Pycom-2AJMTLOPY4R-FCC-Grant-DSS.pdf)
|
||||
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-LoPy-4(8286-00027P)-20190523.pdf)
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_LoPy4_v2.pdf" target="_blank"> LoPy4 Datasheet </a>
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the LoPy4 is available as a PDF File
|
||||
The pinout of the LoPy4 is available as a [PDF File](/gitbook/assets/lopy4-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/lopy4-pinout.pdf" target="_blank"> LoPy4 Pinout </a>
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -17,21 +17,18 @@ aliases:
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/sipy)
|
||||
|
||||
**Getting Started:** [Click Here](/gettingstarted/connection/sipy)
|
||||
**Getting Started:** [Click Here](/gettingstarted/)
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the SiPy is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_SiPy_v2.pdf)
|
||||
|
||||
|
||||
The datasheet of the SiPy is available as a PDF File.
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_SiPy_v2.pdf" target="_blank"> SiPy Datasheet </a>
|
||||
The Sipy is certified for [CE RED](gitbook/assets/17-210585_expertise_sipy_sipy-1.0.pdf)
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the SiPy is available as a PDF File
|
||||
The pinout of the SiPy is available as a [PDF File](/gitbook/assets/sipy-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/sipy-pinout.pdf" target="_blank"> SiPy Pinout </a>
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -16,21 +16,18 @@ aliases:
|
||||
|
||||
**Store**: Discontinued, See [WiPy3](../wipy3)
|
||||
|
||||
**Getting Started:** [Click Here](/gettingstarted/connection/wipy)
|
||||
**Getting Started:** [Click Here](/gettingstarted/)
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the WiPy2 is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_WiPy2.0_v2.pdf)
|
||||
|
||||
The Wipy 2 is certified for [CE RED](/gitbook/assets/16-213297_expertise_pycom_wipy-2.0r.pdf) and [FCC ACC](/gitbook/assets/2091acc16_grant.pdf) [FCC BCC](/gitbook/assets/2091bcc16_grant.pdf)
|
||||
|
||||
The datasheet of the WiPy2 is available as a PDF File.
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_WiPy2.0_v2.pdf" target="_blank"> WiPy 2 Datasheet </a>
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the WiPy2 is available as a PDF File.
|
||||
|
||||
<a href="/gitbook/assets/wipy2-pinout.pdf" target="_blank"> WiPy 2 Pinout </a>
|
||||
The pinout of the WiPy2 is available as a [PDF File](/gitbook/assets/wipy2-pinout.pdf)
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -16,19 +16,20 @@ aliases:
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/wipy-3-0/)
|
||||
|
||||
**Getting Started:** [Click Here](/gettingstarted/connection/wipy)
|
||||
**Getting Started:** [Click Here](/gettingstarted/)
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the WiPy3 is available as a PDF File.
|
||||
The datasheet of the WiPy3 is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_WiPy3.0_v2.pdf)
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_WiPy3.0_v2.pdf" target="_blank"> WiPy3 Datasheet </a>
|
||||
The Wipy 3 is certified for [CE RED](/gitbook/assets/17-214126_red-certificate_pycom_wipy-3.0.pdf)
|
||||
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS for WiPy 3(8286-00026P)-20190523.pdf)
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the WiPy3 is available as a PDF File.
|
||||
The pinout of the WiPy3 is available as a [PDF File](/gitbook/assets/wipy3-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/wipy3-pinout.pdf" target="_blank"> WiPy3 Pinout </a>
|
||||
|
||||

|
||||
|
||||
|
||||
16
content/datasheets/expansionboards/_index.md
Normal file
16
content/datasheets/expansionboards/_index.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: "Expansion Boards and Shields"
|
||||
aliases:
|
||||
---
|
||||
|
||||
This section contains all of the datasheets for the Pycom Expansion Boards and Shields. This includes the Expansion Board, Pytrack, Pysense and Deep Sleep Shield.
|
||||
|
||||
|
||||
* [Pygate](../expansionboards/pygate/)
|
||||
* [Pysense](../expansionboards/pysense/)
|
||||
* [Pysense 2.0 X](../expansionboards/pysense2/)
|
||||
* [Pytrack](../expansionboards/pytrack/)
|
||||
* [Pytrack 2.0 X](../expansionboards/pytrack2/)
|
||||
* [Pyscan](../expansionboards/pyscan/)
|
||||
* [Expansion 2](../expansionboards/expansion2/)
|
||||
* [Expansion 3](../expansionboards/expansion3/)
|
||||
@@ -6,21 +6,22 @@ aliases:
|
||||
- product-info/boards/expansion2
|
||||
- chapter/datasheets/boards/expansion2
|
||||
---
|
||||
**Store**: Discontinued, See [Expansionboard 3.0](../expansion3)
|
||||
|
||||

|
||||
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the Expansion Board is available as a PDF File.
|
||||
The datasheet of the Expansion Board is available as a [PDF File](/gitbook/assets/expansion2-specsheet.pdf)
|
||||
|
||||
<a href="/gitbook/assets/expansion2-specsheet.pdf" target="_blank">Expansion Board 2 Datasheet </a>
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-Expansion-Board(8286-00033P)-20190523.pdf)
|
||||
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the Expansion Board is available as a PDF File
|
||||
The pinout of the Expansion Board is available as a [PDF File](/gitbook/assets/expansion2-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/expansion2-pinout.pdf" target="_blank"> Expansion Board 2 Pinout </a>
|
||||
|
||||

|
||||
|
||||
@@ -6,20 +6,27 @@ aliases:
|
||||
- product-info/boards/expansion3
|
||||
- chapter/datasheets/boards/expansion3
|
||||
---
|
||||
**Store**: [Buy Here](https://pycom.io/product/expansion-board-3-0/)
|
||||
|
||||
## 
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the Expansion Board is available as a PDF File.
|
||||
The datasheet of the Expansion Board is available as a [PDF File](/gitbook/assets/expansion3-specsheet-1.pdf)
|
||||
|
||||
<a href="/gitbook/assets/expansion3-specsheet-1.pdf" target="_blank"> Expansion Board Datasheet </a>
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-Expansion-Board(8286-00033P)-20190523.pdf)
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the Expansion Board is available as a PDF File
|
||||
The pinout of the Expansion Board is available as a [PDF File](/gitbook/assets/expansion3-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/expansion3-pinout.pdf" target="_blank"> Expansion Board 3 Pinout </a>
|
||||
The expansion board contains 6 headers labeled:
|
||||
- TX: TX UART communication of the development board
|
||||
- RX: RX UART communication of the development board
|
||||
- RUN
|
||||
- BAT
|
||||
- LED
|
||||
- CHG
|
||||
|
||||

|
||||
|
||||
47
content/datasheets/expansionboards/pygate.md
Normal file
47
content/datasheets/expansionboards/pygate.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: "Pygate"
|
||||
aliases:
|
||||
- datasheets/boards/pygate.html
|
||||
- datasheets/boards/pygate.md
|
||||
- product-info/boards/pygate
|
||||
- chapter/datasheets/boards/pygate
|
||||
---
|
||||
**Store**: [Buy Here](https://pycom.io/product/pygate/)
|
||||
|
||||
## 
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the Pygate Board is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_Pygate_v1.pdf).
|
||||
|
||||
|
||||
## Case Assembly
|
||||
|
||||
Assembly of the Pygate case is very easy, and exists of a bottom half, a top half, 4 screws and 2 button inserts.
|
||||
|
||||
First, insert the Pygate board, without a -py module into the bottom half of the case. You can recognize the bottom half as the part without writing and cutouts for the SD card holder and USB-C connector. Orient the Pygate board such that the USB connector lines up with the similar hole in the case. Once the board is flat in the case, insert the button extenders on the buttons. The long flat side should be inserted in the similarly sized holder in the case.
|
||||
|
||||
>Note: The button extender will only go in one way, do not force it into place!
|
||||
|
||||
Insert the -py module into the Pygate board, with the reset button and RGB LED over the USB connector. If applicable, insert the PoE adapter into the correct slot, with the ethernet port facing the other way compared to the USB-C connector. Attach the LoRa antenna connector wire to the top half of the Pygate case using one of the four cutouts, with the SMA connector facing outwards, using the included nuts. Then, attach the LoRa antenna to the Pygate board's U.FL antenna connector in the top right. Now connect any other peripherals as you wish.
|
||||
|
||||
>The Pygate case supports up to 4 antennas and has space for a small battery when not using the PoE adapter board.
|
||||
|
||||
If applicable, remove the ethernet port cutout from the top shell of the case.
|
||||
Carefully position the top shell over the bottom shell, and screw in the 4 screws from the bottom. Do not overtighten the screws, as that could break the case and renders the buttons unusable.
|
||||
Now, attach the antenna(s) to the SMA connector(s) and upload code!
|
||||
|
||||
>On the back, there are two screw inserts to attach the case to a wall.
|
||||
|
||||

|
||||
The case will also work for the regular expansion board and has the SD card holder accessible from the outside.
|
||||
|
||||
|
||||
## Battery Charger
|
||||
|
||||
The Pygate features a single cell Li-Ion/Li-Po charger. When the board is being powered via the USB-C connector, the Pygate will charge the battery \(if connected\).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
* If PIC stays in bootloader mode, the [`dfu-util` update](/pytrackpysense/installation/firmware) should be performed
|
||||
|
||||
@@ -6,14 +6,15 @@ aliases:
|
||||
- product-info/boards/pyscan
|
||||
- chapter/datasheets/boards/pyscan
|
||||
---
|
||||
**Store**: [Buy Here](https://pycom.io/product/pyscan/)
|
||||
|
||||

|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the Pyscan is available as a PDF File.
|
||||
The datasheet of the Pyscan is available as a [PDF File](/gitbook/assets/pyscan-specsheet.pdf)
|
||||
|
||||
<a href="/gitbook/assets/pyscan-specsheet.pdf" target="_blank"> Pyscan Datasheet </a>
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-Pyscan(8286-00031P)-20190523.pdf)
|
||||
|
||||
## Pyscan Libraries
|
||||
|
||||
@@ -6,20 +6,20 @@ aliases:
|
||||
- product-info/boards/pysense
|
||||
- chapter/datasheets/boards/pysense
|
||||
---
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/pysense/)
|
||||

|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the Pysense is available as a PDF File.
|
||||
The datasheet of the Pysense is available as a [PDF File](/gitbook/assets/pysense-specsheet.pdf)
|
||||
|
||||
<a href="/gitbook/assets/pysense-specsheet.pdf" target="_blank"> Pysense Datasheet </a>
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-Pysense(8286-00030P)-20190523.pdf)
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the Pysense is available as a PDF File
|
||||
The pinout of the Pysense is available as a [PDF File](/gitbook/assets/pysense-pinout.pdf)
|
||||
|
||||
|
||||
<a href="/gitbook/assets/pysense-pinout.pdf" target="_blank"> Pysense Pinout </a>
|
||||
|
||||

|
||||
|
||||
@@ -6,20 +6,21 @@ aliases:
|
||||
- product-info/boards/pytrack
|
||||
- chapter/datasheets/boards/pytrack
|
||||
---
|
||||
**Store**: [Buy Here](https://pycom.io/product/pytrack/)
|
||||
|
||||

|
||||
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the Pytrack is available as a PDF File.
|
||||
The datasheet of the Pytrack is available as a [PDF File](/gitbook/assets/pytrack-specsheet-1.pdf)
|
||||
|
||||
<a href="/gitbook/assets/pytrack-specsheet-1.pdf" target="_blank"> Pytrack Datasheet </a>
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-Pysense(8286-00030P)-20190523.pdf)
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the Pytrack is available as a PDF File
|
||||
The pinout of the Pytrack is available as a [PDF File](/gitbook/assets/pytrack-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/pytrack-pinout.pdf" target="_blank"> Pytrack Pinout </a>
|
||||
|
||||

|
||||
|
||||
@@ -7,12 +7,9 @@ aliases:
|
||||
|
||||
This section contains all of the datasheets for the Pycom OEM Devices. This includes the W01, L01, L04, and G01.
|
||||
|
||||
{{% refname "w01.md" %}}
|
||||
|
||||
{{% refname "l01.md" %}}
|
||||
|
||||
{{% refname "g01.md" %}}
|
||||
|
||||
{{% refname "l01\_reference.md" %}}
|
||||
|
||||
{{% refname "universal\_reference.md" %}}
|
||||
- [W01](/datasheets/oem/w01/)
|
||||
- [L01](/datasheets/oem/l01/)
|
||||
- [L01](/datasheets/oem/l01_reference/)
|
||||
- [L04](/datasheets/oem/l04/)
|
||||
- [Baseboard](datasheets/oem/universal_reference/)
|
||||
- [Deepsleep](datasheets/oem/deepsleep/)
|
||||
@@ -7,27 +7,30 @@ aliases:
|
||||
- chapter/datasheets/oem/g01
|
||||
---
|
||||
|
||||
## 
|
||||
## 
|
||||
|
||||
## Datasheet
|
||||
|
||||
The drawings for the G01 are available as a PDF File.
|
||||
The drawings for the G01 are available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_G01_v2.pdf)
|
||||
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_G01_v2.pdf" target="_blank"> G01 Datasheet </a>
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the G01 is available as a PDF File
|
||||
The pinout of the G01 is available as a [PDF File](/gitbook/assets/g01-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/g01-pinout.pdf" target="_blank"> G01 Pinout </a>
|
||||
The G01 is certified for [CE RED](/gitbook/assets/17-213357_red-certificate_pycom_g01-1.0.pdf) and [FCC DSS](/gitbook/assets/pycom-2ajmtg01r-fcc-grant-dss.pdf)
|
||||
[FCC DTS](/gitbook/assets/pycom-2ajmtg01r-fcc-grant-dts.pdf)
|
||||
[FCC TNB](/gitbook/assets/pycom-2ajmtg01r-fcc-grant-tnb.pdf)
|
||||
|
||||
[ROHS certification](/gitbook/assets/c03-b0-red-final.pdf)
|
||||
|
||||

|
||||
|
||||
## Drawings
|
||||
|
||||
The drawings for the G01 is available as a PDF File.
|
||||
The drawings for the G01 is available as a [PDF File](/gitbook/assets/g01-drawing.pdf)
|
||||
|
||||
<a href="/gitbook/assets/g01-drawing.pdf" target="_blank"> G01 Drawings </a>
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 \(TX1/RX1\), SPI \(CLK, MOSI, MISO\) and I2C \(SDA, SCL\) are defaults and can be changed via software.
|
||||
|
||||
@@ -11,23 +11,24 @@ aliases:
|
||||
|
||||
## Datasheet
|
||||
|
||||
The drawings for the L01 are available as a PDF File.
|
||||
The drawings for the L01 are available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_L01_v2.pdf)
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_L01_v2.pdf" target="_blank"> L01 Datasheet </a>
|
||||
The L01 is certified for [CE RED](gitbook/assets/17-213356_red-certificate_pycom_l01-1.0.pdf) and [FCC DSS](/gitbook/assets/172181413_aa_00_final.pdf)
|
||||
[FCC DTS](/gitbook/assets/172181414_aa_00_final.pdf) [FCC DAA](/gitbook/assets/172181411_aa_00_final.pdf)
|
||||
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-L01(f8217-00088P)-20190523.pdf)
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the L01 is available as a PDF File
|
||||
The pinout of the L01 is available as a [PDF File](/gitbook/assets/l01-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/l01-pinout.pdf" target="_blank"> L01 Pinout </a>
|
||||
|
||||

|
||||
|
||||
## Drawings
|
||||
|
||||
The drawings for the L01 is available as a PDF File.
|
||||
The drawings for the L01 is available as a [PDF File](/gitbook/assets/l01-drawing.pdf)
|
||||
|
||||
<a href="/gitbook/assets/l01-drawing.pdf" target="_blank"> L01 Drawing </a>
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 \(TX1/RX1\), SPI \(CLK, MOSI, MISO\) and I2C \(SDA, SCL\) are defaults and can be changed via software.
|
||||
|
||||
@@ -11,23 +11,22 @@ aliases:
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the L04 is available as a PDF File.
|
||||
The datasheet of the L04 is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_L04_v2.pdf)
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_L04_v2.pdf" target="_blank"> L04 Datasheet </a>
|
||||
The L04 is certified for [see L01](../l01/)
|
||||
|
||||
[ROHS certification](/gitbook/assets/RoHs_declarations/RoHS-for-L04(8286-00032P)-20190523.pdf)
|
||||
|
||||
## Pinout
|
||||
|
||||
The pinout of the L04 is available as a PDF File
|
||||
|
||||
<a href="/gitbook/assets/l04-pinout.pdf" target="_blank"> L04 Pinout </a>
|
||||
The pinout of the L04 is available as a [PDF File](/gitbook/assets/l04-pinout.pdf)
|
||||
|
||||

|
||||
|
||||
## Drawings
|
||||
|
||||
The drawings for the L04 are available as a PDF File.
|
||||
The drawings for the L04 are available as a [PDF File](/gitbook/assets/l04-drawing.pdf)
|
||||
|
||||
<a href="/gitbook/assets/l04-drawing.pdf" target="_blank"> L04 Drawings </a>
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 \(TX1/RX1\), SPI \(CLK, MOSI, MISO\) and I2C \(SDA, SCL\) are defaults and can be changed via software.
|
||||
|
||||
@@ -11,22 +11,19 @@ aliases:
|
||||
|
||||
## Datasheet
|
||||
|
||||
The datasheet of the W01 is available as a PDF File.
|
||||
The datasheet of the W01 is available as a [PDF File](/gitbook/assets/specsheets/Pycom_002_Specsheets_W01_v2.pdf)
|
||||
|
||||
<a href="/gitbook/assets/specsheets/Pycom_002_Specsheets_W01_v2.pdf" target="_blank"> W01 Datasheet </a>
|
||||
## Pinout
|
||||
|
||||
The pinout of the W01 is available as a PDF File
|
||||
The pinout of the W01 is available as a [PDF File](/gitbook/assets/w01-pinout.pdf)
|
||||
|
||||
<a href="/gitbook/assets/w01-pinout.pdf" target="_blank"> W01 Pinout </a>
|
||||
|
||||

|
||||
|
||||
## Drawings
|
||||
|
||||
The drawings for the W01 are available as a PDF File.
|
||||
The drawings for the W01 are available as a [PDF File](/gitbook/assets/w01-drawing.pdf)
|
||||
|
||||
<a href="/gitbook/assets/w01-drawing.pdf" target="_blank"> W01 Drawings </a>
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 \(TX1/RX1\), SPI \(CLK, MOSI, MISO\) and I2C \(SDA, SCL\) are defaults and can be changed via software.
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: documents
|
||||
disable_breadcrumbs: true
|
||||
---
|
||||
@@ -1,116 +0,0 @@
|
||||
---
|
||||
title: "Certificates"
|
||||
aliases:
|
||||
- documents/certificates.html
|
||||
- documents/certificates.md
|
||||
---
|
||||
|
||||
## CE RED
|
||||
|
||||
### Development Boards
|
||||
|
||||
#### LoPy
|
||||
|
||||
<p><a href="/gitbook/assets/16-213298_expertise_pycom_lopy-1.0r.pdf" target="_blank">LoPy CE RED Certificate</a></p>
|
||||
|
||||
#### LoPy 4.0
|
||||
|
||||
<p><a href="/gitbook/assets/C03-B0-RED-final.pdf" target="_blank">LoPy 4.0 CE RED Certificate</a></p>
|
||||
|
||||
#### WiPy 2.0
|
||||
|
||||
<p><a href="/gitbook/assets/16-213297_expertise_pycom_wipy-2.0r.pdf" target="_blank">WiPy 2.0 CE RED Certificate</a></p>
|
||||
|
||||
#### WiPy 3.0
|
||||
|
||||
<p><a href="/gitbook/assets/17-214126_red-certificate_pycom_wipy-3.0.pdf" target="_blank">WiPy 3.0 CE RED Certificate</a></p>
|
||||
|
||||
#### SiPy
|
||||
|
||||
<p><a href="/gitbook/assets/17-210585_expertise_sipy_sipy-1.0.pdf" target="_blank">SiPy CE RED Certificate</a></p>
|
||||
|
||||
#### GPy
|
||||
|
||||
<p><a href="/gitbook/assets/c03-b0-red-final-gpy.pdf" target="_blank">GPy CE RED Certificate</a></p>
|
||||
|
||||
#### FiPy
|
||||
|
||||
<p><a href="/gitbook/assets/fipy_c03-b0-red-final.pdf" target="_blank">FiPy CE RED Certificate</a></p>
|
||||
|
||||
### OEM Modules
|
||||
|
||||
#### L01
|
||||
|
||||
<p><a href="/gitbook/assets/17-213356_red-certificate_pycom_l01-1.0.pdf" target="_blank">L01 CE RED Certificate</a></p>
|
||||
|
||||
#### W01
|
||||
|
||||
<p><a href="/gitbook/assets/17-213357_red-certificate_pycom_w01-1.0.pdf" target="_blank">W01 CE RED Certificate</a></p>
|
||||
|
||||
#### G01
|
||||
|
||||
<p><a href="/gitbook/assets/c03-b0-red-final.pdf" target="_blank">G01 CE RED Certificate</a></p>
|
||||
|
||||
## FCC
|
||||
|
||||
### Development Boards
|
||||
|
||||
#### LoPy
|
||||
|
||||
<p><a href="/gitbook/assets/2090acc16_grant.pdf" target="_blank">LoPy FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/2090bcc16_grant.pdf" target="_blank">LoPy FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/2090ccc16_grant.pdf" target="_blank">LoPy FCC Certificate</a></p>
|
||||
|
||||
#### LoPy 4.0
|
||||
|
||||
<p><a href="/gitbook/assets/Pycom-2AJMTLOPY4R-FCC-Grant-DSS.pdf" target="_blank">LoPy 4.0 FCC Certificate</a></p>
|
||||
|
||||
#### WiPy 2.0
|
||||
|
||||
<p><a href="/gitbook/assets/2091acc16_grant.pdf" target="_blank">WiPy 2.0 FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/2091bcc16_grant.pdf" target="_blank">WiPy 2.0 FCC Certificate</a></p>
|
||||
|
||||
#### GPy
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtgpy01r-fcc-grant-dss.pdf" target="_blank">GPy FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtgpy01r-fcc-grant-dts.pdf" target="_blank">GPy FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtgpy01r-fcc-grant-tnb.pdf" target="_blank">GPy FCC Certificate</a></p>
|
||||
|
||||
#### FiPy
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtfipy01r-fcc-grant-dss.pdf" target="_blank">FiPy FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtfipy01r-fcc-grant-dts.pdf" target="_blank">FiPy FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtfipy01r-fcc-grant-dxx.pdf" target="_blank">FiPy FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtfipy01r-fcc-grant-tnb.pdf" target="_blank">FiPy FCC Certificate</a></p>
|
||||
|
||||
### OEM Modules
|
||||
|
||||
#### L01
|
||||
|
||||
<p><a href="/gitbook/assets/172181411_aa_00_final.pdf" target="_blank">L01 FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/172181413_aa_00_final.pdf" target="_blank">L01 FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/172181414_aa_00_final.pdf" target="_blank">L01 FCC Certificate</a></p>
|
||||
|
||||
#### W01
|
||||
|
||||
<p><a href="/gitbook/assets/172181407_aa_00_final.pdf" target="_blank">W01 FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/172181408_aa_00_final.pdf" target="_blank">W01 FCC Certificate</a></p>
|
||||
|
||||
#### G01
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtg01r-fcc-grant-dss.pdf" target="_blank">G01 FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtg01r-fcc-grant-dts.pdf" target="_blank">G01 FCC Certificate</a></p>
|
||||
|
||||
<p><a href="/gitbook/assets/pycom-2ajmtg01r-fcc-grant-tnb.pdf" target="_blank">G01 FCC Certificate</a></p>
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
title: "RoHS declarations"
|
||||
aliases:
|
||||
- documents/rohs.html
|
||||
- documents/rohs.md
|
||||
---
|
||||
|
||||
## RoHS declarations
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### LoPy 4.0
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for LoPy 4(8286-00027P)-20190523.pdf" target="_blank">LoPy 4.0</a></p>
|
||||
|
||||
#### WiPy 3.0
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for WiPy 3(8286-00026P)-20190523.pdf" target="_blank">WiPy 3.0</a></p>
|
||||
|
||||
#### GPy
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for GPy(8217-00090P)-20190523.pdf" target="_blank">GPy</a></p>
|
||||
|
||||
#### FiPy
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for FiPy(8217-00091P)-20190523.pdf" target="_blank">FiPy</a></p>
|
||||
|
||||
#### L01
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for L01(f8217-00088P)-20190523.pdf" target="_blank">L01</a></p>
|
||||
|
||||
#### W01
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for W01(8286-00028P)-20190523.pdf" target="_blank">W01</a></p>
|
||||
|
||||
#### G01
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for G01(8217-00087P)-20190523.pdf" target="_blank">G01</a></p>
|
||||
|
||||
#### L04
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for L04(8286-00032P)-20190523.pdf" target="_blank">L04</a></p>
|
||||
|
||||
#### Expansion Board
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for Expansion Board(8286-00033P)-20190523.pdf" target="_blank">Expansion board</a></p>
|
||||
|
||||
#### Universal OEM reference board
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for Universal OEM reference board(8286-00034P)-20190523.pdf" target="_blank">Universal OEM reference board</a></p>
|
||||
|
||||
#### Pysense
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for Pysense(8286-00030P)-20190523.pdf" target="_blank">Pysense</a></p>
|
||||
|
||||
#### Pytrack
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for Pytrack(8286-00029P)-20190523.pdf" target="_blank">Pytrack</a></p>
|
||||
|
||||
#### Pyscan
|
||||
|
||||
<p><a href="/gitbook/assets/RoHs_declarations/RoHS for Pyscan(8286-00031P)-20190523.pdf" target="_blank">Pyscan</a></p>
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: ""
|
||||
title: "Introduction"
|
||||
aliases:
|
||||
- /tutorial/introduction
|
||||
- /tutorial/introduction.md
|
||||
- firmwareapi/expansionboards/_index.html
|
||||
- firmwareapi/expansionboards/_index.html
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
---
|
||||
title: "Installing Libraries"
|
||||
title: "Product info & Datasheets"
|
||||
aliases:
|
||||
- pytrackpysense/installation/libraries.html
|
||||
- pytrackpysense/installation/libraries.md
|
||||
- chapter/pytrackpysense/installation/libraries
|
||||
- firmwareapi/introduction.html
|
||||
- firmwareapi/introduction.md
|
||||
- product-info
|
||||
- chapter/firmwareapi
|
||||
---
|
||||
|
||||
To utilise the sensors on the Pytrack and Pysense, Pycom has written libraries to make reading to/from the various sensors accessible via an API. These libraries reside at the Pycom GitHub repository and the latest versions can be found under the releases page.
|
||||
|
||||
[GitHub Repository](https://github.com/pycom/pycom-libraries)
|
||||
As the development for these devices are on going with additional features being added, every week, it is essential to ensure you frequently check for updates on the Pytrack/Pysense/Pyscan. As well as updating the device firmware, it is important to check the [GitHub repository](https://github.com/pycom/pycom-libraries) for the respective library files as they as also being updated, to include additional features/functionality.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that updated libraries are available for the Pytrack 2.0 X and Pysense 2.0 X in the pytrack-2 and pysense-2 directories on GitHub.
|
||||
These new libraries will allow you to use the new additional features.
|
||||
{{% /hint %}}
|
||||
|
||||
Download the repository as a `.zip` file, navigate to the correct device (Pysense/Pytrack), extract the files and then upload the desired files to the device in the instructions below.
|
||||
|
||||
## Uploading the Libraries to a Device
|
||||
|
||||
These libraries should be uploaded to a device (LoPy, SiPy, WiPy 3.0, etc.) in the same process as a standard MicroPython library. The various `.py` files should be placed into the `/lib` folder on the device. For example, if using the Pysense and the user wishes to enable the only Accelerometer and the Light Sensor, they should place the following `.py` files into the device's `/lib` folder:
|
||||
These libraries should be uploaded to a device (LoPy, SiPy, WiPy 3.0, etc.) in the same process as a standard MicroPython library. The various `.py` files should be placed into the `/lib` folder on the device.
|
||||
|
||||
Add as many or as few of the libraries that are required.
|
||||
|
||||
In addition to the Pysense or Pytrack specific libraries, for hardware version 1.x boards you also need to upload the `pycoproc.py` file from the `_lib/pycoproc_` folder inside the libraries archive. For the Pytrack 2.0 X and Pysense 2.0 X, the pycoproc.py file is included in the pytrack-2 and pysense-2 directories to avoid confusion over which library to use.
|
||||
|
||||
For example, if using the Pysense and the user wishes to enable the only Accelerometer and the Light Sensor, they should place the following `.py` files into the device's `/lib` folder:
|
||||
|
||||
```text
|
||||
- pysense.py
|
||||
@@ -27,10 +29,6 @@ These libraries should be uploaded to a device (LoPy, SiPy, WiPy 3.0, etc.) in t
|
||||
- LTR329ALS01.py
|
||||
```
|
||||
|
||||
Add as many or as few of the libraries that are required.
|
||||
|
||||
In addition to the Pysense or Pytrack specific libraries, for hardware version 1.x boards you also need to upload the `pycoproc.py` file from the `_lib/pycoproc_` folder inside the libraries archive. For the Pytrack 2.0 X and Pysense 2.0 X, the pycoproc.py file is included in the pytrack-2 and pysense-2 directories to avoid confusion over which library to use.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The Pytrack and Pysense boards behave the same as the Expansion Board. `Upload`, `Run` and upload code to Pycom modules via the Pymakr Plugin, in exactly the same process.
|
||||
{{% /hint %}}
|
||||
@@ -6,7 +6,9 @@ aliases:
|
||||
- chapter/firmwareapi/pycom/machine/pygate
|
||||
---
|
||||
|
||||
The Pygate is an 8-channel LoRaWAN gateway. Connect a WiPy, Gpy or LoPy4 board to the Pygate and flash the Pygate firmware. See the [Pygate tutorial](/tutorials/all/pygate) to get started.
|
||||
The Pygate is an 8-channel LoRaWAN gateway. Connect a WiPy, Gpy or LoPy4 board to the Pygate and flash the Pygate firmware. See the [Pygate tutorial](/tutorials/expansionboards/pygate) to get started.
|
||||
|
||||
>Note: Make sure to update the firmware of the device to the pygate version in order to access the functions below.
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -1,35 +1,152 @@
|
||||
---
|
||||
title: ""
|
||||
title: "Getting Started"
|
||||
aliases:
|
||||
- gettingstarted/introduction.html
|
||||
- gettingstarted/introduction.md
|
||||
- chapter/gettingstarted
|
||||
- getting-started
|
||||
- gettingstarted/introduction
|
||||
- gettingstarted/gettingstarted
|
||||
- chapter/gettingstarted/introduction
|
||||
disable_breadcrumbs: true
|
||||
---
|
||||
|
||||
So, you've decided to order a Pycom development module. Firstly we would like to congratulate you in making an excellent decision. If you haven't yet placed your order we highly recommend you check out the [products](../products) page before you place your order to ensure you know which accessories you might require.
|
||||
Welcome to the getting started guide for your device!
|
||||
In the following guide, we will explain the basic process to get started using your Pycom products.
|
||||
|
||||

|
||||
1. [Setting up the hardware](#step-1-setting-up-the-hardware)
|
||||
2. [Setting up your computer](#step-2-setting-up-your-computer)
|
||||
3. [Programming the module](#step-3-programming-your-module)
|
||||
|
||||
## [Step 1: Setting up the hardware](connection/)
|
||||
|
||||
In the first part of this getting started guide, we will take you through setting up your device. Firstly we will cover how to connect the module to your computer either via USB or WiFi. Secondly we will explain how to connect various accessories such as antennas or SIM cards to your module.
|
||||
<!--  -->
|
||||
|
||||
## [Step 2: Setting up your computer](installation/)
|
||||
# Step 1: Setting up the hardware
|
||||
|
||||
Now that your module is successfully connected, you will need to install some software on your computer to interface with it. The second part of this guide will guide you through installing drivers; performing firmware updates for your module/accessories to ensure you have the most stable and feature packed version; and how to setup the software use to program the device.
|
||||
Congratulations on your Pycom module! In the first part of this getting started guide, we will take you through setting up your device. Firstly we will cover how to connect the module to your computer via USB.
|
||||
|
||||
## [Step 3: Using your module](programming/)
|
||||
#### Connect your board to your computer through USB
|
||||
|
||||
Now that you have a connected module and all the required software installed it is time to begin programming your device. This part of the guide will get you started with a basic example and point you in the right direction for getting your device connected to your chosen network.
|
||||
This step works the same for all our development boards and expansion boards. Insert your development board (Lopy, Wipy, etc.) into the expansion board (Pytrack, Pysense, etc.) with the reset button and RGB LED above the USB connector like shown below.Connect an USB cable to the USB port and your computer. Now, you can talk to your device through USB, but we still need some software to upload your first program!
|
||||
|
||||
## [Step 4: Connecting to a network](registration/)
|
||||

|
||||
|
||||
Now that you familiar with programming your device you will no doubt be keen to get it connected to one of the advertised wireless networks. This usually requires some registration. This step will detail how to get registered and connected to various wireless networks.
|
||||
>Note: If you do not have an expansion board, you are able to use a [USB-Serial converter](/gettinstarted/programming/usbserial/) or [WiFi](/gettingstarted/programming/ftp/) to connect.
|
||||
|
||||
# Step 2: Setting up your computer
|
||||
|
||||
Now that your module is successfully connected, you will need to install some software on your computer to interface with it. For this, we use Pymakr, a plugin for both Visual Studio Code or Atom IDE. Through one of the environments, we can connect to the board and talk python! Follow the link below for the installation instructions:
|
||||
|
||||
- [Atom](/pymakr/software/atom/)
|
||||
|
||||
- [VS Code](/pymakr/software/vscode/)
|
||||
|
||||
# Step 3: Programming your module
|
||||
|
||||
Now that you have a connected module and all the required software installed it is time to begin programming your device!
|
||||
|
||||
In this first example, we will make the on-board RGB LED flash different colors.
|
||||
### Creating a project in Pymakr
|
||||
|
||||
1. Firstly you will need to create a new, empty, directory on your computer.
|
||||
|
||||
For this example we will create one called `RGB-Blink`.
|
||||
|
||||
2. Next you will need to open either Atom or Visual Studio Code depending on
|
||||
|
||||
which you setup previously.
|
||||
|
||||
3. Once the text editor has loaded you will need to click `File` > `Open`, and open the directory you created in step 1
|
||||
|
||||
{{% hint style="info" %}}
|
||||
You can navigate through this guide using the arrow buttons at the bottom of the page.
|
||||
If you are using Atom, it is important to check at this point that Atom has successfully identified the project. The name of the directory you created in step 1 (`RGB-Blink` in this case) should be shown in the Pymakr pane like so:
|
||||
|
||||

|
||||
|
||||
If this is not the case you can press `alt-ctrl-r` on Windows/Linux or `ctrl-alt-cmd-l` on macOS, in order to reload Atom and fix the issue.
|
||||
{{% /hint %}}
|
||||
|
||||
4. Now that you have created a poject, we need to add some files. A standard MicroPython project will have a `lib` folder for additional libraries, and two python files: `main.py` and `boot.py`.
|
||||
|
||||
* `main.py` This script runs directly after `boot.py` and should contain the main code you wish to run on your device.
|
||||
|
||||
* `boot.py` This is the first script that runs on your module when it turns on. This is often used to connect a module to a network without cluttering up the `main.py` file. As a beginner you generally do not need to use a `boot.py`.
|
||||
|
||||
* It is often a good idea to split out re-usable code into libraries. If you want to create or use libraries created by others, you will need to create a `lib` directory and put the library files in this. It is important that you put `.py` files directly into `lib` rather than creating a directory tree. By default MicroPython will not detect any libraries within sub-directories.
|
||||
|
||||
Your file structure should look something like this:
|
||||
![]()
|
||||
|
||||
### Controlling the on-board RGB LED
|
||||
|
||||
Now that you have setup and configured your project, we can move on to programming your module. The first thing we will need to do is import some libraries in order to interact with the on-board LED. The Pycom firmware comes with a large amount of libraries for standard functionality built-in. You can find out more about these in the [API documentation](/firmwareapi/introduction). For this example you will need to open the `main.py` file and add the following code:
|
||||
|
||||
```python
|
||||
import pycom
|
||||
import time
|
||||
```
|
||||
|
||||
This will import two libraries, `Pycom` which is responsible for Pycom specific features, such as the on-board LED and `time` which is a standard library used timing and delays.
|
||||
|
||||
You may have noticed that when you power up your Pycom module, the on-board LED blinks blue on a regular basis. This "heartbeat" is used as a way of know that your module has powered up and started correctly. Before we can change the colour of this LED we need to disable this heart beat. Below your imports you will need to add the following:
|
||||
|
||||
|
||||
```python
|
||||
pycom.heartbeat(False)
|
||||
```
|
||||
|
||||
|
||||
Now it's time to test your code. On the Pymakr pane/bottom of the window you will see a `run` button. (If you haven't connected to your device yet, you will need to do that first). When you click the run button, the code in the currently open file will be executed on the device, but it won't copy it to the device. After running this code, you should see that that on-board LED stops blinking blue.
|
||||
|
||||
Now that we can confirm the device is connected and Pymakr is able to run code on it, we can complete our script to blink the LED like so:
|
||||
|
||||
```python
|
||||
import pycom
|
||||
import time
|
||||
|
||||
pycom.heartbeat(False)
|
||||
|
||||
while True:
|
||||
#colors in hexadecimal (0xRRGGBB)
|
||||
pycom.rgbled(0xFF0000) # Red
|
||||
time.sleep(1)
|
||||
pycom.rgbled(0x00FF00) # Green
|
||||
time.sleep(1)
|
||||
pycom.rgbled(0x0000FF) # Blue
|
||||
time.sleep(1)
|
||||
```
|
||||
|
||||
Once you run the above script, it will run forever. You will notice this prevents you from accessing the interactive REPL on the device (You cannot see the `>>>` prompt). In order to stop the script, click onto the Pymakr terminal, and press `ctrl-c` on your keyboard. This should stop the script running and return you to the interactive REPL.
|
||||
|
||||
Great work, the RGB-LED on your device should now blink in red, green and blue
|
||||
|
||||
### Uploading to your module
|
||||
|
||||
In the previous section we got code running on on your Pycom module using the `run` feature of Pymakr. This is useful for quick testing but has a couple of drawbacks. Firstly the code does not remain on the device permanently. If you reboot the device, it will no longer be running your code. Secondly, it will only work if you are using libraries built into the firmware. If you need any extra libraries, these need to be copied to the device first. This is where the `upload` feature comes in. If instead of `run` you click `upload`, Pymakr will upload all the files in the project (so long as their type is in the `sync_file_types` setting for your project). These then persist on your device even between reboots, and allows you to use libraries from the `lib` folder in your project.
|
||||
|
||||
|
||||
If you need to remove files from your device you can use the following commands:
|
||||
|
||||
```python
|
||||
import os
|
||||
os.fsformat('/flash')
|
||||
```
|
||||
|
||||
# Step 4: Further reading
|
||||
Now that we got the basic example running, you can continue with the links below.
|
||||
|
||||
* [More examples](/tutorials/)
|
||||
|
||||
* [Documentation](/firmwareapi/)
|
||||
|
||||
* [Get started using the FTP and Telnet Server](/gettingstarted/programming/ftp/)
|
||||
|
||||
* [Connect using Pybytes](/pybytes/gettingstarted/)
|
||||
|
||||
* [Registering with a network](/gettingstarted/network/)
|
||||
|
||||
* [Updating the firmware of your device](/firmwareupdate/)
|
||||
|
||||
|
||||
<!--## Step 4: (Optional) Connect through WiFi (Telnet & FTP)
|
||||
|
||||
On boot, your device will initialize an Access Point (AP), together with a FTP and telnet server, to which you can communicate over WiFi. This feature can be very useful if you do not have physical access to your device. Look in your WiFi connections for the SSID: `xxpy-wlan-####`. Connect to it using the default password: ` `. -->
|
||||
|
||||
0
content/gettingstarted/hardware/_index.md
Normal file
0
content/gettingstarted/hardware/_index.md
Normal file
@@ -1,11 +0,0 @@
|
||||
---
|
||||
title: "Software"
|
||||
aliases:
|
||||
- chapter/gettingstarted/installation/installingsoftware
|
||||
---
|
||||
To get you up and running, Pycom provides a suite of tools to assist with developing and programming your Pycom Devices:
|
||||
|
||||
1. [**Drivers:**](drivers) If you are using Microsoft Windows, you might be required to install drivers for our products to function correctly.
|
||||
2. [**Pycom firmware update utility:**](firmwaretool) This tool automates the process of upgrading the firmware of your Pycom device. It is important that you use this tool before you attempt to use your device. Not only to ensure you have the most stable and feature packed firmware, but also to ensure all the functionality of your device is enable. E.g. this tool also activates your two year free sigfox connectivity.
|
||||
3. [**Development Environment:**](pymakr) Pymakr is a plug-in for Atom and Visual Studio Code developed by Pycom to make development for Pycom modules super easy. It allows you to use your favourite text editor while simplifying the process of uploading code to the device.
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
title: "Software setup"
|
||||
aliases:
|
||||
- chapter/gettingstarted/installation/installingsoftware
|
||||
---
|
||||
|
||||
To get you up and running, Pycom provides a suite of tools to assist with developing and programming your Pycom Devices:
|
||||
|
||||
1. [**Drivers:**](drivers) If you are using Microsoft Windows, you might be required to install drivers for our products to function correctly.
|
||||
2. [**Pycom firmware update utility:**](firmwaretool) This tool automates the process of upgrading the firmware of your Pycom device. It is important that you use this tool before you attempt to use your device. Not only to ensure you have the most stable and feature packed firmware, but also to ensure all the functionality of your device is enable. E.g. this tool also activates your two year free sigfox connectivity.
|
||||
3. [**Development Environment:**](pymakr) Pymakr is a plug-in for Atom and Visual Studio Code developed by Pycom to make development for Pycom modules super easy. It allows you to use your favourite text editor while simplifying the process of uploading code to the device.
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
title: "Updating Firmware"
|
||||
aliases:
|
||||
- gettingstarted/installation/firmwaretool.html
|
||||
- gettingstarted/installation/firmwaretool.md
|
||||
- chapter/gettingstarted/installation/firmwaretool
|
||||
---
|
||||
|
||||
We strongly recommend you to upgrade your firmware to the latest version as we are constantly making improvements and adding new features to the devices.
|
||||
|
||||
Here are the download links to the update tool. Please download the appropriate one for your OS and follow the instructions on the screen.
|
||||
|
||||
* [Windows](https://software.pycom.io/findupgrade?product=pycom-firmware-updater&type=all&platform=win32&redirect=true)
|
||||
* [macOS](https://software.pycom.io/findupgrade?product=pycom-firmware-updater&type=all&platform=macos&redirect=true) (10.11 or Higher)
|
||||
* [Linux](https://software.pycom.io/findupgrade?product=pycom-firmware-updater&type=all&platform=unix&redirect=true) (requires `dialog` and `python-serial` package)
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Previous versions of firmware are available for download [**here**](/advance/downgrade).
|
||||
{{% /hint %}}
|
||||
|
||||
## Updating Device Firmware
|
||||
|
||||
The basic firmware upgrade procedure can be found below, please follow these steps carefully:
|
||||
|
||||
After you're done with upgrading, you can use the Pymakr Plugins to upload and run programs in your device.
|
||||
|
||||
|
||||
### Expansion Board 3.0
|
||||
|
||||
When using a Pysense/Pytrack/Pyscan/Expansion Board 3.0 to update your module you are not required to make a connection between "G23" and "GND", the Pysense/Pytrack/Pyscan/Expansion Board 3.0 will do this automatically.
|
||||
|
||||
1. Before connecting your module to a Pysense/Pytrack board, you should update the firmware on the Pysense/Pytrack. Instructions on how to do this can be found [here](/pytrackpysense/installation/firmware).
|
||||
2. Disconnect your device from your computer
|
||||
3. Insert module into Expansion Board
|
||||
4. Reconnect the board via USB to your computer
|
||||
5. Run the Firmware Upgrade tool
|
||||
|
||||

|
||||
|
||||
6. Disconnect the USB cable from the board and reconnect it, your device is now ready to use
|
||||
|
||||
### Expansion Board 2.0
|
||||
|
||||
1. Disconnect your device from your computer
|
||||
2. Insert module into the Expansion Board
|
||||
3. Connect a jumper cable or wire between `G23` and `GND`
|
||||
4. Reconnect the board via USB to your computer, this puts the device in ‘firmware update mode'.
|
||||
5. Run the Firmware Upgrade tool
|
||||
|
||||

|
||||
|
||||
6. Remove the `G23` to `GND` jumper cable/wire
|
||||
|
||||
7. Reboot the device (button or power off then on), your device is now ready to use
|
||||
|
||||
If you are having any issues, make sure the **TX and RX jumpers** are present on your Expansion Board, as the jumpers sometimes come loose in the box during transport. Without these jumpers, the updater will fail.
|
||||
|
||||
|
||||
After you're done with upgrading, you can use the Pymakr Plugins to upload and run programs in your device.
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: "Programming the modules"
|
||||
aliases:
|
||||
- chapter/gettingstarted/programming
|
||||
---
|
||||
|
||||
Now that you have connected and updated your pycom module and installed all the required software on your computer, we can begin programming your Pycom module.
|
||||
|
||||
If this is your first time using a Pycom module we highly recommend you read through the following pages:
|
||||
|
||||
* [**Introduction to MicroPython:**](micropython) This page will explain what Micropython is and its relation to Python.
|
||||
* [**MicroPython Examples:**](examples) We also recommend you browse these short MicroPython examples to familiarise yourself with its syntax. This is not meant as a comprehensive guide to MicroPython programming but rather a reference to those who already know programming. If you are new to python, or programming all together, we highly recommend searching the internet for Python tutorials. There are many very good tutorials available for free and the skills you learn will be easily transferable to our platform.
|
||||
* [**Your first Pymakr project:**](first-project) Once you understand what MicroPython is, this guide will take you through setting up your first Pymakr project to blink the on-board RGB LED. This guide will explain the structure of a MicroPython project as well as how to upload it to your module.
|
||||
|
||||
Once you are familiar with MicroPython and Pymakr, the recommended way of uploading code to your module, you can explore the pages below. These will discuss in greater detail the various mechanisms for running code on your device as well as how to recover it if something goes wrong.
|
||||
|
||||
* [**REPL:**](repl/) The REPL (Read Evaluate Print Loop) is an interactive terminal that allows you to type in and test your code directly on the device, just like interactive python interpreter. It can be accessed via [UART](repl/serial) or [Telnet](repl/telnet). This is accessed easiest by using Pymakr but if you wish to use other tools, this page will explain how.
|
||||
* [**FTP:**](ftp) All Pycom modules start up with a WiFi access point enabled, and a simple FTP server running on it. Once connected to the WiFi network, you can use FTP to transfer files over to your device wirelessly. This can be very useful if you do not have physical access to your device.
|
||||
* [**Safe Boot:**](safeboot) It is possible that some code you upload to your module will prevent you accessing the REPL or FTP server, preventing you from updating your scripts. This guide will detail how to safe boot your module and how to remove the offending scripts from it.
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: "Programming the modules"
|
||||
aliases:
|
||||
---
|
||||
|
||||
Now that you have connected and updated your pycom module and installed all the required software on your computer, we can begin programming your Pycom module.
|
||||
|
||||
If this is your first time using a Pycom module we highly recommend you read through the following pages:
|
||||
|
||||
* [**Introduction to MicroPython:**](micropython) This page will explain what Micropython is and its relation to Python.
|
||||
* [**MicroPython Examples:**](examples) We also recommend you browse these short MicroPython examples to familiarise yourself with its syntax. This is not meant as a comprehensive guide to MicroPython programming but rather a reference to those who already know programming. If you are new to python, or programming all together, we highly recommend searching the internet for Python tutorials. There are many very good tutorials available for free and the skills you learn will be easily transferable to our platform.
|
||||
* [**Your first Pymakr project:**](first-project) Once you understand what MicroPython is, this guide will take you through setting up your first Pymakr project to blink the on-board RGB LED. This guide will explain the structure of a MicroPython project as well as how to upload it to your module.
|
||||
|
||||
Once you are familiar with MicroPython and Pymakr, the recommended way of uploading code to your module, you can explore the pages below. These will discuss in greater detail the various mechanisms for running code on your device as well as how to recover it if something goes wrong.
|
||||
|
||||
* [**REPL:**](repl/) The REPL (Read Evaluate Print Loop) is an interactive terminal that allows you to type in and test your code directly on the device, just like interactive python interpreter. It can be accessed via [UART](repl/serial) or [Telnet](repl/telnet). This is accessed easiest by using Pymakr but if you wish to use other tools, this page will explain how.
|
||||
* [**FTP:**](ftp) All Pycom modules start up with a WiFi access point enabled, and a simple FTP server running on it. Once connected to the WiFi network, you can use FTP to transfer files over to your device wirelessly. This can be very useful if you do not have physical access to your device.
|
||||
* [**Safe Boot:**](safeboot) It is possible that some code you upload to your module will prevent you accessing the REPL or FTP server, preventing you from updating your scripts. This guide will detail how to safe boot your module and how to remove the offending scripts from it.
|
||||
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
---
|
||||
title: "Your first Pymakr project"
|
||||
aliases:
|
||||
- gettingstarted/programming/first-project.html
|
||||
- gettingstarted/programming/first-project.md
|
||||
- chapter/gettingstarted/programming/first-project
|
||||
---
|
||||
|
||||
This guide will take you through how to setup your first project with Pymakr and make the on-board RGB LED flash various colours.
|
||||
|
||||
## Creating a project in Pymakr
|
||||
|
||||
1. Firstly you will need to create a new, empty, directory on your computer.
|
||||
|
||||
For this example we will create one called `RGB-Blink`.
|
||||
|
||||
2. Next you will need to open either Atom or Visual Studio Code depending on
|
||||
|
||||
which you setup previously.
|
||||
|
||||
3. Once the text editor has loaded you will need to click `File` > `Open`, and open the directory you created in step 1
|
||||
|
||||
{{% hint style="info" %}}
|
||||
If you are using Atom, it is important to check at this point that Atom has successfully identified the project. The name of the directory you created in step 1 (`RGB-Blink` in this case) should be shown in the Pymakr pane like so:
|
||||
|
||||

|
||||
|
||||
If this is not the case you can press `alt-ctrl-r` on Windows/Linux or `ctrl-alt-cmd-l` on macOS, in order to reload Atom and fix the issue.
|
||||
{{% /hint %}}
|
||||
|
||||
4. Now that you have a project created, we need to add some files to it. A standard MicroPython project has the following structure:
|
||||
|
||||
```text
|
||||
RGB-Blink
|
||||
|-lib
|
||||
| |- some_library.py
|
||||
|-boot.py
|
||||
|-main.py
|
||||
```
|
||||
|
||||
* `boot.py` This is the first script that runs on your module when it
|
||||
|
||||
turns on. This is often used to connect a module to a WiFi network so that
|
||||
|
||||
Telnet and FTP can be used without connecting to the WiFi AP created by the
|
||||
|
||||
module and not cluttering up the `main.py` file. As a beginner you do not
|
||||
|
||||
need to use a `boot.py`.
|
||||
|
||||
* `main.py` This script runs directly after `boot.py` and should contain
|
||||
|
||||
the main code you wish to run on your device.
|
||||
|
||||
* `lib` It is often a good idea to split out re-usable code into libraries.
|
||||
|
||||
If you want to create or use libraries created by others, you will need to
|
||||
|
||||
create a `lib` directory and put the library files in this. It is important
|
||||
|
||||
that you put `.py` files directly into `lib` rather than creating a directory
|
||||
|
||||
tree. By default MicroPython will not detect any libraries within
|
||||
|
||||
sub-directories.
|
||||
|
||||
For this example, you will just need to create a `main.py` file.
|
||||
|
||||
Now that the project structure is setup, you may wish to configure project specific settings for Pymakr e.g. Which serial port to use. On Atom you need to click the `^` button on the Pymakr pane, then click `Project Settings`. On Visual Studio Code you need to click the `All commands` button on the bottom of the windows, then click `Pymakr > Project Settings`. This creates a file called `pymakr.conf` inside your project and populates it with default settings copied over from your global settings. A detailed explanation of these settings can be found [here](/pymakr/settings).
|
||||
|
||||
## Controlling the on-board LED
|
||||
|
||||
Now that you have setup and configured your project, we can move on to programming your module. The first thing we will need to do is import some libraries in order to interact with the on-board LED. The Pycom firmware comes with a large amount of libraries for standard functionality built-in. You can find out more about these in the [API documentation](/firmwareapi/introduction). For this example you will need to open the `main.py` file and add the following code:
|
||||
|
||||
```python
|
||||
|
||||
import pycom
|
||||
import time
|
||||
```
|
||||
|
||||
This will import two libraries, `Pycom` which is responsible for Pycom specific features, such as the on-board LED and `time` which is a standard library used timing and delays.
|
||||
|
||||
You may have noticed that when you power up your Pycom module, the on-board LED blinks blue on a regular basis. This "heartbeat" is used as a way of know that your module has powered up and started correctly. Before we can change the colour of this LED we need to disable this heart beat. Below your imports you will need to add the following:
|
||||
|
||||
```python
|
||||
|
||||
pycom.heartbeat(False)
|
||||
```
|
||||
|
||||
Now it's time to test your code. On the Pymakr pane/bottom of the window you will see a `run` button. (If you haven't connected to your device yet, you will need to do that first). When you click the run button, the code in the currently open file will be executed on the device, but it won't copy it to the device. After running this code, you should see that that on-board LED stops blinking blue.
|
||||
|
||||
Now that we can confirm the device is connected and Pymakr is able to run code on it, we can complete our script to blink the LED like so:
|
||||
|
||||
```python
|
||||
|
||||
import pycom
|
||||
import time
|
||||
|
||||
pycom.heartbeat(False)
|
||||
|
||||
while True:
|
||||
pycom.rgbled(0xFF0000) # Red
|
||||
time.sleep(1)
|
||||
pycom.rgbled(0x00FF00) # Green
|
||||
time.sleep(1)
|
||||
pycom.rgbled(0x0000FF) # Blue
|
||||
time.sleep(1)
|
||||
```
|
||||
|
||||
Once you run the above script, it will run forever. You will notice this prevents you from accessing the interactive REPL on the device (You cannot see the `>>>` prompt). In order to stop the script, click onto the Pymakr terminal, and press `ctrl-c` on your keyboard. This should stop the script running and return you to the interactive REPL.
|
||||
|
||||
## Uploading to your module
|
||||
|
||||
In the previous section we got code running on on your Pycom module using the `run` feature of Pymakr. This is useful for quick testing but has a couple of drawbacks. Firstly the code does not remain on the device permanently. If you reboot the device, it will no longer be running your code. Secondly, it will only work if you are using libraries built into the firmware. If you need any extra libraries, these need to be copied to the device first. This is where the `upload` feature comes in. If instead of `run` you click `upload`, Pymakr will upload all the files in the project (so long as their type is in the `sync_file_types` setting for your project). These then persist on your device even between reboots, and allows you to use libraries from the `lib` folder in your project.
|
||||
|
||||
If you need to remove files from your device you have two options, either connect via FTP and manage your files that way or format the device's internal flash like so:
|
||||
|
||||
```python
|
||||
|
||||
import os
|
||||
os.fsformat('/flash')
|
||||
```
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "FTP"
|
||||
title: "FTP & Telnet"
|
||||
aliases:
|
||||
- gettingstarted/programming/ftp.html
|
||||
- gettingstarted/programming/ftp.md
|
||||
@@ -8,13 +8,23 @@ aliases:
|
||||
|
||||
There is a small internal file system accessible with each Pycom device, called `/flash`. This is stored within the external serial flash memory. If a microSD card is also connected and mounted, it will be available as well. When the device starts up, it will always boot from the `boot.py` located in the `/flash` file system.
|
||||
|
||||
The first time(s), your device will create an Access Point (AP) you can connect to using your computer's WiFi.
|
||||
|
||||
By default, the device will create a WiFi access point with the following credentials:
|
||||
* SSID: `xxpy-wlan-####`
|
||||
* Password: `www.pycom.io`
|
||||
|
||||
>Note: This method of connection is not recommended for first time users. It is possible to lock yourself out of the device, requiring a USB connection.
|
||||
|
||||
Once connected to this network you will be able to access the telnet and FTP servers running on the LoPy4.
|
||||
|
||||
The file system is accessible via the native FTP server running on each Pycom device. Open an FTP client and connect to:
|
||||
|
||||
* url: `ftp://192.168.4.1`
|
||||
* username: `micro`
|
||||
* password: `python`
|
||||
|
||||
See [network.server](/firmwareapi/pycom/network/server) for information on how to change the defaults. The recommended clients are:
|
||||
See [network.server](/firmwareapi/pycom/network/server/) for information on how to change the defaults. The recommended clients are:
|
||||
|
||||
* macOS/Linux: default FTP client
|
||||
* Windows: Filezilla and FireFTP
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: "REPL"
|
||||
aliases:
|
||||
- chapter/gettingstarted/programming/repl
|
||||
---
|
||||
|
||||
REPL stands for Read Evaluate Print Loop, and is the name given to the interactive MicroPython prompt that is accessible on the Pycom devices. Using the REPL is by far the easiest way to test out Python code and run commands. You can use the REPL in addition to writing scripts in `main.py`.
|
||||
|
||||
The following pages will explain how to use the REPL with both Serial USB and Telnet connections.
|
||||
|
||||
The REPL includes the following features:
|
||||
|
||||
* Input history: use arrow up and arrow down to scroll through the history
|
||||
* Tab completion: press tab to auto-complete variables or module names
|
||||
* Halt any executing code: with `Ctrl-C`
|
||||
* Copy/paste code or output: `Ctrl-C` and `Ctrl-V`
|
||||
|
||||
{{% hint style="info" %}}
|
||||
There are a number of useful shortcuts for interacting with the MicroPython REPL. See below for the key combinations;
|
||||
|
||||
* `Ctrl-A` on a blank line will enter raw REPL mode. This is similar to permanent paste mode, except that characters are not echoed back.
|
||||
* `Ctrl-B` on a blank like goes to normal REPL mode.
|
||||
* `Ctrl-C` cancels any input, or interrupts the currently running code.
|
||||
* `Ctrl-D` on a blank line will do a soft reset.
|
||||
* `Ctrl-E` enters ‘paste mode' that allows you to copy and paste chunks of text. Exit this mode using `Ctrl-D`.
|
||||
* `Ctrl-F` performs a "safe-boot" of the device that prevents `boot.py` and `main.py` from executing
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
---
|
||||
title: "Telnet REPL"
|
||||
aliases:
|
||||
- gettingstarted/programming/repl/telnet.html
|
||||
- gettingstarted/programming/repl/telnet.md
|
||||
- chapter/gettingstarted/programming/repl/telnet
|
||||
---
|
||||
|
||||
Pycom devices also support a connection via `telnet`, using the device's on board WiFi/WLAN. Connect to the device's WiFi Access Point (AP) and using the following credentials to connect to the AP. The WiFi `SSID` will appear upon powering on a Pycom Device for the first time (e.g. `lopy-`). To re-enable this feature at a later date, please see [network.WLAN](/firmwareapi/pycom/network/wlan).
|
||||
|
||||
* password: `www.pycom.io`
|
||||
|
||||
## Telnet Server
|
||||
|
||||
Additionally, to use the MircoPython REPL over telnet, further authentication is required. The default credentials for the telnet server are:
|
||||
|
||||
* username: `micro`
|
||||
* password: `python`
|
||||
|
||||
See [network.server](/firmwareapi/pycom/network/server) for info on how to change the default authentication.
|
||||
|
||||
## All platforms
|
||||
|
||||
By far the easiest way to access the Telnet REPL is via the our [Pymakr plug-in](/pymakr/installation/) for Atom and Visual Studio Code. This adds a pane to the bottom of the editors that allows you to directly access the REPL and any output from the device. Detailed instructions on how to setup Pymakr can be found [here](/pymakr/installation/).
|
||||
|
||||
## macOS and Linux
|
||||
|
||||
Once the host machine is connected to the Pycom device's Access Point, a telnet connection may be opened from a terminal instance.
|
||||
|
||||
```bash
|
||||
$ telnet 192.168.4.1
|
||||
```
|
||||
|
||||
Upon connection, the telnet program will prompt for the `username` and `password` in the section above.
|
||||
|
||||
## Windows
|
||||
|
||||
A terminal emulator is needed to open a telnet connection from Windows; the easiest option is to download the free program, [PuTTY](http://www.putty.org/).
|
||||
|
||||
1. With PuTTY open, select telnet as connection type and leave the default port (`23`)
|
||||
2. Next enter the IP address of the Pycom device (e.g. `192.168.4.1`)
|
||||
3. Finally click `Open`
|
||||
|
||||
{{% hint style="info" %}}
|
||||
When using a Pycom device with a personal, home or office WiFi access point, the telnet connection may still be used. In this instance, the user will need to determine the Pycom device's local IP address and substitute this for `192.168.4.1`, referred to in the earlier sections.
|
||||
{{% /hint %}}
|
||||
@@ -33,7 +33,6 @@ The selection made during safe boot is not persistent, therefore after the next
|
||||
If problems occur within the filesystem or you wish to factory reset your module to remove your code, run following code in the REPL:
|
||||
|
||||
```python
|
||||
|
||||
>>> import os
|
||||
>>> os.fsformat('/flash')
|
||||
```
|
||||
@@ -47,7 +46,6 @@ Be aware, resetting the flash filesystem will delete all files inside the intern
|
||||
Pycom devices support both soft and hard resets. A soft reset clears the state of the MicroPython virtual machine but leaves hardware peripherals unaffected. To do a soft reset, press `Ctrl+D` on the REPL or from within a script, run:
|
||||
|
||||
```python
|
||||
|
||||
>>> import sys
|
||||
>>> sys.exit()
|
||||
```
|
||||
@@ -55,7 +53,6 @@ Pycom devices support both soft and hard resets. A soft reset clears the state o
|
||||
A hard reset is the same as performing a power cycle to the device. In order to hard reset the device, press the `reset` switch or run:
|
||||
|
||||
```python
|
||||
|
||||
>>> import machine
|
||||
>>> machine.reset()
|
||||
```
|
||||
|
||||
17
content/gettingstarted/programming/usbserial.md
Normal file
17
content/gettingstarted/programming/usbserial.md
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: "USB Serial Converter"
|
||||
aliases:
|
||||
- gettingstarted/hardware/usbserial.html
|
||||
- gettingstarted/hardware/usbserial.md
|
||||
- chapter/gettingstarted/hardware/usbserial
|
||||
---
|
||||
When you do not own an expansion board, it is possible to connect to your device using a USB to Serial adapter.
|
||||
> Note: We do not recommend this setup for beginners.
|
||||
|
||||
To connect to your device using a USB to Serial adapter, connect the following pins:
|
||||
|
||||

|
||||
>Note: Please ensure the signal and voltage level of your UART adapter does not exceed 3.3V. When possible, change the settings on your adapter.
|
||||
|
||||
* Connect the `RX` and `TX` of your USB converter to the `TX` and `RX` of the device respectively.
|
||||
* To put the device into bootloader mode to update the firmware, you will need to connect `P2` to `GND`. We recommend to connect a button for this.
|
||||
0
content/gettingstarted/software/_index.md
Normal file
0
content/gettingstarted/software/_index.md
Normal file
@@ -6,9 +6,7 @@ aliases:
|
||||
- chapter/pymakr/installation/atom
|
||||
---
|
||||
|
||||
For beginners, users getting started with MicroPython & Pycom as well as Atom text editor users, we recommend the **Pymakr Plugin for Atom**. This section will help you get started using the Atom Text Editor & Pymakr Plugin.
|
||||
|
||||
Please follow these steps to install the [Pymakr Plugin](https://atom.io/packages/pymakr):
|
||||
For beginners, users getting started with MicroPython & Pycom as well as Atom text editor users, we recommend the **Pymakr Plugin for Atom**. This section will help you get started using the Atom Text Editor & Pymakr Plugin.Please follow these steps to install the [Pymakr Plugin](https://atom.io/packages/pymakr):
|
||||
|
||||
1. [Download and install](https://atom.io) Atom. Ensure that you have Atom installed and open.
|
||||
|
||||
@@ -46,23 +44,4 @@ After installing the Pymakr Plugin, you need to take a few seconds to configure
|
||||
|
||||
These settings can also be applied on a per project basis by clicking `Settings` then `Project Settings`. This will open a JSON file which you can edit to enter your desired settings.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
This process is easiest with either a Pycom Expansion Board or a Pytrack/Pysense as the addresses are automatically selected. For external products such as FTDI USB Serial Cables, the serial address may need to be copied manually. Additionally, the reset button on the device may also need to be pressed before a connection message appears.
|
||||
{{% /hint %}}
|
||||
|
||||
## Connecting via Telnet
|
||||
|
||||
After installing the Pymakr Plugin, a device may be connected via the telnet interface. Please see the following steps:
|
||||
|
||||
1. Ensure that Pycom device is turned on
|
||||
2. Connect the host computer to the WiFi Access Point named after your board (the SSID will be as follows e.g. `lopy-wlan-xxxx`, `wipy-wlan-xxxx`, etc.). The password is `www.pycom.io`.
|
||||
3. Go to `Settings` > `Global Settings`
|
||||
|
||||

|
||||
|
||||
4. In `Devices Addresses (List)`, enter `192.168.4.1` as the address.
|
||||
|
||||

|
||||
|
||||
4. The default username and password are `micro` and `python`, respectively.
|
||||
5. Click `192.168.4.1` in the Devices List pane, Pymakr will now connect via telnet.
|
||||
>This process is easiest with either a Pycom Expansion Board or a Pytrack/Pysense as the addresses are automatically selected. For external products such as FTDI USB Serial Cables, the serial address may need to be copied manually. Additionally, the reset button on the device may also need to be pressed before a connection message appears.
|
||||
@@ -31,7 +31,7 @@ First navigate open the Windows start menu and search/navigate to \`Device Manag
|
||||
|
||||

|
||||
|
||||
Right click the device and select `Update Driver Software`.
|
||||
Right click the device and select "Update Driver Software".
|
||||
|
||||

|
||||
|
||||
@@ -47,7 +47,7 @@ Specify the folder in which the drivers are contained. If you haven't extracted
|
||||
|
||||

|
||||
|
||||
You may receive a warning, suggesting that Windows can't verify the publisher of this driver. Click `Install this driver software anyway` as this link points to our official driver.
|
||||
You may receive a warning, suggesting that Windows can't verify the publisher of this driver. Click "Install this driver software anyway" as this link points to our official driver.
|
||||
|
||||

|
||||
|
||||
@@ -55,6 +55,6 @@ If the installation was successful, you should now see a window specifying that
|
||||
|
||||

|
||||
|
||||
To confirm that the installation was correct, navigate back to the `Device Manager` and click the dropdown for other devices. The warning label should now be gone and Pytrack/Pysense should be installed.
|
||||
To confirm that the installation was correct, navigate back to the Device Manager and click the dropdown for other devices. The warning label should now be gone and Pytrack/Pysense should be installed.
|
||||
|
||||

|
||||
@@ -6,9 +6,9 @@ aliases:
|
||||
- chapter/pymakr/installation/vscode
|
||||
---
|
||||
|
||||
Pycom also supports Microsoft's Visual Studio Code IDE platform with the Pymakr Plugin. To download and install Visual Studio Code, navigate to [VS Code](https://code.visualstudio.com/).
|
||||
Pycom supports Microsoft's Visual Studio Code IDE platform with the Pymakr Plugin.
|
||||
|
||||
You will also need NodeJS installed on your PC. Please download the latest LTS version available [from the NodeJS website.](https://nodejs.org/)
|
||||
First [download and install Visual Studio Code](https://code.visualstudio.com/). You will also need NodeJS installed on your PC. Please download the latest LTS version available [from the NodeJS website.](https://nodejs.org/)
|
||||
|
||||
Please follow these steps to install the [Pymakr VSCode Extension](https://marketplace.visualstudio.com/items?itemName=pycom.Pymakr):
|
||||
|
||||
@@ -68,30 +68,4 @@ After installing the Pymakr Plugin, you need to take a few seconds to configure
|
||||
|
||||
These settings can also be applied on a per project basis by clicking `All commands` then `Pymakr > Project Settings`. This will open a JSON file which you can edit to enter your desired settings for the currently open project.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
This process is easiest with either a Pycom Expansion Board or a Pytrack/Pysense as the addresses are automatically selected. For external products such as FTDI USB Serial Cables, the serial address may need to be copied manually. Additionally, the reset button on the device may also need to be pressed before a connection message appears.
|
||||
{{% /hint %}}
|
||||
|
||||
## Connecting via Telnet
|
||||
|
||||
After installing the Pymakr Plugin, a device may be connected via the telnet interface. Please see the following steps:
|
||||
|
||||
1. Ensure that Pycom device is turned on
|
||||
2. Connect the host computer to the WiFi Access Point named after your board
|
||||
|
||||
(the SSID will be as follows e.g. `lopy-wlan-xxxx`, `wipy-wlan-xxxx`, etc.).
|
||||
|
||||
The password is `www.pycom.io`.
|
||||
|
||||
3. Follow the steps as above in the "Connecting via Serial USB" section but
|
||||
|
||||
enter `192.168.4.1` as the address.
|
||||
|
||||
4. The default username and password are `micro` and `python`,
|
||||
|
||||
respectively.
|
||||
|
||||
5. Finally close the JSON file, click `All commands`, then `Pymakr > Connect`,
|
||||
|
||||
Pymakr will now connect via telnet.
|
||||
|
||||
>Note: This process is easiest with either a Pycom Expansion Board or a Pytrack/Pysense as the addresses are automatically selected. For external products such as FTDI USB Serial Cables, the serial address may need to be copied manually. Additionally, the reset button on the device may also need to be pressed before a connection message appears.
|
||||
56
content/products/_index.md
Normal file
56
content/products/_index.md
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: "Pycom Products"
|
||||
aliases:
|
||||
disable_breadcrumbs: true
|
||||
---
|
||||
|
||||
At Pycom, we manufacture and sell several different categories:
|
||||
|
||||
* [Development Boards](#development-boards)
|
||||
* [Expansion Boards](#expansion-boards)
|
||||
* [OEM Modules](#oem-modules)
|
||||
* [Accessories](#accessories)
|
||||
|
||||
## Development boards
|
||||
|
||||
|
||||
Below you will find tables of all Pycom products. These tables illustrate the functionality of our various products, their compatibility with each other, as well as what accessories are required to utilise certain functionality.
|
||||
|
||||
| Module | WiFi | Bluetooth | LoRa | Sigfox | LTE CAT-M1NB-IoT |
|
||||
| :--- | :---: | :---: | :---: | :---: | :---: |
|
||||
| [WiPy 3.0](/datasheets/development/wipy3) | ✔ | ✔ | | | |
|
||||
| [SiPy](/datasheets/development/sipy) | ✔ | ✔ | | ✔ | |
|
||||
| [GPy](/datasheets/development/gpy) | ✔ | ✔ | | | ✔ |
|
||||
| [LoPy](/datasheets/development/lopy) | ✔ | ✔ | ✔ | | |
|
||||
| [LoPy4](/datasheets/development/lopy4) | ✔ | ✔ | ✔ | ✔ | |
|
||||
| [FiPy](/datasheets/development/fipy) | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| Antennas | [External WiFi/BT Antenna Kit](https://pycom.io/product/external-wifi-antenna/) | [External WiFi/BT Antenna Kit](https://pycom.io/product/external-wifi-antenna/) | [LoRa & Sigfox Antenna Kit](https://pycom.io/product/lora-antenna-kit/) | [LoRa & Sigfox Antenna Kit](https://pycom.io/product/lora-antenna-kit/) | [LTE-M Antenna Kit](https://pycom.io/product/lte-m-antenna-kit/) |
|
||||
|
||||
## Expansion boards
|
||||
| Name | Function |
|
||||
| :--- | :--- |
|
||||
| [Pygate](/datasheets/expansionboards/pygate/) | An 8-channel LoRa gateway |
|
||||
| [Pysense](/datasheets/expansionboards/pysense/) | Sensor board |
|
||||
| [Pysense 2.0 X](/datasheets/expansionboards/pysense2/) | Sensor header |
|
||||
| [Pytrack](/datasheets/expansionboards/pytrack/) | GPS board|
|
||||
| [Pytrack 2.0 X](/datasheets/expansionboards/pytrack2/) | GPS board with sensor header |
|
||||
| [Expansionboard 3.0](/datasheets/expansionboards/expansion3/) | General purpose expansion board |
|
||||
|
||||
## OEM Modules
|
||||
|
||||
| OEM Module | [L01/W01 Reference Board](/datasheets/oem/l01_reference) | [Universal Reference Board](/datasheets/oem/universal_reference) |
|
||||
| :--- | :---: | :---: |
|
||||
| [W01](/datasheets/oem/w01) | ✔ | ✔ |
|
||||
| [L01](/datasheets/oem/l01) | ✔ | ✔ |
|
||||
| [L04](/datasheets/oem/l04) | | ✔ |
|
||||
| [G01](/datasheets/oem/g01) | | ✔ |
|
||||
|
||||
|
||||
## Accessories
|
||||
|
||||
| Accessory | Expansionboard | Pygate | Pytrack / Pysense | Battery Size |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
[Pycase](https://pycom.io/product/pycase-clear/) | ✔ | | | small |
|
||||
[Pygate case](https://pycom.io/product/pygate-case/) | ✔ | ✔ | | tiny |
|
||||
[Small IP67 Case](https://pycom.io/product/ip67-case-for-pysense-pytrack/) | | | ✔| 18650 |
|
||||
[Universal IP76 Case](https://pycom.io/product/universal-ip67-case/) | ✔ | ✔ | ✔| 18650 |
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
title: "Pymakr Online"
|
||||
aliases:
|
||||
- pymakr-online/introduction
|
||||
---
|
||||
|
||||

|
||||
|
||||
## What is Pymakr Online?
|
||||
|
||||
Pymakr Online is an online IDE for your MicroPython projects. We brought our Pymakr Plugin for Atom and Visual Studio code into Pybytes as an IDE, so you won't necessarily need to have those code editors installed anymore in order to work with your Pycom devices.
|
||||
|
||||
## What does Pymakr Online offer you?
|
||||
|
||||
* Everything you would expect from a code editor: syntax highlighting, auto complete, multi tabs, file tree, search box etc.
|
||||
* REPL terminal
|
||||
* Import from multiple sources (blank/device/project/Github repository), export to a zip file/device/project
|
||||
* Device activity indicator: track what's going between Pymakr Online and your device.
|
||||
|
||||
## Let's get started!
|
||||
|
||||
* [How to Open Pymakr Online](/pymakr-online/how-to-open)
|
||||
* [Tools and features](/pymakr-online/toolsfeatures)
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
---
|
||||
title: "How to Open Pymakr Online"
|
||||
aliases:
|
||||
- pymakr-online/how-to-open.html
|
||||
- pymakr-online/how-to-open.md
|
||||
- pymakr-online/how-to-open
|
||||
---
|
||||
|
||||
## The two different ways of opening Pymakr Online
|
||||
|
||||
Pymakr Online can be opened in two different ways:
|
||||
|
||||
### 1. from the device page, which will open Pymakr Online linked to that device
|
||||
|
||||

|
||||
|
||||
### 2. from Pymakr Online initial page, which is accessible from the side bar menu.
|
||||
|
||||

|
||||

|
||||
|
||||
*Pymakr Online initial page*
|
||||
|
||||
## The differences between the two ways of opening Pymakr online
|
||||
|
||||
### From the device page
|
||||
|
||||

|
||||
|
||||
If you have opened Pymakr Online from a device page, you may notice:
|
||||
|
||||
1. Device activity indicator. To track what's going on between the Pymakr Online and the linked device.
|
||||
2. REPL terminal.
|
||||
3. Save and upload current file. That will save that file on the cloud and upload it to your device.
|
||||
4. Refresh hierarchy. That will request the device its hierarchy, in case the files structure has been changed.
|
||||
5. Download file. That will request the file from the device, forcing the download of it. Warning: that will override your changes in case you haven't uploaded the file to the device.
|
||||
|
||||
### From the Pymakr initial page
|
||||
|
||||

|
||||
|
||||
1. Save/export button.
|
||||
|
||||
Since there's no device linked in this way of opening Pymakr Online, there are no device related actions here (download file, device activity indicator etc). Instead, you decide what you are going to do with your code:
|
||||
|
||||

|
||||
|
||||
*Modal opened after clicking on Save/Export button*
|
||||
@@ -1,185 +0,0 @@
|
||||
---
|
||||
title: "Tools/Features"
|
||||
aliases:
|
||||
- pymakr/toolsfeatures.html
|
||||
- pymakr/toolsfeatures.md
|
||||
- chapter/pymakr/toolsfeatures
|
||||
---
|
||||
|
||||
There are two different ways of opening Pymakr Online. Each way has some differences on the features and purposes. Read more at [How to Open Pymakr Online](/pymakr-online/how-to-open)
|
||||
|
||||
# Pymakr Online linked to a device
|
||||
|
||||
If you open Pymakr Online from a device page, Pymakr will be linked to that device.
|
||||
|
||||
_**Note: Your device needs to be online in order to be reachable by Pymakr Online**_
|
||||
|
||||
## Terminal
|
||||
|
||||
Just like Pymakr Plugin, Pymakr Online also has a REPL (Read Evaluate Print Line) terminal. The REPL allows you to run code on your device, line by line. To begin coding, open Pymakr from a device (device's page > pymakr tab > open Pymakr button), go to the terminal and start typing your code.
|
||||
|
||||
|
||||
## Download a file
|
||||
|
||||
When Pymakr is loaded, the IDE will request the device its hierarchy (the folder structure). If you open a file that has never been opened in Pymakr Online before, that file's content will be downloaded and saved on the cloud, so the next time you open that same file, the content download won't be necessary, unless you want to. Maybe you changed that file's content in somewhere else and want to force a download to get the current content which is in the device.
|
||||
|
||||
To download the file from the linked device, click on the download icon next to the file name at file tree.
|
||||
|
||||

|
||||
|
||||
That will download the file content from the device and save it into the cloud.
|
||||
|
||||

|
||||
|
||||
*In this case, that file has been updated yesterday.*
|
||||
|
||||

|
||||
|
||||
*After downloading the main.py content from the device.*
|
||||
|
||||
## Upload a file
|
||||
|
||||
After making any changes in a file, you will be able to upload it into your device by clicking on "Save and Upload" link.
|
||||
|
||||

|
||||
|
||||
|
||||
_**Note: That will upload only the current file.**_
|
||||
|
||||
After downloading or uploading a file, its content is stored on the cloud.
|
||||
|
||||
## Update Hierarchy
|
||||
|
||||
If you want to refresh your device's hierarchy in Pymakr, you should click on Refresh Hierarchy icon next to your device name. That will request the hierarchy from the device, creating or deleting folders according to your device's file hierarchy.
|
||||
|
||||

|
||||
|
||||
|
||||
# Pymakr Online not linked to a device
|
||||
|
||||
Pymakr Online can be opened without being linked to a device, from [Pymakr Online](https://www.pybytes.pycom.io/pymakr) initial page.
|
||||
|
||||
Since there's no device linked in this way of opening Pymakr Online, there are no device related actions here (download file, device activity indicator etc). Instead, you decide what you are going to do with your code: upload to a project, download a zip file or upload to a device.
|
||||
|
||||
Before exporting your project, you first need to import a project into Pymakr or start with a blank project:
|
||||
|
||||
## Import code into Pymakr Online
|
||||
|
||||

|
||||
|
||||
*Pymakr Online initial page*
|
||||
|
||||
### 1. Blank project
|
||||
|
||||
This will open Pymakr Online with the essential files of MicroPython project (main.py and boot.py).
|
||||
|
||||
### 2. Project/Release
|
||||
|
||||
1. After clicking on Project button, you will see this page, where you must choose one project:
|
||||
|
||||

|
||||
|
||||
2. And finally, choose the release you want to work with. That will open Pymakr with the files of the selected release.
|
||||
|
||||

|
||||
|
||||
### 3. Device
|
||||
|
||||
At this section you can import the code from a device and work with it in Pymakr Online. Note this won't have any connection to any device once it's loaded.
|
||||
|
||||
1. Choose the device you want to work with:
|
||||
|
||||

|
||||
|
||||
2. If you already worked with that device in Pymakr Online, you can use the latest saved code on the cloud, so the device doesn't need to be online, or even turned on. That will instantly open Pymakr with that code.
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
If you want the current files from the device and you are not sure if the saved code on the cloud is up to date, you can download those files from the device by clicking on "Request files from device" button. That will bring you to another modal, which will show you the download progress.
|
||||
|
||||

|
||||
|
||||
Once the download has been completed, you can now work with the device's files in Pymakr Online:
|
||||
|
||||
!
|
||||
|
||||
|
||||
### 4. Zip file
|
||||
|
||||
This feature allows you to upload a zip file of your project into Pymakr Online and start to work with it from there. The zip file can not be bigger than 4MB.
|
||||
|
||||
### 5. Github Repository
|
||||
|
||||
1. Firstly, type the repository name you want to import your code from and press enter:
|
||||
|
||||
!
|
||||
|
||||
2. Then select your repository by clicking on it.
|
||||
|
||||
!
|
||||
|
||||
3. Select the branch
|
||||
|
||||
!
|
||||
|
||||
4. Wait for a few seconds until the download of the files from the selected branch is completed and then you can start working on Pymakr with those files!
|
||||
|
||||
!
|
||||
|
||||
_**Note: There's a usage limit of the Github API. You won't be able to search a lot and select different repositories in the same day. Use this feature with moderation.**_
|
||||
|
||||
|
||||
## Save/Export
|
||||
|
||||
To export your project, ensure that you have opened Pymakr Online from the Pymakr initial page (accessible from the sidebar menu) and not from the device page. For any option here, the size limit is 4MB.
|
||||
|
||||
1. Click on Save/Export button.
|
||||
|
||||

|
||||
|
||||
2. Choose an option:
|
||||
|
||||

|
||||
|
||||
* Upload to a project will be released soon.
|
||||
|
||||
* Create and Download a zip file from all of the files from your project.
|
||||
|
||||

|
||||
|
||||
* You can also export to a device. This modal will open after clicking on "UPLOAD TO DEVICE" button. Note that your device needs to be online in order to receive the files from Pymakr Online.
|
||||
|
||||

|
||||
|
||||
* Wait while Pymakr Online is uploading your project to the selected device.
|
||||

|
||||
|
||||
* Once the upload is done, your device will restart and load the new code.
|
||||

|
||||
|
||||
|
||||
# Create a new file or folder
|
||||
|
||||
To create a file or folder in Pymakr Online, disregarding of how you opened it, you just need to right click on the folder you want to create the file or folder in.
|
||||
|
||||

|
||||
|
||||
In this case, I'm creating a folder called 'new-folder' under the project root. For that, I right clicked on the project name.
|
||||
|
||||
Now type the name of the file/folder:
|
||||

|
||||
|
||||
_**Note: Pymakr Online only supports the formats .py .txt .log .json .html .js .cet .crt**_
|
||||
_**A folder name can not contain dots (.)**_
|
||||
|
||||
If you want to delete a folder or file, right click on the item to be deleted and then click on "Delete file" or "Delete folder".
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
title: "Installation"
|
||||
aliases:
|
||||
disable_breadcrumbs: true
|
||||
---
|
||||
|
||||

|
||||
|
||||
## Pymakr Plugins <a id="pymakr-plugins"></a>
|
||||
|
||||
To make it as easy as possible Pycom has developed a plugin for two popular text editors, called Pymakr. These plugins have been built and are available for the following platforms:
|
||||
|
||||
- {{% refname "atom.md" %}}
|
||||
|
||||
- {{% refname "vscode.md" %}}
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
title: "API Reference"
|
||||
aliases:
|
||||
- chapter/pytrackpysense/apireference
|
||||
---
|
||||
|
||||
To simplify usability, APIs for the libraries have been created, abstracting away the low level interactions with the sensors. The next following pages refer to the respective libraries for the Pytrack, Pysense, and Pyscan.
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
title: "API Reference"
|
||||
aliases:
|
||||
---
|
||||
|
||||
To simplify usability, APIs for the libraries have been created, abstracting away the low level interactions with the sensors. The next following pages refer to the respective libraries for the Pytrack, Pysense, and Pyscan.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that updated libraries are available for the Pytrack 2.0 X and Pysense 2.0 X in the pytrack-2 and pysense-2 directories on GitHub.
|
||||
These new libraries will allow you to use the new additional features.
|
||||
{{% /hint %}}
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
title: "Installing Software"
|
||||
aliases:
|
||||
- chapter/pytrackpysense/installation
|
||||
---
|
||||
|
||||
As the development for these devices are on going with additional features being added, every week, it is essential to ensure you frequently check for updates on the Pytrack/Pysense/Pyscan. As well as updating the device firmware, it is important to check the [GitHub repository](https://github.com/pycom/pycom-libraries) for the respective library files as they as also being updated, to include additional features/functionality.
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
title: "Installing Software"
|
||||
aliases:
|
||||
---
|
||||
|
||||
As the development for these devices are on going with additional features being added, every week, it is essential to ensure you frequently check for updates on the Pytrack/Pysense/Pyscan. As well as updating the device firmware, it is important to check the [GitHub repository](https://github.com/pycom/pycom-libraries) for the respective library files as they as also being updated, to include additional features/functionality.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that updated libraries are available for the Pytrack 2.0 X and Pysense 2.0 X in the pytrack-2 and pysense-2 directories on GitHub.
|
||||
These new libraries will allow you to use the new additional features.
|
||||
{{% /hint %}}
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
title: "Installing Drivers - Windows 7"
|
||||
aliases:
|
||||
- pytrackpysense/installation/drivers.html
|
||||
- pytrackpysense/installation/drivers.md
|
||||
- chapter/pytrackpysense/installation/drivers
|
||||
---
|
||||
|
||||
Pytrack and Pysense will work out of the box for Windows 8/10/+ (please download the correct driver through Windows Update), macOS as well as Linux. If using Windows 7, drivers to support the boards will need to be installed.
|
||||
|
||||
Please follow the instructions below to install the required drivers.
|
||||
|
||||
## Download
|
||||
|
||||
Please download the driver software from the link below.
|
||||
|
||||
[Unsigned driver for Windows 7 compatible with Pycom products](/gitbook/assets/pycom.inf.zip)
|
||||
Please note that this driver is not suitable for the Expansion Board 1 & 2.
|
||||
As these drivers are not signed, you may need to disable driver signing enforcement in your Windows operating system.
|
||||
|
||||
## Installation
|
||||
|
||||
First navigate open the Windows start menu and search/navigate to `Device Manager`. You should see your Pytrack/Pysense in the dropdown under **other devices**.
|
||||
|
||||

|
||||
|
||||
Right click the device and select `Update Driver Software`.
|
||||
|
||||

|
||||
|
||||
Select the option to **Browse my computer for driver software**.
|
||||
|
||||

|
||||
|
||||
Next you will need to navigate to where you downloaded the driver to (e.g. **Downloads** Folder).
|
||||
|
||||

|
||||
|
||||
Specify the folder in which the drivers are contained. If you haven't extracted the `.zip` file, please do this before selecting the folder.
|
||||
|
||||

|
||||
|
||||
You may receive a warning, suggesting that windows can't verify the publisher of this driver. Click `Install this driver software anyway` as this link points to our official driver.
|
||||
|
||||

|
||||
|
||||
If the installation was successful, you should now see a window specifying that the driver was correctly installed.
|
||||
|
||||

|
||||
|
||||
To confirm that the installation was correct, navigate back to the `Device Manager` and click the dropdown for other devices. The warning label should now be gone and Pytrack/Pysense should be installed.
|
||||
|
||||

|
||||
@@ -1,71 +0,0 @@
|
||||
; M-Stack CDC-ACM Windows INF file
|
||||
;
|
||||
; This file has been tested on Windows 7, 64-bit. It may or may not work on
|
||||
; Windows versions earlier than 7. Improvements and bug reports are welcome.
|
||||
;
|
||||
|
||||
[Version]
|
||||
Signature="$Windows NT$"
|
||||
Class=Ports
|
||||
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
|
||||
Provider=%MFGNAME%
|
||||
DriverVer=05/16/2014,1.0.0.18
|
||||
|
||||
[Manufacturer]
|
||||
%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64, NTarm
|
||||
|
||||
[DeviceList.NTamd64]
|
||||
%DESC_CDC_PYSENSE% = DriverInstall, %VID_PID_PYSENSE_STRING%
|
||||
%DESC_CDC_PYTRACK% = DriverInstall, %VID_PID_PYTRACK_STRING%
|
||||
%DESC_CDC_PYSCAN% = DriverInstall, %VID_PID_PYSCAN_STRING%
|
||||
%DESC_CDC_EXPANSION3% = DriverInstall, %VID_PID_EXPANSION3_STRING%
|
||||
|
||||
[DeviceList.NTx86]
|
||||
%DESC_CDC_PYSENSE% = DriverInstall, %VID_PID_PYSENSE_STRING%
|
||||
%DESC_CDC_PYTRACK% = DriverInstall, %VID_PID_PYTRACK_STRING%
|
||||
%DESC_CDC_PYSCAN% = DriverInstall, %VID_PID_PYSCAN_STRING%
|
||||
%DESC_CDC_EXPANSION3% = DriverInstall, %VID_PID_EXPANSION3_STRING%
|
||||
|
||||
[DeviceList.NTia64]
|
||||
%DESC_CDC_PYSENSE% = DriverInstall, %VID_PID_PYSENSE_STRING%
|
||||
%DESC_CDC_PYTRACK% = DriverInstall, %VID_PID_PYTRACK_STRING%
|
||||
%DESC_CDC_PYSCAN% = DriverInstall, %VID_PID_PYSCAN_STRING%
|
||||
%DESC_CDC_EXPANSION3% = DriverInstall, %VID_PID_EXPANSION3_STRING%
|
||||
|
||||
[DeviceList.NTarm]
|
||||
%DESC_CDC_PYSENSE% = DriverInstall, %VID_PID_PYSENSE_STRING%
|
||||
%DESC_CDC_PYTRACK% = DriverInstall, %VID_PID_PYTRACK_STRING%
|
||||
%DESC_CDC_PYSCAN% = DriverInstall, %VID_PID_PYSCAN_STRING%
|
||||
%DESC_CDC_EXPANSION3% = DriverInstall, %VID_PID_EXPANSION3_STRING%
|
||||
|
||||
; For the DriverInstall sections below see:
|
||||
; http://support.microsoft.com/kb/837637
|
||||
; http://www.microchip.com/forums/m488342.aspx
|
||||
;
|
||||
; This INF file includes mdmcpq.inf, which is a standard Windows
|
||||
; INF file that you can find by searching for it recursively from
|
||||
; %WINDIR%. It's in the WinSxS folders. In that file, you can see
|
||||
; the symbols referenced here (eg: FakeModemCopyFileSection, etc).
|
||||
|
||||
[DriverInstall.NT]
|
||||
include=mdmcpq.inf
|
||||
CopyFiles=FakeModemCopyFileSection
|
||||
|
||||
[DriverInstall.NT.Services]
|
||||
include=mdmcpq.inf
|
||||
AddService=usbser, 0x00000002, LowerFilter_Service_Inst
|
||||
|
||||
[DriverInstall.HW]
|
||||
include=mdmcpq.inf
|
||||
AddReg=LowerFilterAddReg
|
||||
|
||||
[Strings]
|
||||
MFGNAME = "Pycom Ltd"
|
||||
DESC_CDC_PYSENSE = "Pysense"
|
||||
DESC_CDC_PYTRACK = "Pytrack"
|
||||
DESC_CDC_PYSCAN = "Pyscan"
|
||||
DESC_CDC_EXPANSION3 = "Expansion3"
|
||||
VID_PID_PYSENSE_STRING = "USB\VID_04D8&PID_F012"
|
||||
VID_PID_PYTRACK_STRING = "USB\VID_04D8&PID_F013"
|
||||
VID_PID_EXPANSION3_STRING = "USB\VID_04D8&PID_EF98"
|
||||
VID_PID_PYSCAN_STRING = "USB\VID_04D8&PID_EF38"
|
||||
@@ -85,7 +85,7 @@ print("Wifi Connection established")
|
||||
|
||||
# Sync time via NTP server for GW timestamps on Events
|
||||
rtc = RTC()
|
||||
rtc.ntp_sync(server="0.pool.ntp.org")
|
||||
rtc.ntp_sync(server="pool.ntp.org")
|
||||
|
||||
# Read the GW config file from Filesystem
|
||||
fp = open('/flash/config.json','r')
|
||||
|
||||
@@ -15,6 +15,6 @@ This section contains tutorials and examples for use with Pycom modules and Expa
|
||||
|
||||
General Pycom tutorials contains tutorials that may be run on any Pycom device, such as connecting to a WiFi network, Bluetooth, controlling I/O pins etc. Later sections are specific to the LoPy and SiPy devices such as setting up a LoRa node or connecting to the Sigfox network. The final sections are related to examples using the Pytrack and Pysense.
|
||||
|
||||
Before starting, ensure that any Pycom devices are running the latest firmware; for instructions see [Firmware Updates](/gettingstarted/installation/firmwaretool).
|
||||
Before starting, ensure that any Pycom devices are running the latest firmware; for instructions see [Firmware Updates](/updatefirmware/device/).
|
||||
|
||||
The source code for these tutorials, along with the required libraries can be found in in the [pycom-libraries](https://github.com/pycom/pycom-libraries) repository.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
title: "All Pycom Device Examples"
|
||||
aliases:
|
||||
- chapter/tutorials/all
|
||||
---
|
||||
|
||||
This section contains generic examples that will work across all Pycom devices and Expansion Boards.
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
title: "All Pycom Device Examples"
|
||||
aliases:
|
||||
---
|
||||
|
||||
This section contains generic examples that will work across all Pycom devices and Expansion Boards.
|
||||
|
||||
0
content/tutorials/basic/_index.md
Normal file
0
content/tutorials/basic/_index.md
Normal file
42
content/tutorials/basic/gpio.md
Normal file
42
content/tutorials/basic/gpio.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "GPIO"
|
||||
aliases:
|
||||
- tutorials/basic/gpio.html
|
||||
- tutorials/basic/gpio.md
|
||||
- chapter/tutorials/basic/gpio
|
||||
---
|
||||
The module has several spare General Purpose Input-Output (GPIO) pins available for you to use with your own sensors and actuators.
|
||||
|
||||
## Output
|
||||
Controlling the GPIO pins of the modules is rather easy. In the example below, we can let the orange LED on the expansion board blink.
|
||||
|
||||
```python
|
||||
from machine import Pin
|
||||
import time
|
||||
led = Pin('P9', mode=Pin.OUT)
|
||||
|
||||
while True:
|
||||
print("high")
|
||||
led.value(1)
|
||||
time.sleep(1)
|
||||
print("low")
|
||||
led.value(0)
|
||||
time.sleep(1)
|
||||
```
|
||||
## Input
|
||||
|
||||
Sometimes, it would be useful to know the state of a pin. For example, you could use the button on the xpansion board to toggle the led
|
||||
|
||||
```python
|
||||
from machine import Pin
|
||||
import time
|
||||
led = Pin('P9', mode = Pin.OUT)
|
||||
button = Pin('P10', mode = Pin.IN)
|
||||
|
||||
while True:
|
||||
if(button() == 1):
|
||||
led.value(1)
|
||||
else:
|
||||
led.value(0)
|
||||
```
|
||||
|
||||
14
content/tutorials/basic/print.md
Normal file
14
content/tutorials/basic/print.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "Print"
|
||||
aliases:
|
||||
- tutorials/all/print.html
|
||||
- tutorials/all/print.md
|
||||
- chapter/tutorials/basic/print
|
||||
---
|
||||
|
||||
Using the `print()` statements in your python script is quite easy. But did you know you can also concatinate strigns and variables inline? If you are formiliar with C, it's functionality is similar to the `printf()` function, but with `\n` always included.
|
||||
|
||||
```python
|
||||
import machine
|
||||
print("hello world: " + str(machine.rng()) + " random number" )
|
||||
```
|
||||
@@ -9,7 +9,6 @@ aliases:
|
||||
Using the Pymakr Plugin, open and connect a device or use serial terminal (PuTTY, screen, picocom, etc). Upon connecting, there should be a blank screen with a flashing cursor. Press Enter and a MicroPython prompt should appear, i.e. `>>>`. Let's make sure it is working with the obligatory test:
|
||||
|
||||
```python
|
||||
|
||||
>>> print("Hello LoPy!")
|
||||
Hello LoPy!
|
||||
```
|
||||
@@ -23,7 +22,6 @@ If this is not working, try either a hard reset or a soft reset; see below.
|
||||
Here are some other example, utilising the device's hardware features:
|
||||
|
||||
```python
|
||||
|
||||
>>> from machine import Pin
|
||||
>>> led = Pin('G16', mode=Pin.OUT, value=1)
|
||||
>>> led(0)
|
||||
@@ -42,7 +40,6 @@ Here are some other example, utilising the device's hardware features:
|
||||
If something goes wrong, the device can be reset with two methods. The first is to press `CTRL-D` at the MicroPython prompt, which will perform a soft reset. A message, as following, will appear:
|
||||
|
||||
```python
|
||||
|
||||
>>>
|
||||
PYB: soft reboot
|
||||
MicroPython v1.4.6-146-g1d8b5e5 on 2016-10-21; LoPy with ESP32
|
||||
@@ -9,7 +9,6 @@ aliases:
|
||||
By default the heartbeat LED flashes in blue colour once every 4s to signal that the system is alive. This can be overridden through the `pycom` module.
|
||||
|
||||
```python
|
||||
|
||||
import pycom
|
||||
|
||||
pycom.heartbeat(False)
|
||||
@@ -21,7 +20,6 @@ The heartbeat LED is also used to indicate that an error was detected.
|
||||
The following piece of code uses the RGB LED to make a traffic light that runs for 10 cycles.
|
||||
|
||||
```python
|
||||
|
||||
import pycom
|
||||
import time
|
||||
|
||||
113
content/tutorials/basic/sleep.md
Normal file
113
content/tutorials/basic/sleep.md
Normal file
@@ -0,0 +1,113 @@
|
||||
|
||||
---
|
||||
title: "Sleep"
|
||||
aliases:
|
||||
- tutorials/all/sleep.html
|
||||
- tutorials/all/sleep.md
|
||||
- chapter/tutorials/basic/sleep
|
||||
---
|
||||
|
||||
There are several methods to make your device sleep. First we cover the basic sleep. Similar to `delay()` used in Arduino, sleep will yield your program until the time is over. Important is that the all microcontroller functions keep running. Also the LoRa, SigFox and LTE modems can be used directly (without re-attaching) after regular sleep.
|
||||
|
||||
```python
|
||||
import time
|
||||
|
||||
time.sleep(1) #sleep 1 second
|
||||
|
||||
time.sleep_ms(10) #sleep 10 milliseconds
|
||||
|
||||
time.sleep_us(10) #sleep 10 microseconds
|
||||
```
|
||||
|
||||
Similar to `yield()`, in micropython we use
|
||||
```python
|
||||
import machine
|
||||
machine.idle()
|
||||
```
|
||||
|
||||
### Power saving
|
||||
To save power, we can also put the controller into sleep modes using the following examples.
|
||||
|
||||
#### Light sleep
|
||||
|
||||
The `machine.sleep()` command will put the controller into a light sleep mode. WiFi and BLE are switched off, but the main CPU and RAM are still running. the LoRa, SigFox and LTE modems are stopped as well and have to be re-initialized after wakeup. The controller will continue running the code after waking up. GPIO states are also conserved. Setting the second argument to `True` will restore the WiFi and BLE after wakeup.
|
||||
|
||||
```python
|
||||
import machine
|
||||
import time
|
||||
print("this will be printed before: " + str(time.ticks_ms()))
|
||||
machine.sleep(1000*10, True)
|
||||
print("this will be printed after 10 seconds: " str(time.ticks_ms()))
|
||||
```
|
||||
|
||||
#### Deep sleep
|
||||
Deepsleep disables, next to the lightsleep, the main CPU and RAM. This leaves only a low power coprocessor and RTC timer running. After waking up, the board will start again at `boot.py`, just like with pressing the reset button. The CPU counter (`time.ticks()`) will continue to count however!
|
||||
You can also leave the brackets empty to sleep indefinetely, until the reset button is pressed, the power is removed, or an external wake up signal (interrupt) is provided. Be aware that the LTE modem. ***
|
||||
|
||||
|
||||
```python
|
||||
import machine
|
||||
print("Wake up")
|
||||
machine.deepsleep(1000) #deepsleep 1 second
|
||||
print("this will never get printed!")
|
||||
```
|
||||
|
||||
#### Wake up reason
|
||||
|
||||
Sometimes, we want to know the reason the board woke up, to differentiate the difference between pressing the reset button and waking up from sleep. We can also determine the time left on the sleep timer. Try the example below:
|
||||
|
||||
```python
|
||||
import machine
|
||||
import time
|
||||
(wake_reason, gpio_list) = machine.wake_reason()
|
||||
print("Device running for: " + str(time.ticks_ms()) + "ms")
|
||||
print("Remaining sleep time: " + str(machine.remaining_sleep_time()) + "ms" )
|
||||
if wake_reason == machine.PWRON_WAKE:
|
||||
print("Woke up by reset button")
|
||||
elif wake_reason == machine.PIN_WAKE:
|
||||
print("Woke up by external pin (external interrupt)")
|
||||
print(*gpio_list, sep=", ")
|
||||
elif wake_reason == machine.RTC_WAKE:
|
||||
print("Woke up by RTC (timer ran out)")
|
||||
elif wake_reason == machine.ULP_WAKE:
|
||||
print("Woke up by ULP (capacitive touch)")
|
||||
|
||||
machine.pin_sleep_wakeup(('P3', 'P4'), mode=machine.WAKEUP_ANY_HIGH, enable_pull=True)
|
||||
|
||||
machine.deepsleep(1000*60) #sleep for 1 minute
|
||||
print("This will never be printed")
|
||||
```
|
||||
|
||||
>Note `pybytes.deepsleep()` is fundamentally the same function as `machine.deepsleep()`, but will gracefully stop the pybytes platform functionality.
|
||||
|
||||
#### Other methods
|
||||
|
||||
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
|
||||
|
||||
```python
|
||||
from pysense import Pysense
|
||||
py = Pysense()
|
||||
py.setup_sleep(10) # set sleep time of 10 seconds
|
||||
py.go_to_sleep()
|
||||
print("this will never be printed")
|
||||
```
|
||||
Using this method, we can also wake the board using the accelerometer and external pin `P6` by rising (`True`) or falling (`False`) edge
|
||||
|
||||
```python
|
||||
from pysense import Pysense
|
||||
from LIS2HH12 import LIS2HH12
|
||||
|
||||
py = Pysense()
|
||||
acc = LIS2HH12()
|
||||
|
||||
# enable activity and also inactivity interrupts, using the default callback handler
|
||||
py.setup_int_wake_up(True, True)
|
||||
|
||||
# set the acceleration threshold to 2000mG (2G) and the min duration to 200ms
|
||||
acc.enable_activity_interrupt(2000, 200)
|
||||
|
||||
py.set_int_pin_wake_up(True) #wake up on rising edge on pin 6 of the expansion header
|
||||
|
||||
py.go_to_sleep()# the device will sleep indefinitely, until pin 6 goes high, or the accelerometer is triggered
|
||||
```
|
||||
LTE Power saving mode (PSM)
|
||||
15
content/tutorials/expansionboards/_index.md
Normal file
15
content/tutorials/expansionboards/_index.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "Overview"
|
||||
aliases:
|
||||
- tutorials/expansionboards/introduction.html
|
||||
- tutorials/expansionboards/introduction.md
|
||||
- chapter/tutorials/expansionboards
|
||||
disable_breadcrumbs: true
|
||||
---
|
||||
|
||||
* [Pygate](../expansionboards/pygate/)
|
||||
* [Pysense](../expansionboards/pysense/)
|
||||
* [Pysense 2.0 X](../expansionboards/pysense2/)
|
||||
* [Pytrack](../expansionboards/pytrack/)
|
||||
* [Pytrack 2.0 X](../expansionboards/pytrack2/)
|
||||
* [Pyscan](../expansionboards/pyscan/)
|
||||
288
content/tutorials/expansionboards/pygate.md
Normal file
288
content/tutorials/expansionboards/pygate.md
Normal file
@@ -0,0 +1,288 @@
|
||||
## Pygate
|
||||
|
||||
The Pygate is an 8-channel LoRaWAN gateway. This page will help you get started with it.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
While the Pygate shield has the radio chips required to act as a LoRaWAN gateway, it will require a WiPy3, GPy or LoPy4 to run the LoRaWAN gateway software and provide connectivity to the LoRaWAN server (TTN / ChirpStack etc.) via WiFi, Ethernet (with the optional PyEthernet adapter) or LTE-M (a GPy with a mobile subscription is required for LTE-M connectivity).
|
||||
{{% /hint %}}
|
||||
|
||||
A USB connection is recommended for the initial firmware update of the Pycom development module (WiPy 3, GPy, LoPy4) and to upload the configuration & start-up script. The module can be updated over the air via WiFi / LTE-M (depending on network capabilities) or via Ethernet connection which allows installation of the gateway in remote locations.
|
||||
|
||||
The Pygate board can have the PyEthernet adapter connected which allows an Ethernet connection. The PyEthernet also supports PoE. Please check the separate [page and warning for PoE-NI!](/tutorials/all/poe)
|
||||
|
||||
### Quickstart
|
||||
|
||||
To connect your Pygate to a LoRa server, please follow these steps:
|
||||
|
||||
1. Attach a WiPy 3, GPy or LoPy 4 to the Pygate. The RGB LED of the development board should be aligned with the USB port of the Pygate.
|
||||
1. Attach the LoRa Antenna to the Pygate.
|
||||
1. Flash the Pycom Device with with a firmware build where Pygate functionality is enabled. In the firmware update tool, please choose pygate as the firmware type.
|
||||
1. Create a `config.json` for your Pygate and upload it (please check the template further below).
|
||||
1. Create a `main.py` that creates an uplink (wifi, ethernet or lte) and runs the LoRa packet forwarder (see example below).
|
||||
1. Run the `main.py`. This file is automatically execute every time the module resets.
|
||||
1. Now it is operational. The communication from other LoRa nodes such as a LoPy4 will now reach the gateway and will receive up and downlink messages via the PyGate.
|
||||
1. To stop the Pygate at any time press Ctrl-C on the REPL and run `machine.pygate_deinit()`. It will take a few seconds to stop the gateway tasks and safely power-off the concentrator.
|
||||
|
||||
|
||||
Make sure you supply a config matching your region (EU868, US915, etc), e.g. https://github.com/Lora-net/packet_forwarder/tree/master/lora_pkt_fwd/cfg. If you are in EU region, it should be sufficient to update the example below with your GW ID, the LoRa server address and port number.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
**Note** Running the LoRa gateway on a GPy can get you close to the memory limit of the device. To avoid running out of memory one should not *run* the WiFi task and the LTE task at the same time. This shouldn't really restrict your use of the Pygate, since you wouldn't be *using* WiFi and LTE at the same time. The tasks *run* when you explicitly initialize them with ``wlan = WLAN()`` or ``lte = LTE()``, or when they get automatically started upon boot based on the settings ``pycom.wifi_on_boot(True)`` or ``pycom.lte_modem_en_on_boot(True)``. Bottom line, if you have trouble starting the LoRa packet forwarder, please double check these settings and make sure at least the network that you don't use is not automatically started.{{% /hint %}}
|
||||
|
||||
|
||||
|
||||
### Example TTN Wifi
|
||||
|
||||
The following example shows the script and json file to run the Pygate over Wifi connecting to [The Things Network](https://www.thethingsnetwork.org/).
|
||||
|
||||
1. log in to https://console.thethingsnetwork.org/
|
||||
1. go to Gateways and register a new gateway
|
||||
1. select "I'm using a legacy packet forwarder"
|
||||
1. make up a EUI (8 byte hexadecimal value) and register it on the TTN website
|
||||
1. enter the EUI in your `config.json` under `gateway_ID` (Just enter the hex digits without the "eui-" prefix and without spaces)
|
||||
1. select your Frequency Plan
|
||||
1. select a router - also enter the hostname in your `config.json` under `server_address`
|
||||
1. enter your wifi SSID and password in `main.py`
|
||||
1. upload `config.json` and `main.py` and reset the board
|
||||
1. you will see how it creates the uplink connection and then start the LoRa GW. It will print out some debug information while it is running. After some initialization it will print "LoRa GW started" and the LED will turn green.
|
||||
|
||||
|
||||
|
||||
```python
|
||||
from network import WLAN
|
||||
import time
|
||||
import machine
|
||||
from machine import RTC
|
||||
import pycom
|
||||
|
||||
# Disable Hearbeat
|
||||
pycom.heartbeat(False)
|
||||
|
||||
# Define callback function for Pygate events
|
||||
def machine_cb (arg):
|
||||
evt = machine.events()
|
||||
if (evt & machine.PYGATE_START_EVT):
|
||||
# Green
|
||||
pycom.rgbled(0x103300)
|
||||
elif (evt & machine.PYGATE_ERROR_EVT):
|
||||
# Red
|
||||
pycom.rgbled(0x331000)
|
||||
elif (evt & machine.PYGATE_STOP_EVT):
|
||||
# RGB off
|
||||
pycom.rgbled(0x000000)
|
||||
|
||||
# register callback function
|
||||
machine.callback(trigger = (machine.PYGATE_START_EVT | machine.PYGATE_STOP_EVT | machine.PYGATE_ERROR_EVT), handler=machine_cb)
|
||||
|
||||
# Connect to a Wifi Network
|
||||
wlan = WLAN(mode=WLAN.STA)
|
||||
wlan.connect(ssid='<SSID>', auth=(WLAN.WPA2, "<PASSWORD>"))
|
||||
|
||||
while not wlan.isconnected():
|
||||
time.sleep(1)
|
||||
|
||||
print("Wifi Connection established")
|
||||
|
||||
# Sync time via NTP server for GW timestamps on Events
|
||||
rtc = RTC()
|
||||
rtc.ntp_sync(server="pool.ntp.org")
|
||||
|
||||
# Read the GW config file from Filesystem
|
||||
fp = open('/flash/config.json','r')
|
||||
buf = fp.read()
|
||||
|
||||
# Start the Pygate
|
||||
machine.pygate_init(buf)
|
||||
|
||||
```
|
||||
|
||||
A sample `config.json` file for gateway configuration in EU868 region:
|
||||
|
||||
```json
|
||||
{
|
||||
"SX1301_conf": {
|
||||
"lorawan_public": true,
|
||||
"clksrc": 1,
|
||||
"antenna_gain": 0,
|
||||
"radio_0": {
|
||||
"enable": true,
|
||||
"type": "SX1257",
|
||||
"freq": 867500000,
|
||||
"rssi_offset": -164.0,
|
||||
"tx_enable": true,
|
||||
"tx_freq_min": 863000000,
|
||||
"tx_freq_max": 870000000
|
||||
},
|
||||
"radio_1": {
|
||||
"enable": true,
|
||||
"type": "SX1257",
|
||||
"freq": 868500000,
|
||||
"rssi_offset": -164.0,
|
||||
"tx_enable": false
|
||||
},
|
||||
"chan_multiSF_0": {
|
||||
"enable": true,
|
||||
"radio": 1,
|
||||
"if": -400000
|
||||
},
|
||||
"chan_multiSF_1": {
|
||||
"enable": true,
|
||||
"radio": 1,
|
||||
"if": -200000
|
||||
},
|
||||
"chan_multiSF_2": {
|
||||
"enable": true,
|
||||
"radio": 1,
|
||||
"if": 0
|
||||
},
|
||||
"chan_multiSF_3": {
|
||||
"enable": true,
|
||||
"radio": 0,
|
||||
"if": -400000
|
||||
},
|
||||
"chan_multiSF_4": {
|
||||
"enable": true,
|
||||
"radio": 0,
|
||||
"if": -200000
|
||||
},
|
||||
"chan_multiSF_5": {
|
||||
"enable": true,
|
||||
"radio": 0,
|
||||
"if": 0
|
||||
},
|
||||
"chan_multiSF_6": {
|
||||
"enable": true,
|
||||
"radio": 0,
|
||||
"if": 200000
|
||||
},
|
||||
"chan_multiSF_7": {
|
||||
"enable": true,
|
||||
"radio": 0,
|
||||
"if": 400000
|
||||
},
|
||||
"chan_Lora_std": {
|
||||
"enable": true,
|
||||
"radio": 1,
|
||||
"if": -200000,
|
||||
"bandwidth": 250000,
|
||||
"spread_factor": 7
|
||||
},
|
||||
"chan_FSK": {
|
||||
"enable": true,
|
||||
"radio": 1,
|
||||
"if": 300000,
|
||||
"bandwidth": 125000,
|
||||
"datarate": 50000
|
||||
},
|
||||
"tx_lut_0": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 5,
|
||||
"rf_power": 9,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_1": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 5,
|
||||
"rf_power": 9,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_2": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 5,
|
||||
"rf_power": 9,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_3": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 5,
|
||||
"rf_power": 9,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_4": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 5,
|
||||
"rf_power": 9,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_5": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 5,
|
||||
"rf_power": 9,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_6": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 5,
|
||||
"rf_power": 9,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_7": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 6,
|
||||
"rf_power": 11,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_8": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 5,
|
||||
"rf_power": 13,
|
||||
"dig_gain": 2
|
||||
},
|
||||
"tx_lut_9": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 8,
|
||||
"rf_power": 14,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_10": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 6,
|
||||
"rf_power": 15,
|
||||
"dig_gain": 2
|
||||
},
|
||||
"tx_lut_11": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 6,
|
||||
"rf_power": 16,
|
||||
"dig_gain": 1
|
||||
},
|
||||
"tx_lut_12": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 9,
|
||||
"rf_power": 17,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_13": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 10,
|
||||
"rf_power": 18,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_14": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 11,
|
||||
"rf_power": 19,
|
||||
"dig_gain": 3
|
||||
},
|
||||
"tx_lut_15": {
|
||||
"pa_gain": 0,
|
||||
"mix_gain": 12,
|
||||
"rf_power": 20,
|
||||
"dig_gain": 3
|
||||
}
|
||||
},
|
||||
|
||||
"gateway_conf": {
|
||||
"gateway_ID": "XXXXXXXXXXXXXXXX",
|
||||
"server_address": "router.eu.thethings.network",
|
||||
"serv_port_up": 1700,
|
||||
"serv_port_down": 1700,
|
||||
"keepalive_interval": 10,
|
||||
"stat_interval": 30,
|
||||
"push_timeout_ms": 100,
|
||||
"forward_crc_valid": true,
|
||||
"forward_crc_error": false,
|
||||
"forward_crc_disabled": false
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -6,7 +6,7 @@ aliases:
|
||||
- chapter/tutorials/pyscan
|
||||
---
|
||||
|
||||
This basic example shows how to read an NFC card and authenticate it using a pre-defined access list.
|
||||
This basic example shows how to read an NFC card and authenticate it using a pre-defined access list.
|
||||
|
||||
```python
|
||||
|
||||
@@ -10,6 +10,8 @@ Both the Pysense and Pytrack use the same accelerometer. Please see the [Pysense
|
||||
|
||||
## Example
|
||||
|
||||
>Note: You need to add the libraries in the `lib` folder before the example will work
|
||||
|
||||
You can find this example in the [pycom/pycom-libraries](https://github.com/pycom/pycom-libraries) GitHub repository.
|
||||
|
||||
```python
|
||||
0
content/tutorials/hardware/_index.md
Normal file
0
content/tutorials/hardware/_index.md
Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user