图片

The article was first published on WeChat public account @代号XY
Author: Code XY

Hello everyone, my name is XY.

The "Daily Tips" column is some of the expert tips that I discovered while doing projects with RZ.

Can be used in daily life.

In the future, we will open source the related programs that we have written.

图片

First, you need a camera

The average price of a treasure ranges from 20, 200 to 400 yuan
Just like choosing a camera, pixels and frame rate are hard indicators.

This is something you can reuse, and it's easy to disassemble and assemble.

图片

You also need a microphone, a pair or a speaker,

The interface has the option of USB, wire or traditional audio interface.

图片

图片

But unfortunately,

To make 🐈 call, there is no inevitable, only "accidental". Of course you can try training ta.

We need a sensor to let its jio or body initiate a call.

Like a button

Or touch sensor,

Or photoresistor.

图片

Pressure film sensor:

pressure signal

When the sensor senses external pressure, the resistance value of the sensor will change. A simple circuit can be used to make the sensor convert the pressure signal into an electrical signal with a corresponding change in intensity after sensing the pressure change.

Touch switch sensor:

Generate a signal whether it is touched by a finger, and switch the circuit according to this signal.

Photoresistance:

Light as signal

A special resistance using the photoconductive effect, its resistance is directly related to the intensity of the incident light. When the light intensity increases, the resistance decreases; when the light intensity decreases, the resistance increases.

④ The is that you need a development board. Raspberry Pi is recommended.

It uses the Linux system, which itself is a small computer, and the Android system is based on its modification.

Comes with a wifi module, which can be connected to a wireless network.

图片

Of course, you also need some wires

You need to plan their length

There is also a cover to protect the Raspberry Pi's shell and camera.

Such shells can be bought,

You can also do it yourself.

图片

To make the hardware work,

Need to write programs to the Raspberry Pi,

Fortunately, many open source software packages can be found online

(The code is so tiring, I can’t move it, let’s omit these first)

Then, you also need to find a real-time video call service

This type of PaaS service can be directly called in the Raspberry Pi

In this way, you can use the Raspberry Pi to make video calls.

Usually this kind of service is within a certain range

For example, 10,000 minutes is free.

图片

Let us connect those modules and Raspberry Pi together

You need to lay out the position of each module reasonably,

The length of the connection between the various hardware modules,

Don’t let the cat damage the camera or Raspberry Pi,

The important thing is to think about where the sensor that it touches is placed.

图片

Think about it

It's best to be a place where cats often stay for a long time

For example, he often looks at the window in the distance

For example, the place where he eats, in front of the cat bowl

Or anywhere

Will it step on that button or sensor

See fate (???)

图片

We didn't do something like this

But we tested the part of the video call

voice network Agora video call service (non-advertising)

Succeeded

图片

The right window is the Raspberry Pi ingest

So you can make a hardware video by yourself

You can also apply this "combination" to more ideas.

图片

RZ said that in the process of commissioning cameras, microphones and speakers, the most interesting finding was "delay."

Although this is common sense, this kind of existence is strongly felt when it is really tested. When we and the other party on the call, the sound or video becomes a digital signal and is transmitted to the other party, there must be a delay. Even if it is only a few milliseconds.

Unless we can surpass the speed of light.

【Click to view original text】


RTE开发者社区
647 声望966 粉丝

RTE 开发者社区是聚焦实时互动领域的中立开发者社区。不止于纯粹的技术交流,我们相信开发者具备更加丰盈的个体价值。行业发展变革、开发者职涯发展、技术创业创新资源,我们将陪跑开发者,共享、共建、共成长。