祖父元素_我如何在我的女儿和她的祖父的帮助下构建智能镜

祖父元素

by Coding with Cookie

通过Cookie编码

我如何在我的女儿和她的祖父的帮助下构建智能镜 (How I built a Smart Mirror, with a little help from my daughter and her grandpa)

This month I built a smart mirror with my dad and daughter. This project spanned across three generations.

这个月,我和父亲和女儿建立了一个智能镜子。 这个项目跨越了三代人。

The idea started a few years ago with the novelty of a smart mirror. But before I was going invest the time and money to make one, I needed a practical reason to build one. Recently that reason presented itself.

这个想法是几年前从智能镜的新颖性开始的。 但是在我花时间和金钱来制造一个之前,我需要一个实际的理由来建造一个。 最近,这种原因已经出现。

In our kitchen we have a whiteboard where we list out our dinner plans for the week and I wanted to upgrade it. I submitted a presentation idea for the smart mirror at local tech conference. My smart mirror presentation was selected. This accelerated my timeline.

在我们的厨房里,我们有一块白板,列出了本周的晚餐计划,我想对其进行升级。 我在本地技术会议上提交了有关智能镜的演示想法。 我用智能镜介绍了选择 。 这加快了我的时间表。

I needed help with the design of the smart mirror frame

我需要有关智能镜框设计的帮助

since I live in the digital world designing software that lives in the cloud. My dad is a Mechanical Engineer who lives in the physical world designing the planes we fly though the clouds everyday. While talking with my dad one evening, he suggested to create some initial sketches of the mirror.

因为我生活在数字世界中,所以设计了生活在云中的软件。 我父亲是一位机械工程师,他生活在物理世界中,负责设计我们每天穿过云层飞行的飞机。 一天晚上与父亲交谈时,他建议创建一些最初的镜子草图。

After a few more conversations with my dad and several design revisions, we settled on a simple box design for the frame. My dad knew more about woodworking than I did, and he had a few suggestions for me.

经过与我父亲的几次交谈和几次设计修订,我们决定为框架设计一个简单的盒子设计。 我父亲比我更了解木工,他对我有一些建议。

Like using cabinet draw sides for the sides of the frame as they already came with a groove to hold the glass. And using french cleats to secure the mirror to the wall. This also allowed it to be easily removed for transport.

就像使用橱柜在框架的侧面上绘制侧面一样,因为它们已经带有凹槽来固定玻璃。 并使用法式防滑钉将镜子固定在墙上。 这也使得它可以很容易地取出运输。

My wife was a huge support in this endeavor. She helped by sorting through dozens of televisions looking for the right price and features. The size had to be large enough for our kitchen, but not too large to make transporting a hassle. Finally she was able to get a television from Best Buy that had everything I was looking for. And the best part was that it was on sale.

我的妻子在这项工作中给予了极大的支持。 她帮助整理了数十台电视机,寻找合适的价格和功能。 尺寸必须足以容纳我们的厨房,但又不能太大,以免麻烦。 最终,她能够从百思买那里买到一部我想要的一切电视。 最好的部分是它正在出售。

The most noticeable part of the smart mirror is the reflective mirror. Most household mirrors are made from glass. But the biggest downside to using glass is that it’s fragile and doesn’t transport well. I chose plastic as it’s lighter, more transparent, and more durable.

智能镜最引人注目的部分是反射镜。 大多数家用镜子是由玻璃制成的。 但是使用玻璃的最大弊端是玻璃易碎,并且不能很好地运输。 我选择塑料是因为它更轻,更透明且更耐用。

It’s nice to talk to experts and I live in Seattle which has a great local plastic supplier. They were excellent and able to help me select the correct plastic. They suggested acrylic and we even tested the mirror film I had acquired on a sample they had. And this was not the first smart mirror they had supplied the plastic for so I knew I was on the right track.

