Git Product home page Git Product logo

speak_raspi_ip's Introduction

让树莓派说出自己的IP地址

当亲爱的树莓派没有显示器时如何控制它?对,就是ssh,但是ssh需要IP地址啊,树莓派的IP地址是多少?这个问题问的好,目前大约有这样几种解决方案:、

  • 获取到IP地址后将地址发到邮箱:前提是树莓派能上网
  • 通过串口连接树莓派后查看IP地址:需要USB转串口设备,还要连线,小白用户表示鸭梨山大
  • 从路由器上查看:如果没有路由器或者没法登上路由器咋办?
  • 固定IP地址:假设换到别的网络,网段不一样咋办?地址冲突咋办?
  • 通过某些工具扫描整个网段:你确定能扫出来吗?
  • 一个一个尝试:如果是A类IP岂不泪奔?

所以嘛,上面的解决方案是有局限性的!有木有更好的方案?小码哥告诉你,有!

原理很简单,当树莓派获取到IP地址之后,让它自己说出自己的IP地址就是了。

获取IP地址比较容易,ifconfig之类的命令大家也应该听说过。关键是“说”!

其实这个问题也挺简单的,去网上下载0~9的数字发音,然后对应着获取的IP地址,依次按顺序读出来就行啦。 树莓派里面是有播放器的,omxplayer就是一个。其他的播放器比如mpg123也可以的。

你需要做的,就是让树莓派开机自动执行这个程序,然后找个耳机插到树莓派的音频孔里面(表告诉我你木有耳机), 竖起你的耳朵,仔细听就是了~~~

为了方便大家安装,一键脚本已经写好了,大家只要在树莓派上执行这个命令就好了:

curl "https://raw.github.com/ma6174/speak_raspi_ip/master/setup.sh" | bash

speak_raspi_ip's People

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.