PICO-CYW43

THIS IS EXPERIMENTAL AND SUBJECT OF CHANGE

The pico_cyw43 module is for the Raspberry Pi Pico W board.

Class: PicoCYW43

An instance of PicoCYW43 represents a Pico-W WiFi module.

new PicoCYW43()

Create an instance of PicoCYW43 class.

const { PicoCYW43 } = require('pico_cyw43');
const pico_cyw43 = new PicoCYW43();

PicoCYW43.getGpio(gpio)

  • gpio<number> CYW43 chip gpio number
  • Returns: <boolean> true if the GPIO is high, false if the GPIO is low.

PicoCYW43.putGpio(gpio, value)

  • gpio<number> CYW43 chip gpio number
  • value<boolean> true to set the GPIO to high, false to set the GPIO to low.
const { PicoCYW43 } = require('pico_cyw43');
const pico_cyw43 = new PicoCYW43();

// Blink the Pico-W's on-board LED
setInterval(() => {
  if (pico_cyw43.getGpio(0)) {
    pico_cyw43.putGpio(0, false); // turn-off LED
  } else {
    pico_cyw43.putGpio(0, true); // turn-on LED
  }
}, 1000);

Class: PicoCYW43WIFI

In Pico-W board, this driver is automatically registered as a default IEEE80211 driver. User don't need to register manually.

This class implements the IEEE802.11 device driver for the CYW43 network module.

In Pico-W this driver is registered as a default IEEE802.11 device driver, but you can also register it manually as below:

const { PicoCYW43WIFI } = require('pico_cyw43');
global.__ieee80211dev = new PicoCYW43WIFI();

Class: PicoCYW43Network

In Pico-W board, this driver is automatically registered as a default network driver. User don't need to register manually

This class implements the network device driver for CYW43 network module.

This module support TCP protocol only.

In Pico-W this driver is registered as a default network driver, but you can also register it manually as below:

const { PicoCYW43Network } = require('pico_cyw43');
global.__netdev  = new PicoCYW43Network();