Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit ecfc88f

Browse files
committed
Update hw examples
1 parent 3ced528 commit ecfc88f

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

examples/WiPy/ca.pem

-1001 Bytes
Binary file not shown.
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,8 @@
1010
Social networks: http://www.fb.com/blynkapp
1111
http://twitter.com/blynk_app
1212
13-
This example shows one of the simplest scripts,
14-
that doesn't define any custom behaviour.
15-
You're still able to do direct pin operations.
16-
17-
NOTE: You have to use the WiPy-specific Blynk library:
18-
https://github.com/wipy/wipy
19-
20-
In your Blynk App project:
21-
Add a Gauge widget, bind it to Analog Pin 5.
22-
Add a Slider widget, bind it to Digital Pin 25.
23-
Run the App (green triangle in the upper right corner).
13+
This example shows how to initialize your ESP32 board
14+
and connect it to Blynk.
2415
2516
Don't forget to change WIFI_SSID, WIFI_AUTH and BLYNK_AUTH ;)
2617
"""
Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,20 @@
1010
Social networks: http://www.fb.com/blynkapp
1111
http://twitter.com/blynk_app
1212
13-
This example shows how to make a secure connection using SSL.
14-
15-
Before running this example:
16-
The server certificate must be uploaded to the WiPy. This
17-
can easily done via FTP. Take the file 'ca.pem' located in
18-
the blynk examples folder and put it in '/flash/cert/'.
19-
Similary to firmware updates, certificates go into the internal
20-
file system, so it won't be visible after being transferred.
21-
22-
In your Blynk App project:
23-
Add a Gauge widget, bind it to Analog Pin 5.
24-
Add a Slider widget, bind it to Digital Pin 25.
25-
Run the App (green triangle in the upper right corner).
13+
This example shows how to initialize your PyCom board
14+
and connect it to Blynk.
2615
2716
Don't forget to change WIFI_SSID, WIFI_AUTH and BLYNK_AUTH ;)
2817
"""
2918

3019
import BlynkLib
3120
from network import WLAN
32-
from machine import RTC
3321

3422
WIFI_SSID = 'YourWiFiNetwork'
3523
WIFI_AUTH = (WLAN.WPA2, 'YourWiFiPassword')
3624

3725
BLYNK_AUTH = 'YourAuthToken'
3826

39-
# Set the current time (mandatory to validate certificates)
40-
RTC(datetime=(2019, 02, 01, 11, 30, 0, 0, None))
41-
4227
# Connect to WiFi
4328
wifi = WLAN(mode=WLAN.STA)
4429
wifi.connect(WIFI_SSID, auth=WIFI_AUTH)
@@ -47,8 +32,8 @@
4732

4833
print(wifi.ifconfig())
4934

50-
# Initialize Blynk with security enabled
51-
blynk = BlynkLib.Blynk(BLYNK_AUTH, ssl=True)
35+
# Initialize Blynk
36+
blynk = BlynkLib.Blynk(BLYNK_AUTH)
5237

5338
while True:
5439
blynk.run()

0 commit comments

Comments
 (0)