很高兴与专家交谈,我住在西雅图,当地有一家很棒的塑料供应商 。 他们非常出色,能够帮助我选择正确的塑料。 他们建议使用丙烯酸树脂,我们甚至对我在样品上获得的镜膜进行了测试。 这不是他们提供塑料的第一个智能镜子,所以我知道自己走在正确的道路上。

The choice was simple when it came to deciding where to assemble the frame. My dad has a new workshop and all the tools we needed and I have a garage and a single toolbox. Once I had acquired the wood, acrylic, and mirror film, I went over to my dad’s workshop to assemble the frame.

在决定框架的组装位置时,选择很简单。 我父亲有一个新的车间和我们需要的所有工具,我有一个车库和一个工具箱。 获得木材,丙烯酸和镜膜后,我便去了父亲的工作室组装框架。

I thought it would take 4–5 hours. But it took around 15 hours to assemble the mirror. That may be due to refining the design as we were making the mirror. It may also be due to me asking a lot of questions, like why glue this instead of screw that. Or it was due to having a good time with my dad. Looking back it was a combination of all the above.

我认为这将需要4到5个小时。 但是组装镜子花了大约15个小时。 那可能是由于我们在制作镜子时改进了设计。 也可能是因为我问了很多问题,例如为什么要用胶水代替螺丝钉。 或者是因为我和父亲玩得很开心。 回首过去是以上所有因素的结合。

Over three separate days we cut, glued, nailed, and screwed the frame together. It would hold the television, acrylic mirror, and Raspberry Pi.

在三天内,我们将框架切割,粘贴,钉牢并拧紧在一起。 它可以容纳电视,亚克力镜和Raspberry Pi。

Several power tools were used including a table saw, chop saw, and nail gun so my daughter didn’t help with that part. But she was able to help with the final assembly when the acrylic mirror was inserted. She was even able to use the power drill to screw in the top during the final assembly.

使用了几种电动工具,包括台锯,剁锯和钉枪,因此我的女儿没有帮助那部分。 但是当插入亚克力镜时,她能够帮助完成最终组装。 在最后的组装过程中,她甚至可以使用电钻将顶部拧紧。

With all the woodworking completed, my daughter and I started wiring everything together. As pink is her favorite color, it was obvious that the only choice was to 3D print the Raspberry Pi case in pink.

完成所有木工工作后,我和女儿开始将所有东西连接在一起。 由于粉红色是她最喜欢的颜色,很明显,唯一的选择是用粉红色3D打印Raspberry Pi保护壳。

We put the Raspberry Pi into the pink case and attached it to the back of the TV via adhesive Velcro.

我们将Raspberry Pi放入粉红色的外壳中,并通过粘合剂维可牢尼龙搭扣将其连接到电视背面。

By using Velcro, the Raspberry Pi can be disconnected. Thus I can show the size of the computer transforming the mirror into a smart mirror.

通过使用Velcro,可以断开Raspberry Pi的连接。 因此,我可以显示将镜像转换为智能镜像的计算机的大小。

Modern televisions usually include a USB port, and the one my wife found did indeed have one. I tested it out the USB Port on the TV and it was able to supply enough power to the Raspberry Pi. This meant that the TV Power cord was the only cable I needed to plug into the wall outlet.

现代电视通常包括一个USB端口,而我妻子发现的那个确实有一个。 我在电视的USB端口上对其进行了测试,它能够为Raspberry Pi提供足够的电源。 这意味着电视电源线是我插入壁装电源插座所需的唯一电缆。

Then we plugged the USB and HDMI cables into both the Raspberry Pi and TV and we were ready to go.

然后,我们将USB和HDMI电缆插入Raspberry Pi和TV并准备就绪。

With the on board WiFi I connected the smart mirror to the internet without any other wires. And when the power is out it will still work as a traditional non-smart mirror.

通过板载WiFi,我无需任何其他电线即可将智能镜连接到互联网。 而且,一旦断电,它仍然可以像传统的非智能镜一样工作。

