【树莓派】擦灰重启行动

编程知识 更新时间:2023-04-30 00:22:26

高中时候看大佬各种秀项目,于是乎兴致冲冲买了一块树莓派4B,400r+,当时没想到光是开机,就折腾了两个星期~后来不出意外它在房间的角落很安逸地吃灰,但是,后来,我误打误撞学了CS,再误打误撞加入了机器人实验室,不可避免地接触到了各种单片机,作为单片机的天花板,树莓派,我想这就是我们之间的缘分吧。


一直看的是这个教程:
同济子豪兄树莓派教程

烧录系统镜像

没有显示屏,键鼠,之前要自行配置WiFi和ssh。试了几个别的平台的os都不行,决定上官网https://www.raspberrypi/找找,发现官方提供了烧录器 Raspberry Pi Imager,通过高级设置可以配置账户、WiFi、ssh以及地区语言等等信息,一条龙服务。这个应该是在教程之后出的,教程相关部分可以跳过了。

查看树莓派ip

我是直接通过192.168.3.1登录路由器管理界面 ⟶ \longrightarrow 查看终端。

通过putty连接

通过putty用来做一些基本配置:

  1. 下面命令打开树莓派配置界面,蒟蒻还是离不开GUI呜呜,选择Interfacing Options,开启VNC;
sudo raspi-config
  1. 换源,确实速度提升明显,这里注意你的版本不一定是 stretch,像我是 bullseye,看原来的源对应位置的参数即可;
sudo nano /etc/apt/sources.list
deb http://mirrors.tuna.tsinghua.edu/raspbian/raspbian/ bullseye main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu/raspbian/raspbian/ bullseye main contrib non-free rpi

否则,安装包时会提示“有一些软件包无法被安装。如果您用的是unstable 发行版,这也许是……”。

  1. 换源后,通过以下命令拉取新源的软件索引列表,并执行更新:
sudo apt-get update
sudo apt-get upgrade
  1. 下载中文输入法,fcitx是一个输入法框架,可以装载各种语言,font 是字体。在虚拟机上遇到了挺多问题的,在 pi 上就没有搞。
sudo apt-get install fonts-wqy-zenhei
sudo apt-get install fcitx fcitx-googlepinyin fcitx-module-cloudpinyin fcitx-sunpinyin

通过VNC连接

玩一些有趣的应用,更多请看原教程。

黑客帝国

sudo apt-get install cmatrix
cmatrix

查看电脑配置

sudo apt install screenfetch
screenfetch

查看系统信息

sudo apt install linuxlogo
linux_logo


在Ubuntu虚拟机上执行:

BOINC

一个分布式计算平台,可以参与贡献一些项目,会有 credit 积分之类的回报,不过树莓派算力有限,做计算并不是它的优势,主要是玩玩哈。下面的SETI@home计划是分析望远镜数据,搜索地外文明的一个分布式项目。

安装、启动

后面两行命令用于启动客户端,否则提示“无法启动客户端……”,started failed,在 BOINC 论坛看到的,可能和系统版本也有关。

sudo apt-get install boinc-client boinc
# And after some head scratching I found you also need to type this into terminal for installing into "Bulleseye" otherwise it will not run at boot.
sudo systemctl enable boinc-client
sudo systemctl start boinc-client

SETI@home计划

项目在2020年的时候已经停止了,但未来可能恢复。

In March 2020, the project stopped sending out new work to SETI@home
users, bringing the crowdsourced computing aspect of the project to an
indefinite hiatus.[9] At the time, the team intended to shift focus
onto the analysis and interpretation of the 20 years’ worth of
accumulated data. However, the team left open the possibility of
eventually resuming volunteer computing using data from other radio
telescopes, such as MeerKAT and FAST.[10]

Asteroids@home

分析小行星的项目,官网:https://asteroidsathome/.
Remaining 时间还有一天多,Pi 的算力可见一斑呵呵。

下一步计划

寒假里打算做一个相对完善的嵌入式系统,具体什么还没想好。至少拥有这样一台设备,很多网络、操作系统的专业课知识都可以在上面实践一番,比起在自己的 desktop 上高试错成本不要低太多。

安全开关命令

系统总是挂,考虑使用命令安全操作。

关机:

 sudo shutdown -h now
 sudo halt
 sudo poweroff
 sudo init 0

重启:

sudo reboot
shutdown -r now

更多推荐

【树莓派】擦灰重启行动

本文发布于:2023-04-22 07:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/42b495544457ce3cfb77e13c6b5ba869.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重启   树莓派

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 95314文章数
  • 24056阅读数
  • 0评论数