some beautification

This commit is contained in:
gijsio
2020-07-20 13:59:31 +02:00
parent d2a3131e23
commit b4940fd8fa
9 changed files with 23 additions and 22 deletions

View File

@@ -6,11 +6,8 @@ aliases:
Pycom ecosystem makes IoT development easy
* Choose [IoT hardware](products) which fit your project requirements.
* Install Pymakr plugin in [Atom](https://atom.io/packages/pymakr) or [VS Code](https://marketplace.visualstudio.com/items?itemName=pycom.Pymakr) and start with your IoT project in seconds.
* 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/)

View File

@@ -8,10 +8,9 @@ aliases:
This chapter describes modules (function and class libraries) that are built into MicroPython. There are a number of categories for the available modules:
* Modules which implement a subset of standard Python functionality and are not intended to be extended by the user.
* Modules which implement a subset of Python functionality, with a provision for extension by the user (via Python code).
* Modules which implement MicroPython extensions to the Python standard libraries.
* Modules specific to a particular port and thus not portable.
* [implemented by Pycom](/firmwareapi/pycom/)
* [Implemented by Micropython](/firmwareapi/micropython/)
* External or custom modules and libraries
## Note about the availability of modules and their contents

View File

@@ -62,8 +62,8 @@ If you are using Atom, it is important to check at this point that Atom has succ
![](/gitbook/assets/atom_project.png)
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 %}}
>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.
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`.
@@ -140,11 +140,11 @@ Now that we got the basic example running, you can continue with the links below
* [Get started using the FTP and Telnet Server](/gettingstarted/programming/ftp/)
* [Connect using Pybytes](/pybytes/gettingstarted/)
* [Connect using Pybytes](/pybytes/getstarted/)
* [Registering with a network](/gettingstarted/network/)
* [Registering with a network](/gettingstarted/registration/)
* [Updating the firmware of your device](/firmwareupdate/)
* [Updating the firmware of your device](/updatefirmware/)
<!--## Step 4: (Optional) Connect through WiFi (Telnet & FTP)

View File

@@ -0,0 +1,6 @@
---
title: "Advanced"
aliases:
- chapter/tutorials/advanced
---
Under construction!

View File

@@ -9,7 +9,6 @@ aliases:
This example is a simple ADC sample. For more information please see [`ADC`](/firmwareapi/pycom/machine/adc).
```python
from machine import ADC
adc = ADC(0)
adc_c = adc.channel(pin='P13')
@@ -22,7 +21,6 @@ adc_c.value()
Currently the ESP32's ADC is not calibrated from the factory. This means it must be calibrated each time you wish to use it. To do this you must firstly measure the internal voltage reference. The following code will connect the 1.1v reference to `P22`
```python
from machine import ADC
adc = ADC()
@@ -33,7 +31,6 @@ adc.vref_to_pin('P22')
Now that the voltage reference is externally accessible you should measure it with the most accurate voltmeter you have access to. Note down the reading in millivolts, e.g. `1120`. To disconnect the 1.1v reference from `P22` please reset your module. You can now calibrate the ADC by telling it the true value of the internal reference. You should then check your calibration by connecting the ADC to a known voltage source.
```python
# Set calibration - see note above
adc.vref(1100)

View File

@@ -9,7 +9,6 @@ aliases:
The following example receives data from a light sensor using I2C. Sensor used is the BH1750FVI Digital Light Sensor.
```python
import time
from machine import I2C
import bh1750fvi
@@ -28,7 +27,6 @@ while(True):
Place this sample code into a file named `bh1750fvi.py`. This can then be imported as a library.
```python
# Simple driver for the BH1750FVI digital light sensor
class BH1750FVI:
@@ -56,7 +54,6 @@ class BH1750FVI:
This is the same code, with added LoRa connectivity, sending the lux value from the light sensor to another LoRa enabled device.
```python
import socket
import time
import pycom

View File

@@ -10,8 +10,7 @@ This tutorial explains how to connect and read data from a DS18x20 temperature s
## Basic usage
```python
```
import time
from machine import Pin
from onewire import DS18X20
@@ -31,7 +30,6 @@ while True:
## Library
```python
#!/usr/bin/env python3
"""

View File

@@ -21,3 +21,10 @@ while not lte.isattached()"
print("LTE modem attached!")
```
>Note: the first time, it can take a long while to attach to the network.
If you want to check the status of the modem while attaching, you can use the following commands:
```python
print(lte.send_at_cmd('AT!="showphy"') # get the PHY status
print(lte.send_at_cmd('AT!="fsm"') # get the System FSM
```

View File

@@ -2755,7 +2755,7 @@ blockquote {
font-size: 14px;
font-weight: 300;
background-color:rgba(0,128,0,0.7);
border-radius: 5px;
border-radius: 3px;
}
code,
kbd {