Wiznet makers

Benjamin

Published January 04, 2024 ©

46 UCC

11 WCC

4 VAR

0 Contests

0 Followers

1 Following

Original Link

[Recuration] Using Raspberry Pi Pico(W5100S-EVB-Pico) ADC

This basic GPIO input/output testing provides foundational knowledge for using the Raspberry Pi Pico in various electronics projects.

COMPONENTS Hardware components

WIZnet - W5100S-EVB-Pico

x 1

Software Apps and online services

Adafruit - Circuitpython

x 1


PROJECT DESCRIPTION

The tests were conducted on a Raspberry Pi Pico with rp2040, using Adafruit CircuitPython 7.2.0. For easy connection to a breadboard and jumper wires, pin headers were soldered on the top side of the Raspberry Pi Pico. While this arrangement makes accessing the BOOTSEL button slightly inconvenient, it's not a significant issue as firmware updates are infrequent.

For GPIO output testing, an LED that can be connected to 8 ports was used. Each pin of this LED was connected to the GP2 to GP9 ports on the Raspberry Pi Pico board, and the last GND was connected together. The following code was written to test the GPIO output by setting each port as an output port and toggling the LEDs ON and OFF at 0.5-second intervals:

import board
import digitalio as io
import time

LEDs = []
LEDpin = [board.GP2, board.GP3, board.GP4, board.GP5,
          board.GP6, board.GP7, board.GP8, board.GP9]

for i in range(len(LEDpin)):
    led = io.DigitalInOut(LEDpin[i])
    led.direction = io.Direction.OUTPUT
    LEDs.append(led)

while True:
    for l in LEDs:
        l.value = True
    time.sleep(0.5)
    for l in LEDs:
        l.value = False
    time.sleep(0.5)
 

When this code is saved as code.py and executed in the Thonny IDE, all 8 LEDs simultaneously toggle ON and OFF.

Next, a GPIO input test was performed. For this, one side of a switch was connected to +3.3V and the other side to the GP2 port. The default state of the switch is set to False due to the Pull.DOWN configuration. When pressed, the switch connects to +3.3V, resulting in a High state, or True output. To minimize frequent print outputs, sleep was used. The code used for this test is as follows:

import time
import board
import digitalio

button = digitalio.DigitalInOut(board.GP2)
button.switch_to_input(pull=digitalio.Pull.DOWN)

while True:
    print(button.value)
    time.sleep(0.5)
 

Running this code in Tonny as code.py results in the display of True when the switch is pressed and False as the default state when it is released.

This basic GPIO input/output testing provides foundational knowledge for using the Raspberry Pi Pico in various electronics projects.

Documents
Comments Write

Similar projects you might like

RaspberryPi Zero W, W5100S-EVB-Pico, AWS IoT Core, MQTT

LTE CATM1 Mini Router with W5100S-EVB-Pico

taylor
  • 1220

  • 0

This deep learning assistant recognizes work patterns to detect drowsiness and distraction, and uses a Raspberry Pi Pico and YOLOv8 nano model.

Paragon Project: Deep Learning Work Assistant

Benjamin
  • 1149

  • 0

Implementing IoT remote device control on Raspberry Pi's RP2040 + W5500

Implementing IoT remote device control on Raspberry Pi's RP2040 + W5500

simons
  • 1046

  • 0

With your voice, you can control light, temperature, and bed gradient!!

[Recuration] Smart Bed System Using webOS

josephsr
  • 795

  • 0

일부 제조업체는 LLM Steak Classifier AIOT Bot 으로 알려진 Pi 기반 AI 고기 요리 모니터를 만든 개발자 Simon처럼 맛볼 수 있는 Raspberry Pi 프로젝트 를 만드는 방법을 확실히 알고 있습니다. 이 프로젝트는 실제 센서와 함께 ChatGPT를 사용하

Raspberry Pi 프로젝트가 잘 완료되었습니다. AI를 사용하여 고기를 완벽하게 요리합니다.

simons
  • 917

  • 0

Do not Miss the IoT Module by Wiznet with RP2040 and Ethernet

Do not Miss the IoT Module by Wiznet with RP2040 and Ethernet

simons
  • 651

  • 0

RRW_LAB aka Remora RPi/W5500 LinuxCNC Adapter Board is a CNC controller board for use with LinuxCNC

Remora RPi/W5500 LinuxCNC Adapter Board

louis_m
  • 1394

  • 0

A very simple program that teaches you how to use the W5100S-EVB-Pico 2 on the Web Editor with CircuitPython and control through IOT platforms such as Adafruit

Simple LED Project with W5100S-EVB-Pico 2, CircuitPython and Adafruit IO

arnoldho
  • 40

  • 0