嘿!您似乎在 United States,您想使用我们的 English 网站吗?
Switch to English site
Skip to main content

RS_LOGO700px_9dae52f37011a5bc0d958a251f03993871313d40.jpg

 

pi-topPUSLE是pi-top系列的衍生配件。 pi-top系列基于STEAM(科学,技术,工程,艺术和数学)学习而设计,设计PULSE是为了实现所有STEAM的功能。

PULSE将以下功能添加到任何基于Pi的平台:

麦克风

pi-top PULSE带有一个集成式麦克风,性能卓越,即使在密封的pi-top中也能正常工作。

扬声器

功率为2瓦的I2S集成扬声器,能够从PULSE发出响亮而清晰的声音。 顺便说一句,I2S不是I2C的错误录入,尽管是一个非常类似的缩写。 I2S代表Inter IC Sound,是标准的音频接口规范。

7 x 7 LED矩阵和背光

在PULSE的顶部,有由离散的LED灯组成的7x7像素的RGB显示器。有给独立的Pi提供反馈的能力,而无需添加显示。 除了顶部的显示矩阵之外,扬声器下的灯,在需要的情况下还可以增加额外的影响。

Pitop_insides_700px_cbb6bfb0a603f2364d85f3c1efe9a87c89074b17.jpg

 

pi-top PULSE的内部 

接线方式

就像pi-top或者CEED一样可以,基本的Pi板也可以插入PULSE。提供两种连接方式“pi-top Mag Rail”和“HAT”(匹配Pi或pi-topPROTO以满足您的需求)。 “Mag Rail”的磁性螺丝是一个很好的功能,可以给PULSE模块提供4个磁性安装支脚,但要注意如果将一个螺丝钉掉入你的pi-top,它很可能最终会粘在这些螺丝上。

Pi-topfitting_16acb4fb6ea74229087dd1cb9490d38c63ca66c8.jpg

软件

PULSE有两个操作系统选择:第一个是pi-topOS ,是可以从这里获得的,迄今为止最容易的选项。 第二个选项是手动下载Raspbian上的PULSE软件。 这两个设置说明都记录在Github for the pi-topPULSE上。

Amazon Alexa集成

启动pi-topDASHBOARD并将我们的pi-top帐户与Amazon Alexa服务配对,按照屏幕上的说明操作是一件很简单的事; 我们把Alexia放在一边,启动了pi-topCODER来测试矩阵的led功能。

alexa_700px1_e0a6fbc2c5a67f46c461ffe13410e4d10efea36b.jpg

包含的课程

就像pi-top其余配件一样,有一套关于如何启动和运行的课程。 PULSE没有什么不同,在写入的时候有两个课程:

  • pi-topPULSE入门
  • pi-topPULSE LEDs的介绍

“pi-topPULSE入门”有很多演示和功能,但是它的目标是提供给有一定经验的使用者,所以这不是pi-top新用户的最佳起点。 “pi-topPULSE LED介绍”可能是最好的起点和最有条理的课程。 该教程相当适合自学,让我们快速地学习到一些功能,教程结束时,我们从教程中所学的知识足够自己设计出具着跳动蓝色背景的RS标志。

RSlogo_a8f3e8e619d14adeda5fb9df180b4c250929a763.jpg 

 

 

 

 

 

 

 

 

 我们用矩阵勾画出像素构成的图案,为每个像素写一行代码来打开它。 此代码使用method .set_pixel(X,Y,R,G,B),X和Y是从左下角到右上角0-6编号的坐标。 RGB值是8位(0-255)0代表关闭,255代表完全打开。

我们的代码示例如下:

代码

import time
from ptpulse import ledmatrix

r = 0
value_to_add = 1

while True:
	ledmatrix.clear()
	#This sets the background to r brightness (r,0,0) for red (0,r,0) for green (0,0,r) for blue
	#(r,r,r) for white
	ledmatrix.set_all(0, 0, r)
	#Instead of the whole matrix lets make a logo
	#Column 0 pixels
	ledmatrix.set_pixel(0,1,255,0,0)
	ledmatrix.set_pixel(0,2,255,0,0)
	ledmatrix.set_pixel(0,3,255,0,0)
	ledmatrix.set_pixel(0,4,255,0,0)
	ledmatrix.set_pixel(0,5,255,0,0)

	#Column 1 pixels
	ledmatrix.set_pixel(1,2,255,0,0)
	ledmatrix.set_pixel(1,5,255,0,0)

	#Column 2 pixels
	ledmatrix.set_pixel(2,1,255,0,0)
	ledmatrix.set_pixel(2,3,255,0,0)
	ledmatrix.set_pixel(2,4,255,0,0)

	#Column 3 has no pixels

	#Column 4 pixels
	ledmatrix.set_pixel(4,1,255,0,0)
	ledmatrix.set_pixel(4,4,255,0,0)

	#Column 5 pixels
	ledmatrix.set_pixel(5,1,255,0,0)
	ledmatrix.set_pixel(5,3,255,0,0)
	ledmatrix.set_pixel(5,5,255,0,0)

	#Column 6 pixels
	ledmatrix.set_pixel(6,2,255,0,0)
	ledmatrix.set_pixel(6,5,255,0,0)

	 

	#This is the demo code, It gradually increases or decreases the display brightness by r
	ledmatrix.show()

	r = r + value_to_add

	#Swap direction at max/min brightness
	if r > 254:
		value_to_add = -1
	if r < 1:
		value_to_add = 1
	time.sleep(0.01) 

如果你有一个pi-top或者只是想要提升pi的功能,pi-topPULSE是一个很好的补充,可以为你的编码添加吸引人的视觉/音频反馈。 Alexa的功能也是一个很好的补充,但是PULSE真正的“闪光点”是它对Pi的视觉/音频增强,并允许你进行更多的设计。

Karl Woodward

请点击此处查看DesignSpark品牌的Raspberry Pi 3 B和pi-topPULSE套件

Karl is a design engineer with over a decade of experience in high speed digital design and technical project leadership in the commercial electronics sector.