diff --git a/content/datasheets/expansionboards/expansion2.md b/content/datasheets/expansionboards/expansion2.md index 81ebd89..20cb589 100644 --- a/content/datasheets/expansionboards/expansion2.md +++ b/content/datasheets/expansionboards/expansion2.md @@ -29,6 +29,7 @@ The pinout of the Expansion Board is available as a [PDF File](/gitbook/assets/e Be gentle when plugging and unplugging from the USB connector. Whilst the USB connector is soldered and is relatively strong, if it breaks off it can be very difficult to fix. {{% /hint %}} -## Battery Charger +## Notes +### Battery Charger The Expansion Board features a single cell Li-Ion/Li-Po charger. When the board is being powered via the micro USB connector, the Expansion Board will charge the battery \(if connected\). When the `CHG` jumper is present, the battery will be charged at `450mA`. If this value is too high for your application, removing the jumper lowers the charge current to `100mA`. diff --git a/content/datasheets/expansionboards/expansion3.md b/content/datasheets/expansionboards/expansion3.md index 551a146..a083db1 100644 --- a/content/datasheets/expansionboards/expansion3.md +++ b/content/datasheets/expansionboards/expansion3.md @@ -26,23 +26,20 @@ The expansion board contains 6 headers labeled: - RUN - BAT - LED -- CHG +- CHG: Decrease battery charging current from 450mA to 100mA ![](/gitbook/assets/expansion3-pinout-1.png) -{{% hint style="danger" %}} -Be gentle when plugging and unplugging from the USB connector. Whilst the USB connector is soldered and is relatively strong, if it breaks off it can be very difficult to fix. -{{% /hint %}} - -## Battery Charger +> Be gentle when plugging and unplugging from the USB connector. Whilst the USB connector is soldered and is relatively strong, if it breaks off it can be very difficult to fix. +## Notes +### Battery Charger +> Make sure you check the polarity of the battery before plugging it in! Connect the positive side to the side marked with a `+`. The Expansion Board features a single cell Li-Ion/Li-Po charger. When the board is being powered via the micro USB connector, the Expansion Board will charge the battery \(if connected\). When the `CHG` jumper is present, the battery will be charged at `450mA`. If this value is too high for your application, removing the jumper lowers the charge current to `100mA`. -{{% hint style="info" %}} -To use the battery, pull `P8/G15` high (connect to `3v3`). If you want to use the SD card as well, use a 10k pull-up. -{{% /hint %}} +> To use the battery, pull `P8/G15` high (connect to `3v3`). If you want to use the SD card as well, use a 10k pull-up. -## Differences between v2.0 and v3.0 +### Differences between v2.0 and v3.0 * The FTDI chip as been replaced with a custom programmed PIC, similar to the diff --git a/content/datasheets/expansionboards/pygate.md b/content/datasheets/expansionboards/pygate.md index 8b913f2..1b7c7b8 100644 --- a/content/datasheets/expansionboards/pygate.md +++ b/content/datasheets/expansionboards/pygate.md @@ -36,12 +36,13 @@ Now, attach the antenna(s) to the SMA connector(s) and upload code! ![](/gitbook/assets/pygate-case.jpg) The case will also work for the regular expansion board and has the SD card holder accessible from the outside. +## Notes +### Battery Charger -## 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. +> Make sure you check the polarity of the battery before plugging it in! Connect the positive side to the side marked with a `+`. -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 +### Troubleshooting * If PIC stays in bootloader mode, the [`dfu-util` update](/pytrackpysense/installation/firmware) should be performed diff --git a/content/datasheets/expansionboards/pyscan.md b/content/datasheets/expansionboards/pyscan.md index f0597dd..4581b01 100644 --- a/content/datasheets/expansionboards/pyscan.md +++ b/content/datasheets/expansionboards/pyscan.md @@ -18,14 +18,7 @@ The datasheet of the Pyscan is available as a [PDF File](/gitbook/assets/pyscan- ## Pyscan Libraries -* Pyscan libraries to use the RFID/NFC reader are located [here](https://github.com/pycom/pycom-libraries/tree/master/pyscan) -* The accelerometer library is [here](https://github.com/pycom/pycom-libraries/blob/master/pytrack/lib/LIS2HH12.py) - -{{% hint style="info" %}} -For the time being, we recommend uploading the `MFRC630.mpy` file via FTP due to current Pymakr limitations that will be fixed shortly. -{{% /hint %}} - -Libraries for the rest of the components will be added soon. +* Pyscan libraries to use the RFID/NFC reader and sensors are located [here](https://github.com/pycom/pycom-libraries/tree/master/pyscan) ## Pyscan components: @@ -46,17 +39,19 @@ The pinout of the Pyscan is available as a PDF File Pyscan Pinout ![](/gitbook/assets/pyscan-pinout-1.png) +## Notes +### Battery Charger -## Battery Charger +The board features a single cell Li-Ion/Li-Po charger. When the board is being powered via the micro USB connector, it will charge the battery if connected. -The board features a single cell Li-Ion/Li-Po charger. When the board is being powered via the micro USB connector, it will charge the battery (if connected). +> Make sure you check the polarity of the battery before plugging it in! Connect the positive side to the side marked with a `+`. -## Mechanical Dimensionsde +### Mechanical Dimensionsde ![](/gitbook/assets/pyscan_V0.7_20180416_MecahnicalDimensions.png) -## 3D model for case design +### 3D model for case design -* Please see the 3D model (step format) +* Please see the [3D model](/gitbook/assets/PyScan_v0.7.step) (step format) diff --git a/content/datasheets/expansionboards/pysense.md b/content/datasheets/expansionboards/pysense.md index 19c431a..14487f1 100644 --- a/content/datasheets/expansionboards/pysense.md +++ b/content/datasheets/expansionboards/pysense.md @@ -22,16 +22,17 @@ The pinout of the Pysense is available as a [PDF File](/gitbook/assets/pysense-p ![](/gitbook/assets/pysense-pinout-1.png) - -## Battery Charger +## Notes +### Battery Charger The board features a single cell Li-Ion/Li-Po charger. When the board is being powered via the micro USB connector, it will charge the battery (if connected). +> Make sure you check the polarity of the battery before plugging it in! Connect the positive side to the side marked with a `+`. -## Mechanical Dimensions +### Mechanical Dimensions ![](/gitbook/assets/Pysense_v1.1_MechanicalDimensions_b.png) -## 3D model for case design +### 3D model for case design -* Please see the 3D model (step format) +* Please see the [3D model](/gitbook/assets/PySense_v1.1.step) (step format) diff --git a/content/datasheets/expansionboards/pysense2.md b/content/datasheets/expansionboards/pysense2.md index c57603e..24689b9 100644 --- a/content/datasheets/expansionboards/pysense2.md +++ b/content/datasheets/expansionboards/pysense2.md @@ -19,16 +19,17 @@ The pinout of the Pysense is available as a [PDF File](/gitbook/assets/pysense2- ![](/gitbook/assets/pysense2-pinout.png) - -## Battery Charger +## Notes +### Battery Charger The board features a single cell Li-Ion/Li-Po charger. When the board is being powered via the micro USB connector, it will charge the battery (if connected). +> Make sure you check the polarity of the battery before plugging it in! Connect the positive side to the side marked with a `+`. -## Mechanical Dimensions +### Mechanical Dimensions ![](/gitbook/assets/Pysense_v2.0X_MechanicalDimensions.png) -## 3D model for case design +### 3D model for case design * Please see the [3D model](/gitbook/assets/pysense_v2.0X.step) (Step format) \ No newline at end of file diff --git a/content/datasheets/expansionboards/pytrack.md b/content/datasheets/expansionboards/pytrack.md index ac7926a..f6fab12 100644 --- a/content/datasheets/expansionboards/pytrack.md +++ b/content/datasheets/expansionboards/pytrack.md @@ -23,17 +23,17 @@ The pinout of the Pytrack is available as a [PDF File](/gitbook/assets/pytrack-p ![](/gitbook/assets/pytrack-pinout-1.png) - -## Battery Charger +## Notes +### Battery Charger The board features a single cell Li-Ion/Li-Po charger. When the board is being powered via the micro USB connector, it will charge the battery (if connected). +> Make sure you check the polarity of the battery before plugging it in! Connect the positive side to the side marked with a `+`. - -## Mechanical Dimensions +### Mechanical Dimensions ![](/gitbook/assets/Pysense_v1.1_MechanicalDimensions_b.png) -## 3D model for case design +### 3D model for case design -* Please see the 3D model (step format) +* Please see the [3D model](/gitbook/assets/PyTrack_v1.1.step") (step format) diff --git a/content/datasheets/expansionboards/pytrack2.md b/content/datasheets/expansionboards/pytrack2.md index db80d5b..d14c782 100644 --- a/content/datasheets/expansionboards/pytrack2.md +++ b/content/datasheets/expansionboards/pytrack2.md @@ -19,17 +19,18 @@ The pinout of the Pytrack is available as a [PDF File]( /gitbook/assets/pytrack2-pinout.pdf) ![](/gitbook/assets/pytrack2-pinout.png) - -## Battery Charger +## Notes +### Battery Charger The board features a single cell Li-Ion/Li-Po charger. When the board is being powered via the micro USB connector, it will charge the battery (if connected). +> Make sure you check the polarity of the battery before plugging it in! Connect the positive side to the side marked with a `+`. -## Mechanical Dimensions +### Mechanical Dimensions ![](/gitbook/assets/Pytrack_v2.0X_MechanicalDimensions.png) -## 3D model for case design +### 3D model for case design * Please see the [3D model](/gitbook/assets/pytrack_v2.0X.step) (step format) diff --git a/content/firmwareapi/micropython/usocket.md b/content/firmwareapi/micropython/usocket.md index 48a472d..a0224fe 100644 --- a/content/firmwareapi/micropython/usocket.md +++ b/content/firmwareapi/micropython/usocket.md @@ -40,6 +40,9 @@ s.connect(socket.getaddrinfo('www.micropython.org', 80)[0][-1]) * Family types: `socket.AF_INET`, `socket.AF_LORA`, `socket.AF_SIGFOX` * Socket types: `socket.SOCK_STREAM`, `socket.SOCK_DGRAM`, `socket.SOCK_RAW` + * stream = TCP + * dgram = UDP + * raw = no protocol * Socket protocols: `socket.IPPROTO_UDP`, `socket.IPPROTO_TCP` * Socket options layers: `socket.SOL_SOCKET`, `socket.SOL_LORA`, `socket.SOL_SIGFOX` * IP socket options: `socket.SO_REUSEADDR` @@ -60,9 +63,7 @@ Sockets are automatically closed when they are garbage-collected, but it is reco Bind the `socket` to `address`. The socket must not already be bound. The `address` parameter must be a tuple containing the IP address and the port. -{{% hint style="info" %}} -In the case of LoRa sockets, the address parameter is simply an integer with the port number, for instance: `s.bind(1)` -{{% /hint %}} +>In the case of LoRa sockets, the address parameter is simply an integer with the port number, for instance: `s.bind(1)` #### socket.listen(\[backlog\]) @@ -122,11 +123,9 @@ Return a file object associated with the socket. The exact returned type depends The socket must be in blocking mode; it can have a timeout, but the file object's internal buffer may end up in a inconsistent state if a timeout occurs. -{{% hint style="info" %}} -**Difference to CPython** +> **Difference to CPython** +>Closing the file object returned by `makefile()` **WILL** close the original socket as well. -Closing the file object returned by `makefile()` **WILL** close the original socket as well. -{{% /hint %}} #### socket.read(size) diff --git a/content/gettingstarted/programming/safeboot.md b/content/gettingstarted/programming/safeboot.md index a0e3d0b..9195ce3 100644 --- a/content/gettingstarted/programming/safeboot.md +++ b/content/gettingstarted/programming/safeboot.md @@ -8,10 +8,6 @@ aliases: If powering up normally or upon pressing the reset button, a Pycom module will boot into standard mode; the `boot.py` file will be executed first, followed by `main.py`. It is possible to alter the boot procedure of the module by tying certain pins `high` or `low` when the module boots. -## Bootloader - -If you updated your device before using it, you have already put the device into bootloader mode. This is achieved by connecting `G23` to `GND` while the device boots. If you used a Pysense/Pytrack to update, it did this automatically for you. You only need to put your Pycom module into bootloader mode if you are updating its firmware, or are programming your own low level code. This is not required if you are updating your MicroPython code. - ## Safe Boot Some times the code you have written will prevent you gaining access to the REPL or prevent you updating your code. Some example may be: @@ -37,9 +33,7 @@ If problems occur within the filesystem or you wish to factory reset your module >>> os.fsformat('flash') ``` -{{% hint style="danger" %}} -Be aware, resetting the flash filesystem will delete all files inside the internal device storage (not the SD card) and they cannot be recovered. -{{% /hint %}} +> Be aware, formatting the flash filesystem will delete all files inside the internal device storage (not the SD card) and they cannot be recovered. ## Reset