Coder Social home page Coder Social logo

硬件: 树莓派: Raspberry Pi 4B about blog HOT 5 OPEN

xvno avatar xvno commented on August 16, 2024
硬件: 树莓派: Raspberry Pi 4B

from blog.

Comments (5)

xvno avatar xvno commented on August 16, 2024

安装

硬件

  1. TF 卡: 容量8G以上, 目前只有尝试过三星U3 64G/256G
  2. 电源: 直流输出 5V 3A变压器/充电器, (5V 2A DC 也能供起 )
  3. micro-HDMi 转 HDMI 数据线

软件

  1. Raspberry Pi Manager: 擦除 TF 卡数据, 并将 OS 镜像写入TF卡
  2. OS: Debian Buster with Raspberry Pi Desktop(2020-02-13-raspbian-buster-full.img) 不要使用 2020-02-12 释出的版本

步骤

  1. 用 Manager 格式化 TF 卡, 并将 .img 镜像写入卡中, 修改 /boot/config.txt 中 hdmi 相关配置, 防止显示器接收不到输出信号
  2. 插卡, 接显示器, 接键盘鼠标, 上电
  3. 按步骤操作>>>

from blog.

xvno avatar xvno commented on August 16, 2024

配置

账户

sudo passwd
sudo passwd pi

SSH

  1. 树莓派配置, 开启 ssh; 或者创建/boot/ssh文件
  2. 记录 IP 地址
  3. 工作机上用ssh-copy-id pi@<pi's ip>上传公钥
  4. 配置工作机上的.ssh/config, 方便无密码登录 ssh rasp
Host rasp
    User pi
    HostName 10.10.10.109
    IdentityFile ~/.ssh/id_rsa

软件

  1. 更新 apt 源, 用清华源
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
  1. 更新软件包 sudo apt update, sudo apt upgrade
  2. 安装 vim

from blog.

xvno avatar xvno commented on August 16, 2024

舒适性

配置 DHCP, 固定 ip 好访问 /etc/dhcpcd.conf

interface wlan0
static ip_address=10.10.10.109/24
static routers=10.10.10.1
static domain_name_servers=114.114.114.114

安装字体

sudo apt install ttf-wqy-zenhei ttf-wqy-microhei

VNC

sudo apt-get install tightvncserver
tightvncserver :1

zsh & oh-my-zsh & .commonrc

自定义shell配置..

python: pyenv

  1. 源码克隆git clone https://github.com/pyenv/pyenv.git ~/.pyenv
  2. PYENV_ROOT 添加到 path 并 export
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
  1. 添加 pyenv init:
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc

python: pyenv-virtualenv

  1. 克隆源码到 .pyenv/plugins/ 下,
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
  1. 添加 init
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc

from blog.

xvno avatar xvno commented on August 16, 2024

机器状态灯

LED 颜色 功能 正常状态
ACT 绿色 card status 闪烁:SD卡正在活动(类似电脑的硬盘灯)
PWR 红色 power 不闪烁:正常
FDX full duplex 亮:全双工/不亮:半双工
LNK link 亮:网络连接成功
100 100 Mbps 亮:100 Mbps/不亮:10 Mbps
ACT PWR FDX LNK 100 状态解读 解读/原因
○●○ ●●● ○○○ ○○○ ○○○ 正常 ACT灯:SD卡正在活动
○○○ ●●● ○○○ ○○○ ○○○ 不正常 SD卡启动文件损坏或没有SD卡
○○○ ○●○ ○○○ ○○○ ○○○ 不正常 电源电压不正常
●○● ●●● ○○○ ○○○ ○○○ 不正常 看下文解释
○●○ ●●● ●●● ●●● ●●● 正常 全双工/100 Mbps
○●○ ●●● ●●● ●●● ○○○ 正常 全双工/10 Mbps
○●○ ●●● ○○○ ●●● ●●● 正常 半双工/100 Mbps
○●○ ●●● ○○○ ●●● ○○○ 正常 半双工/10 Mbps

○●○:闪烁 ●●●:常亮 ○○○:不亮 ●○●:有规律闪烁

●○●:ACT灯有规律闪烁的解读

• 3闪烁:start.elf未找到
• 4闪烁:start.elf没有启动
• 7闪烁:kernel.img未找到

from blog.

xvno avatar xvno commented on August 16, 2024

Tutorial

使用 Rpi4B 搭建局域网 https 服务器

设备

  1. Rpi4B
  2. SanDisk 64G TF card
  3. micro-USB cable
  4. 5V 2.5A DC Adaptor
  5. Keyboard & Mouse & HDMI-Display
  6. USB storage stick
  7. Ubuntu 20.04 ISO Image

操作步骤

[todo]

from blog.

Related Issues (20)

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.