Raspberry Pi & GPIO

pinout === pin out / p in out

pi@raspberrypi:~ $ pinout
,--------------------------------.
| oooooooooooooooooooo J8 +====
| 1ooooooooooooooooooo | USB
| +====
| Pi Model 3B V1.2 |
| +----+ +====
| |D| |SoC | | USB
| |S| | | +====
| |I| +----+ |
| |C| +======
| |S| | Net
| pwr |HDMI| |I||A| +======
`-| |--------| |----|V|-------' Revision : a22082
SoC : BCM2837
RAM : 1024Mb
Storage : MicroSD
USB ports : 4 (excluding power)
Ethernet ports : 1
Wi-fi : True
Bluetooth : True
Camera ports (CSI) : 1
Display ports (DSI): 1 J8:
3V3 (1) (2) 5V
GPIO2 (3) (4) 5V
GPIO3 (5) (6) GND
GPIO4 (7) (8) GPIO14
GND (9) (10) GPIO15
GPIO17 (11) (12) GPIO18
GPIO27 (13) (14) GND
GPIO22 (15) (16) GPIO23
3V3 (17) (18) GPIO24
GPIO10 (19) (20) GND
GPIO9 (21) (22) GPIO25
GPIO11 (23) (24) GPIO8
GND (25) (26) GPIO7
GPIO0 (27) (28) GPIO1
GPIO5 (29) (30) GND
GPIO6 (31) (32) GPIO12
GPIO13 (33) (34) GND
GPIO19 (35) (36) GPIO16
GPIO26 (37) (38) GPIO20
GND (39) (40) GPIO21 For further information, please refer to https://pinout.xyz/
pi@raspberrypi:~ $

Pinout

引脚排列

https://pinout.xyz/

GPCLK0

https://pinout.xyz/pinout/pin7_gpio4

BCM 17

https://pinout.xyz/pinout/pin11_gpio17

3v3

3.3 v 正极 +,高电平

5v

5v 正极 +,高电平

GND

Ground 负极 - ,接地,低电平

GPIO

general purpose input/output

普通 GPIO,如 GPIO 17,可以控制电平的高低状态,改变 LED 的显示状态

特殊 GPIO, 如 ,一般高级功能才用的到,暂不讲解

LED 点亮

电路图,


电源正极(3v3 pin) => 电阻 => LED 正极(长脚) => 电源负极(GND pin) 面包板
电阻 200Ω (大于 50Ω? 200KΩ 不好使?)
LED 长正短负
杜邦线,红正黑负

面包板,正负极是安排划分的???

红线接正极,黑线接负极

220欧姆电阻器, 200k is not ok

触觉 按钮 开关

led 长针是正极,短针是负极

https://youtu.be/XrlR7cHSltw?t=370

You can test whether your GPIO pins and LEDs are working by building the circuit below. You can use any resistor over about 50Ω.

The LED is connected directly to the GND pin and the 3V3 pin via the 330 Ohm resistor, and should light up.

Be sure to connect your LED the correct way round; the longer leg should be connected to the 3V3 pin:

GPIO with Scratch 2

GPIO with Python

refs

https://www.cnblogs.com/xgqfrms/p/13474349.html

https://www.raspberrypi.org/documentation/usage/gpio/



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


Raspberry Pi & GPIO的更多相关文章

  1. Raspberry Pi GPIO Protection

    After damaging the GPIO port on our raspberry pi while designing a new solar monitoring system we de ...

  2. Pi# - Raspberry Pi GPIO Library for .NET

    Project Description Pi# (pronounced “Pi Sharp”) is a library to expose the GPIO functionality of the ...

  3. (0)开始 Raspberry Pi 项目前需要知道的 10 件事

    https://www.digikey.cn/zh/articles/techzone/2017/feb/10-things-to-know-before-starting-a-raspberry-p ...

  4. (RaspBerry Pi) Python GPIO 基本操作

    目前打算由潛入深慢慢學習RaspBerry Pi, 所以先由最容易下手的Python進入樹莓派的世界 首先要使用 GPIO 需要利用RPI.GPIO package想當然爾必須先安裝 所以先執行下列命 ...

  5. 树莓派 Raspberry PI之GPIO

    树莓派 Raspberry PI之GPIO 树莓派各版本硬件原理图:https://www.raspberrypi.org/documentation/hardware/raspberrypi/REA ...

  6. RASPBERRY PI 外设学习资源

    参考: http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html Raspberry Pi         Get st ...

  7. Raspberry Pi UART with PySerial

    参考:http://programmingadvent.blogspot.hk/2012/12/raspberry-pi-uart-with-pyserial.html Raspberry Pi UA ...

  8. Hello Raspberry Pi

    Raspberry Pi 入手好一段时间了,原意是想撸 linux,但是后来一整年都在忙孩子房子户口本子的事,这玩意也就搁了一年尘. 最近终于被生活折腾到了尾声,开始找一些东西来折腾折腾. 一.什么是 ...

  9. 三大主流开源硬件对比:Arduino vs BeagleBone vs Raspberry Pi

    个人总结: Arduino就是个AVR单片机,个人觉得更适合玩电子的,社区也很活跃. BeagleBone是ARM Cortex-A8,属于嵌入式,价格高于Pi,但是许多方面拥有超越 Pi 的优 势, ...

随机推荐

  1. 后台故障&性能分析常用工具

    说明 本文是一个归纳总结,把常用的一些指令,及它们常用的option简单记录了一下,目的是当我们需要工具去定位问题的时候,能够从中找到合适的工具,具体的用法网上有很多博文了,当然还有man手册.参考了 ...

  2. Gitlab + DRBD HA

    部署简介: 为了gitlab有容灾的能力,所以部署一个HA的小集群,用到的软件有 gitlab 和brbd,目前现有环境为 master节点 系统版本:CentOS release 6.5 (Fina ...

  3. java生成Https证书,及证书导入的步骤和过程

    以下是相关的Tomcat,JDK和Windows环境: Tomcat版本:tomcat-7.0.55 JDK版本: jdk1.6.0 目录所在的位置: Serve的目录:D:\server\tomca ...

  4. 函数式编程(__slots__)

    正常情况下,当我们定义了一个class,创建了一个class的实例后,我们可以给该实例绑定任何属性和方法,这就是动态语言的灵活性.先定义class: class Student(object): pa ...

  5. c++nullptr(空指针常量)、constexpr(常量表达式)

    总述     又来更新了,今天带来的是nullptr空指针常量.constexpr(常量表达式)C++的两个用法.Result result_fun = nullptr;constexpr stati ...

  6. 2019牛客暑期多校训练营(第八场)A.All-one Matrices(dp)

    题意:又是最大01矩阵的模型了 这次要找的是极大0/1矩阵的个数 思路:我们像处理最大01矩阵那样处理一下边界 由于我们上左右已经无法再继续扩展 我们只需要用前缀和记录一下是否可以向下扩展(即判断当前 ...

  7. 牛客NC15879 A Simple Problem

    传送门:A Simple Problem 题意 给定两个序列s1和s2,同样的数字可以用相同的别的数字代替(并且也可以是出现过的数字),问s2在s1中出现了几次. 题解 首先预处理一下这两个序列,因为 ...

  8. AtCoder Beginner Contest 164

    比赛链接:https://atcoder.jp/contests/abc164 A - Sheep and Wolves #include <bits/stdc++.h> using na ...

  9. AcWing 247. 亚特兰蒂斯 (线段树,扫描线,离散化)

    题意:给你\(n\)个矩形,求矩形并的面积. 题解:我们建立坐标轴,然后可以对矩形的横坐标进行排序,之后可以遍历这些横坐标,这个过程可以想像成是一条线从左往右扫过x坐标轴,假如这条线是第一次扫过矩形的 ...

  10. Codeforces Round #550 (Div. 3) F. Graph Without Long Directed Paths (二分图染色)

    题意:有\(n\)个点和\(m\)条无向边,现在让你给你这\(m\)条边赋方向,但是要满足任意一条边的路径都不能大于\(1\),问是否有满足条件的构造方向,如果有,输出一个二进制串,表示所给的边的方向 ...