Raspberry Pi Pico W へのコメント https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%83%b3%e3%82%a6%e3%82%a7%e3%83%96%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8b%e3%82%89%e3%82%aa%e3%83%b3%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8bled-on-raspberry-pi/ 木, 01 Aug 2024 16:09:07 +0000 一刻一刻 1 https://wordpress.org/?v=6.9.4 トントン https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%83%b3%e3%82%a6%e3%82%a7%e3%83%96%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8b%e3%82%89%e3%82%aa%e3%83%b3%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8bled-on-raspberry-pi/#comment-22499 木, 01 Aug 2024 16:09:07 +0000 https://picockpit.com/raspberry-pi/?p=2693#comment-22499 Gunther への返信。

J’ai résolu le problème en ajoutant la ligne :
r = r[:50]
avant
led_on = r.find(‘?led=on’)
led_off = r.find(‘?led=off’)

Cela retire les caractères superflus de la requête

]]>
グンター より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%83%b3%e3%82%a6%e3%82%a7%e3%83%96%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8b%e3%82%89%e3%82%aa%e3%83%b3%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8bled-on-raspberry-pi/#comment-3942 Mon, 28 Nov 2022 00:53:51 +0000 https://picockpit.com/raspberry-pi/?p=2693#comment-3942 I tried to comment, but somehow the comment does not come out correctly…

]]>
グンター より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%83%b3%e3%82%a6%e3%82%a7%e3%83%96%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8b%e3%82%89%e3%82%aa%e3%83%b3%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8bled-on-raspberry-pi/#comment-3941 Mon, 28 Nov 2022 00:51:05 +0000 https://picockpit.com/raspberry-pi/?p=2693#comment-3941 The search by find function does also return a value if eg. the referrer contains the ‘led=xx’ string. So both led_on and led_off get a positive value at the same time and the LED is switched off again, when it was desired to switch on. To overcome this, the if statement has to be extended to check for a small index value (I used 20 only as a rule of thumb):

if (led_on > -1 and led_on -1 and led_off < 20):
Now it works as expected.

]]>
シャルル https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%83%b3%e3%82%a6%e3%82%a7%e3%83%96%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8b%e3%82%89%e3%82%aa%e3%83%b3%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8bled-on-raspberry-pi/#comment-2629 Tue, 25 Oct 2022 20:51:40 +0000 https://picockpit.com/raspberry-pi/?p=2693#comment-2629 In line 100 you use get_html() function. When I run your code I get a ‘get_html’ isn’t defined error.

]]>
イアン より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%83%b3%e3%82%a6%e3%82%a7%e3%83%96%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8b%e3%82%89%e3%82%aa%e3%83%b3%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8bled-on-raspberry-pi/#comment-1296 Sun, 17 Jul 2022 19:15:57 +0000 https://picockpit.com/raspberry-pi/?p=2693#comment-1296 Pablo への返信。

Hi Pablo – make sure you are using the latest UF2 file for the Pico W (not just the Pico) – found here. https://www.raspberrypi.com/documentation/microcontrollers/micropython.html

The network module is there as standard!

]]>
パブロ より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%83%b3%e3%82%a6%e3%82%a7%e3%83%96%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8b%e3%82%89%e3%82%aa%e3%83%b3%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8bled-on-raspberry-pi/#comment-1269 Wed, 13 Jul 2022 16:31:56 +0000 https://picockpit.com/raspberry-pi/?p=2693#comment-1269 Error found when i trie it

%Run -c $EDITOR_CONTENT
Traceback (most recent call last):
File “”, line 1, in
ImportError: no module named ‘network’

]]>