Hi
I bought a Raspberry Pico W before Christmas and started to play around with it. Got it to connect with Thonny and started talking to it, but when I try to connect it to WiFi I keep getting a syntax warning I don’t understand and can’t fix. It all looks OK to me but it won’t run. I’ve added Xs where the SSID and Password were for privacy reasons.
import network
import socket
from time import sleep
from picozero import pico_temp_sensor, pico_led
import machine
I apologize if I’ve broken any rules as this is my first post and I’m not a coder, obviously. I don’t have any Python knowledge so I came here in the hope someone will know what was wrong.
All this started because I bought a book called “The Latest raspberry Pi Pico W Guide 2022” and tried one of the scripts “Connect your raspberry pi pico W to a wifi network” Well if that script was wrong that means every copy of that book has the wrong script in it.
Could you suggest a decent MicroPython book I could get started with?
On most American keyboards, the `/~ key should be to the left of the 1/! key.
It is possible that the book author intended that xxxxxxxxxx should include needed quotes. But omission of a closing ) is definitely a typo. Mistakes in printed code (and math equations) is an unfortunate reality and especially bad when one does not know the language. Consider doing at least a chapter or two of the Python Tutorial. The Python Tutorial — Python 3.11.1 documentation