Code Monkey home page Code Monkey logo

rp2040-peripheral-demo's Introduction

PicoRuby RP2040 Peripheral Demo

Peripherals

  • GPIO: Raspberr Pi Pico on-board LED
  • UART: FTDI USB to TTL Serial Adapter Cable (3.3V)
  • I2C: PCF8523 RTC module
  • ADC: RP2040 on-chip temperature sensor

Wiring

Note: The wire colors in the picture and in the table are different.

Function Raspi Pico Peripheral
GPIO GPIO 25 (Connected internally) LED
UART GPIO 0 Serial Adapter RX (Yellow)
UART GPIO 1 Serial Adapter TX (Orange)
UART GND Serial Adapter GND (Black)
VBUS(5V) Serial Adapter VCC (Red)1
I2C GPIO 4 PCF8523 SDA
I2C GPIO 5 PCF8523 SCL
I2C GND PCF8523 GND
I2C VBUS(5V)2 PCF8523 VCC
ADC ADC4 (Connected internally) Temperature sensor

Build by yourself or use a release binary

Prerequisites

  • CMake
  • raspberrypi/pico-sdk
    • tag 1.5.0
    • PICO_SDK_PATH
  • Raspberry Pi Pico
    • Other RP2040 boards should work making sure to connect appropriate pins

Build

git clone this repo and cd into it.

rake

Then you'll get build/PicoRuby-RP2040-Peripheral-Demo.uf2.

Install and run

  • Install PicoRuby-RP2040-Peripheral-Demo.uf2 into RP2040
  • Connect the USB serial cable to the host PC
  • Open a serial terminal with values below:
    entry value
    Baudrate 115200
    Data bits 8
    Stop bits 1
    Parity none
    Flow control none
  • Start RP2040 by connecting a power or pushing the reset button

Usage

You can figure it out in mrblib/app.rb

COM18.-.Tera.Term.VT.2023-04-04.14-47-29.mp4

Footnotes

  1. Optional. Connect if you want to supply bus power from the cable

  2. 3V3 also should work though, 5V would be better for the reliability of switching over from battery

rp2040-peripheral-demo's People

Contributors

hasumikin avatar

Stargazers

 avatar vickash avatar Keita Watanabe avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.