---
title: "Circuit python coding for WizFi360-EVB-PICO"
url: "https://maker.wiznet.io/ronpang/projects/circuit-python-coding-for-wizfi360-evb-pico/"
markdown_url: "https://maker.wiznet.io/ronpang/projects/circuit-python-coding-for-wizfi360-evb-pico/md"
type: "WCC: WIZnet Created Content"
author: "ronpang"
author_url: "https://maker.wiznet.io/ronpang/"
original_author: "Ron Pang"
license: "Apache License 2.0 (Apache-2.0)"
published: "2022-09-19"
language: "en"
tags: ["CircuitPython"]
hardware: ["WIZnet WizFi360-EVB-Pico"]
likes: 28
views: 6597
comments: 5
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Circuit python coding for WizFi360-EVB-PICO

> This is a circuitpython coding for WizFi360-EVB-PICO that made by Ron

Original author: Ron Pang

## Components

- **WIZnet WizFi360-EVB-Pico** x 1
- Software: **Adafruit Circuitpython** ([docs](https://docs.circuitpython.org/en/latest/README.html))

## Documents and links

- [HTTP to adafruit IO](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/http/aio_http.py) (code)
- [Blynk](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/blynk/TCP%20blynk.py) (code)
- [MQTT to adafruit io (Single feed topic)](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/MQTT/aio.py) (code)
- [MQTT to adafruit io (Group feed)](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/MQTT/aio_change_to_group.py) (code)
- [WizFi360 firmware upgrade](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/Firmware%20upgrade/firmware%20upgrade.py) (code): Upgrade to the latest version
- [Ping](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/Network/ping.py) (code)
- [Loopback test](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/Network/TCP%20client_loopback.py) (code)

## Article

These code is based on Adafruit's circuitpython ESP AT control to modified.

WizFi360 Firmware version: 1.1.1.9

If you are interested on the codes and commands, please refer to the links below.

1.[ESP AT control - circuitpython](https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol)

2.[WizFi360 AT commands](https://docs.wiznet.io/img/products/wizfi360/wizfi360ds/wizfi360_atset_v1118_e.pdf)

3.[WizFi360 Vs ESP8266](https://docs.wiznet.io/img/products/wizfi360/wizfi360ds/wizfi360_atcp_v102.pdf)

By using WIZnet's WizFi360-EVB-PICO, it required to use AT commands to control WizFi360 to communicate to the world

**Upadtes**

### **MQTT:**

1. Allow to change MQTT Publish topic after connected to adafruit IO

2. Accept JSON method

3. WizFi360 could accept Maximum 3 Subscribe topics

## 📚**Required Software**

### **Bundles:**

1. [Circuit Python 7.0 or above](https://circuitpython.org/board/raspberry_pi_pico/) (it required to use 1 MB from the flash)

2. [Adafruit circuit python bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20211208) - Use the latest version from adafruit bundle page [ESP AT control or download from this github]

### **Required Libraries from adafruit bundle:**

1. adafruit_espatcontrol library or [this library](https://github.com/ronpang/WizFi360-cpy/tree/main/lib/adafruit_espatcontrol)

2. adafruit_request

### **Required codes to run example codes**

1. [Secret.py](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/secrets.py) -> Please modified the information to allow WizFi360 to connect your personal AP and adafruit IO.

2. Example codes

### **Programming and debug software**

1. [Thonny](https://thonny.org/)

## 🤖** Basic Setup**

### **Step 1: How to install circuit Python into WizFi360-EVB-PICO (same method as adding to Raspberry Pi Pico)**

🟥Youtube: [Linux install method](https://www.youtube.com/watch?v=onBkPkaqDnk&list=PL846hFPMqg3h4HpTVO8cPPHZnJIRA4I2p&index=3)

🟥Youtube: [Window install method](https://www.youtube.com/watch?v=e_f9p-_JWZw&t=374s)

### **Step 2: Modified your secret.py and put the file inside the Pico flash**

It is used for saving your AP information and Adafruit IO information to allow WizFi360 to connect.

```
secrets = {
    "ssid": "my access point", # Your AP's or router's name
    "password": "my password", # The password for your AP/router
    "timezone": -5,  # this is offset from UTC
    "github_token": "abcdefghij0123456789",
    "aio_username": "myusername", #adafruit IO username
    "aio_key": "abcdefghij0123456789", #adafruit IO 
}
```

### **Step 3: Add the libraries to your lib section**

It is required to add libraries to the folder lib to allow the codes could run. [![link-lib_image](https://github.com/ronpang/WizFi360-cpy/raw/main/img/lib%20image.PNG)](https://github.com/ronpang/WizFi360-cpy/blob/main/img/lib%20image.PNG)

### **Step 4: Put the example codes to flash**

Draging the examples codes to the flash inside the pico board, it should run the software easily.

### **Step 5: Setting the GPIO PINS**

It is required to modify the GPIO PIN settings to allow the RP2040 coould communicate with WizFi360

```
RX = board.GP5 #TXD1 pin for WizFi360
TX = board.GP4 #RXD1 pin for WizFi360
resetpin = DigitalInOut(board.GP20) 
rtspin = False
uart = busio.UART(TX, RX, baudrate=11520, receiver_buffer_size=2048)
```

## 📓**Examples:**

1. [TCP Client](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/Network/TCP%20client_loopback.py)

2. [Adafruit io (MQTT)](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/MQTT/aio.py)

3. [Adafruit io (HTTP)](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/http/aio_http.py) - Used the same coding method as ESP AT control

4. [Ping](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/Network/ping.py) - Used the same coding method as ESP AT control

5. [Blynk](https://github.com/ronpang/WizFi360-cpy/blob/main/examples/blynk/TCP%20blynk.py)

---

Source: https://maker.wiznet.io/ronpang/projects/circuit-python-coding-for-wizfi360-evb-pico/
