summaryrefslogtreecommitdiff
path: root/Readme.md
diff options
context:
space:
mode:
authorErg <uinarf@autistici.org>2024-11-27 17:45:03 +0100
committerErg <uinarf@autistici.org>2024-11-27 17:45:03 +0100
commit2fb55882d733d8c1e28a49153ef6c3449ebe7998 (patch)
tree5487847741f949a95b79a2f9f2046866c1dc9358 /Readme.md
parent6cb8d8a2a42d99e6440a2c0c74c08eca44c2d2df (diff)
downloadPico-2fb55882d733d8c1e28a49153ef6c3449ebe7998.tar.gz
Pico-2fb55882d733d8c1e28a49153ef6c3449ebe7998.tar.bz2
Pico-2fb55882d733d8c1e28a49153ef6c3449ebe7998.zip
RestructurisationHEADmaster
Diffstat (limited to 'Readme.md')
-rw-r--r--Readme.md18
1 files changed, 13 insertions, 5 deletions
diff --git a/Readme.md b/Readme.md
index 5bd405f..0c0f5c7 100644
--- a/Readme.md
+++ b/Readme.md
@@ -4,9 +4,9 @@ and feeds it to MQTT on a wireless connection.
Before you can use it you need to:
- connect onewire sensor to Pico,
-- set up MQTT broker on a server uneder your control,
+- set up MQTT broker on a server,
- optionally, but highly advisable, setup ntpd server in local network,
-- set up certificates,
+- set up certificates (check out the MQTT_for_pie repo),
- provide settings in config.py. Skeleton in config.py.example
Notes:
@@ -14,8 +14,16 @@ Notes:
In order to test Pico, best use Thonny.
At the time of writing this (Jun 2024), you won't be able to see live
interpreter in PyCharm
-Device path is /dev/ttyACM0
-To connect to it, add your user to dialout group.
+You will need kernel config options enabled:
+ (Most likely:)
+ CONFIG_USB_SERIAL_GENERIC
+ CONFIG_USB_SERIAL_SIMPLE
+ (Definitely:)
+ CONFIG_USB_ACM
+
+Device path should be /dev/ttyACM0
+
+To connect to it, add your user to dialout group.
Alternatively change permissions on that device to something like:
chmod o+rw /dev/ttyACM0
Or change owner on that device to your user
@@ -27,7 +35,7 @@ led = Pin("LED", Pin.OUT)
Before using tls (mosquitto, requests) you'll need to set time, for instance:
import ntptime
ntptime.settime()
-Be aware that default timeout on a socket there is 1 second, which may not be enough.
+Be aware that default timeout on a socket is 1 second, which may not be enough.
I'm using usocket directly so that I can set timeout to a larger value.
The hard part is to deal with timeout from ntp server.
I managed to cut down timeouts drastically by running my own ntp server on local network.