mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 12:05:39 +01:00
Update dashboard.md
made the example actually work :)
This commit is contained in:
@@ -12,7 +12,7 @@ In this section, we will explain how to create widgets for data visualisation an
|
||||
|
||||
## Step 1: Setup a Pymakr Project
|
||||
|
||||
1. Create a project in Pymakr called `Pybytes_signals`, and add the following code to `main.py`. This python application will send data from the array every 5 seconds to Pybytes.
|
||||
1. Create a project in Pymakr called `Pybytes_signals`, and add the following code to `main.py`. This python application will send data every 5 seconds to Pybytes.
|
||||
|
||||
```python
|
||||
# Import what is necessary to create a thread
|
||||
@@ -21,8 +21,7 @@ In this section, we will explain how to create widgets for data visualisation an
|
||||
|
||||
# Send data continuously to Pybytes
|
||||
while True:
|
||||
for i in range(0,10):
|
||||
|
||||
for i in range(0,20):
|
||||
pybytes.send_signal(math.sin(i*math.pi))
|
||||
print('sent signal {}'.format(i))
|
||||
time.sleep(10)
|
||||
@@ -30,6 +29,8 @@ In this section, we will explain how to create widgets for data visualisation an
|
||||
|
||||
2. Press *Upload* button to upload the code into your device.
|
||||
|
||||
>Note that if you have a Pytrack or Pysense expansion board, you could also sent sensor data instead!
|
||||
|
||||
|
||||
## Step 2: Add a signal from your device
|
||||
|
||||
|
||||
Reference in New Issue
Block a user