When you are 4, typing on a keyboard and coding are cool. We’ll see how she feels when she’s 14.

4岁时,在键盘上打字和编码很酷。 我们将看看她14岁时的感受。

My daughter got to help a lot on the software part of the smart mirror. Since her spelling abilities end with her name, she was able to type that and was very excited when she saw it on the smart mirror.

我女儿在智能镜的软件部分获得了很多帮助。 由于她的拼写能力以她的名字结尾,因此她能够键入它,并且当她在智能镜子上看到它时感到非常兴奋。

To get her name to appear, we used HTML. To keep it simple a static HTML page with inline styling via Chrome, fullscreen F11, was all we had to do to get it working. The background needs to be as dark as possible to minimize the light coming though the mirror.

为了显示她的名字,我们使用了HTML。 为了使它简单易用,它是通过Chrome进行内联样式显示的静态HTML页面(全屏F11 ,这是我们要做的全部工作。 背景必须尽可能暗,以最大程度地减少通过镜子的光线。

When the screen is off or completely black it appears as a common mirror. The text and graphics need to be as bright as possible to show through, transforming it into a smart mirror. On my mirror I was able to find a film with 5% transparency.

当屏幕关闭或全黑时,它会显示为普通镜子。 文本和图形必须尽可能明亮以显示,从而将其转换为智能镜像。 在镜子上,我能够找到透明度为5%的胶片。

In reviewing my mirror thus far, I would do a few things different next time. First, I would get a slimmer television. Right now the mirror frame is 4.5 inches deep, which is deep enough that you notice, but not so deep that it’s obtrusive.

到目前为止,回顾我的镜子时,下次我会做一些不同的事情。 首先,我会得到一部更薄的电视。 现在,镜框的深度为4.5英寸,足以引起您的注意,但又不至于太引人注目。

Next, I would order acrylic with the mirror film already installed. My dad and I were able to install the film in 20 min, but this resulted in several small bubbles. Most likely due to a few small pieces of dust trapped between the film and acrylic.

接下来,我将订购已安装了镜膜的丙烯酸树脂。 我父亲和我能够在20分钟内完成胶卷的安装,但这导致了几个小气泡。 极有可能是由于薄膜和丙烯酸树脂之间夹有一些小灰尘。

Also, I would add a more stylized front. If you take a look at the corners of my smart mirror, you will see all the layers of plywood. This could be hidden with some nice wood to more resemble a picture frame.

另外,我会添加一个更风格化的外观。 如果您看一下我的智能镜的角落,您会看到所有的胶合板层。 可以用一些漂亮的木头将其隐藏起来,使其更像相框。

Finally, I would add a small gap between the TV and acrylic. Currently, the acrylic is helping to support the TV. This is putting pressure on the acrylic causing it to bend slightly. This results in a slight distortion of the mirror.

最后,我会在电视和压克力之间添加一个小差距。 目前,丙烯酸树脂正在帮助支持电视。 这会给丙烯酸施加压力,使其略微弯曲。 这导致镜的轻微变形。

Building the Smart Mirror has been a great experience and if you have any questions please reach out.

构建智能镜像是一个伟大的经验,如果您有任何疑问,请伸出

The next project that my daughter and I are working on is wiring some sensors in the kitchen to track the temperature in the refrigerator and freezer. I’m hoping to get her more involved with this and future projects as she is excited to help and wire the sensors on a breadboard.

我和我女儿正在进行的下一个项目是在厨房中连接一些传感器,以跟踪冰箱和冰柜中的温度。 我希望让她更多地参与这个项目和将来的项目,因为她很高兴能帮助并将传感器连接到面包板上。

I look forward to sharing that story with you once she and I have completed it.

一旦她和我完成了故事,我期待与您分享这个故事。

翻译自: https://www.freecodecamp.org/news/crafting-a-smart-mirror-with-my-dad-and-daughter-c3bdd151fefd/

祖父元素

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值