From 2fb55882d733d8c1e28a49153ef6c3449ebe7998 Mon Sep 17 00:00:00 2001 From: Erg Date: Wed, 27 Nov 2024 17:45:03 +0100 Subject: Restructurisation --- Readme.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'Readme.md') 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. -- cgit v1.2.3-65-gdbad