Raspberry Pi Pico W supported by Arduino?

Today Raspberry Pi Pico W was announced. Is there support for it and/or the Infineon CYW43439?

ESP32 gets some competition.

Today, pretty sure the answer is no. In a few weeks or months, perhaps. The Arduino developers don't post here to reveal their plans.

Hi, There is already support for the wifi chip in the C/C++ SDK for RP2040, according to Eben. It shouldn't be to difficult to leverage that alongside the 'standard' Pi pico board code in the Arduino IDE. I've just ordered two of these from Mauser in Portugal. I'll post any progress I make.
Icebuster is right, so far I've been using ESP8266/32 as servers in a distributed control system. Unfortunately the quality of these is somewhat variable, so a replacement would be useful.

Some news. First, there are still problems with the SDK support for the wi-fi chip. These affect both compiled C/C++ code and the Micropython support built on top of them. These affect the access-point security, inasmuch as an AP may not be secured, or secured and inaccessible. Testing the AP mode on Micropython is further fraught, because Pico docs are not up to date, and contain hangovers from ESP8266/32.

Sorry, left off the last bit:
Earle's work on P2040
contains in the last chapters info on how to incorporate Pico SDK library code into Arduino. I'll be looking at that.
Further:
Hi. Despite updates by raspberry pi, Access Points simply do not work.
I've checked the Infineon code, a zip is available: cyw43-driver-195dfcc10bb6f379e3dea45147590db2203d3c7b.zip. In that the ssid, auth, key and channel are all supported. The faults lie within the raspberry pi SDK, and in the Micropython implementation sitting on top of this. Currently, the board is UNUSABLE as an access point.

Have a look to GitHub - earlephilhower/arduino-pico: Raspberry Pi Pico Arduino core, for all RP2040 boards
The release will work flawless.

Hi, yes the latest library from Earle works fine, with several really good examples. One thing that is not made clear is how to assign a static IP address to a socket server on Pico W. As the example wifi server by Earle shows, the code is remarkably similar to that used for the ESP8266 (WEMOS D1 mini), so I bit the bullet and hacked Earles example with my solution for assigning a static IP. I present and example below. If anyone knows of a better method, please let me know.

// picoboy.ino
// 13th September 2022 Joe Brown.
// Basic socket server with static IP address.
// Wifi sections based on Earle's example WiFiServer credited below.
// Additions to wifi setup were to make IP address static. This follows
// my strategy  discovered for WEMOS D1 mini (ESP8266).
// There may be a better way, but I don't know it.
// 'WiFiServer' Placed in the public domain by Earle F. Philhower, III, 2022
// Example php and javascript code is appended as comments at end.

#include <WiFi.h>
#ifndef STASSID
#define STASSID "Wat2Much"
#define STAPSK "N0t3NuF"
#define _USE_SERIAL 
#endif
const char* ssid = STASSID;
const char* password = STAPSK;
int port = 29032; // base-36 'MEG'

WiFiServer server(port);
// client cmd reception buffer and count
uint8_t buf[32];
int count = 0;

// I don't like using delay(), preferring to yield whilst waiting for something
unsigned long lastmilli = 0;
const unsigned long del1000 = 1000;
const unsigned long del200 = 200;
const unsigned long del10 = 10;
void setup() 
{
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH);
  WiFi.begin(ssid, password);
  WiFi.mode(WIFI_STA);
  #ifdef _USE_SERIAL
    Serial.printf("Connecting to '%s' with '%s'\n", ssid, password);
  #endif
  while (WiFi.status() != WL_CONNECTED) 
  {
    // delay with yield
    lastmilli = millis();
    while ((millis() - lastmilli) < del1000)
        yield();
    #ifdef _USE_SERIAL
      Serial.println("Connecting..");
    #endif
  }
  // Now disconnect, setup static IP and re-connect
  WiFi.disconnect();
  IPAddress ip(192,168,1,75); 
  IPAddress gateway(192,168,1,1);   
  IPAddress subnet(255,255,255,0); 
  WiFi.config(ip, gateway, subnet);
  WiFi.begin(ssid, password);
  
  while (WiFi.status() != WL_CONNECTED) 
  {
    #ifdef _USE_SERIAL
      Serial.print(".");
    #endif
    lastmilli = millis();
    while ((millis() - lastmilli) < del1000)
        yield();
  }
  #ifdef _USE_SERIAL
    Serial.printf("\nConnected to WiFi\n\nConnected to server at %s:%d\n", WiFi.localIP().toString().c_str(), port);
  #endif
  server.begin();
}

void heartbeat() 
{
  static byte heartState = 1;
  static unsigned long previousBeat = millis();
  unsigned long currentMillis;
  
  currentMillis = millis();
  if (currentMillis - previousBeat >= 500)
  {
    previousBeat = currentMillis;
    heartState ^= 1;
    digitalWrite(LED_BUILTIN, heartState); // on board LED
    //do any more timed jobs here
   }
}

void loop() 
{
  //delay 200ms
  lastmilli = millis();
  while ((millis() - lastmilli) < del200)
     yield();
     
  heartbeat(); // show I'm alive..
     
  WiFiClient client = server.available();
  if (!client) 
  {
    return;
  }
  
  // My client (HTML5/Javascript) uses a php gateway on my local intranet
  // to forward commands and requests.
  // These appear here as (in order) 'C', <cmd count>, cmd, [param1, param2 ...]
  // as you can see the minimum data count is 3, which would be a cmd without parameters
  // Note that a reply to the client must usually be sent, even if it's 1 byte only.
  if (client.available() > 0) // there is data?
  {
    while (client.available() > 0) // whilst there is data, read it into buffer
    {
      uint8_t c = client.read();
      buf[count++] = c;
      #ifdef _USE_SERIAL
        Serial.print(c, HEX); // debug printout
        Serial.print(", ");
      #endif
    }
    #ifdef _USE_SERIAL
      Serial.println();
    #endif
    if ( count >= 3 && count == (buf[1] + 2)) // cmd complete?
    {
        client.write(buf[3]); // return 1st parameter in this example
    }
    else
      client.write('\n');
    count = 0;
    client.flush();
  }
  
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.