测温教你神器工人技术丨天选打(测温教你神器工人技术)「电脑测温工具」

随着我国防疫政策的放宽,各地抗疫也掀起了一波新浪潮
例如在神学方面,诸多平时不打赏,直播就白嫖的网友纷纷转发起郭襄、杨迪(阳敌)等名人的人名,祈祷自己一辈子没“阳过”
以及但凡大灾大难,必然顶风作案的朋友圈,除却众口铄金的某某清瘟胶囊不谈,各类防疫物资也成了各个朋友圈疯转抢购的热销品
核酸检测长队难排,抗原试剂一剂难求,民声鼎沸,看得我们这些孤寡打工人瑟瑟发抖
那么作为天选打工人,成功避过三年危险期,怎么封都封不住打工路的我们,如何在这最后时期维持自己仅存不多的尊严(工资)呢
今天我们就带大家一起动手DIY一款红外测温扫描仪,没事就biu biu测一测咱未老先衰的大脸,提前知晓并抵御新冠的危险
【一、准备材料】FireBeetle ESP32主板——1只MLX90614非接触式红外测温传感器——1只Gravity IIC OLED-2864 显示屏——1只3.7V 400mAh锂电池——1只6mm直径红光激光发射器——1只C&K滑动开关——1只3D打印外壳上盖和下盖——1套【二、制作步骤】▼1.如上图所示焊接好各个部件
▼2.使用PCtoLCD2002液晶取模软件将需要用到的图片和16X24字体转换为16进制代码,按照上图模式来进行设置和取模
▼3.使用uPyCraft MicroPython IDE 进行编程,烧写代码到FireBeetleESP32主板上,并测试程序是否可以工作
代码如下:import MLX90614from machine import Pin,I2Cimport timeimport ssd1306from piclib import# This code will show you how to make a Infra Red Thermometer using the MLX90614 sensor.i2c = I2C(scl=Pin(22), sda=Pin(21), freq=100000)ir=MLX90614.MLX90614(i2c)lcd=ssd1306.SSD1306_I2C(128,64,i2c)#Display a picture 7264def DisplayPicture(x,y,picture):for line in range(0,64):for bytes in range(0,9):for bits in range(0,8):if picture[9line+bytes]&0x80>>bits:lcd.pixel(x+bytes8+bits,y+line,1)else:lcd.pixel(x+bytes8+bits,y+line,0)return#Display a character 1624def DisplayCharacter16X24(x,y,character):for line in range(0,24):for bytes in range(0,2):for bits in range(0,8):if character[line2+bytes]&0x80>>bits:lcd.pixel(x+bytes8+bits,y+line,1)else:lcd.pixel(x+bytes8+bits,y+line,0)return#---------------------run here------------------------------------#display logoDisplayPicture(28,0,picture)lcd.show()time.sleep(1)lcd.fill(0)#display O:123.4C#A:123.4CDisplayCharacter16X24(0,0,charArray[10]) #ODisplayCharacter16X24(161,0,charArray[12]) #:DisplayCharacter16X24(167,0,charArray[13]) #CDisplayCharacter16X24(0,24,charArray[11]) #ADisplayCharacter16X24(161,24,charArray[12]) #:DisplayCharacter16X24(167,24,charArray[13]) #Clcd.show()while True:time.sleep(0.2)Object = ir.getObjCelsius() # CAmbient = ir.getEnvCelsius() # C#Object = ir.getObjFahrenheit() # F#Ambient = ir.getEnvFahrenheit() # F#print("Object %s C"% Object)#print("Ambient %s C"% Ambient)#print()ObjectInt = int(Object10)AmbientInt = int(Ambient10)if ObjectInt < 0:ObjectInt = abs(ObjectInt)DisplayCharacter16X24(162,0,charArray[15])# -temp1 = (ObjectInt%1000)//100if(temp1 == 0):DisplayCharacter16X24(163,0,charArray[16]) # spaceelse:DisplayCharacter16X24(163,0,charArray[temp1])DisplayCharacter16X24(164,0,charArray[(ObjectInt%100)//10])DisplayCharacter16X24(165,0,charArray[14]) # .DisplayCharacter16X24(166,0,charArray[ObjectInt%10])else:temp1 = ObjectInt//1000temp2 = (ObjectInt%1000)//100if temp1 == 0:DisplayCharacter16X24(162,0,charArray[16]) # spaceelse:DisplayCharacter16X24(162,0,charArray[temp1])if temp1 == 0 and temp2 == 0:DisplayCharacter16X24(163,0,charArray[16]) # spaceelse:DisplayCharacter16X24(163,0,charArray[temp2])DisplayCharacter16X24(164,0,charArray[(ObjectInt%100)//10])DisplayCharacter16X24(165,0,charArray[14]) # .DisplayCharacter16X24(166,0,charArray[ObjectInt%10])if AmbientInt < 0:ObjectInt = abs(AmbientInt)DisplayCharacter16X24(162,24,charArray[15])# -temp1 = (AmbientInt%1000)//100if temp1 == 0:DisplayCharacter16X24(163,24,charArray[16]) # spaceelse:DisplayCharacter16X24(163,24,charArray[temp1])DisplayCharacter16X24(164,24,charArray[(AmbientInt%100)//10])DisplayCharacter16X24(165,24,charArray[14]) #.DisplayCharacter16X24(166,24,charArray[AmbientInt%10])else:temp1 = AmbientInt//1000temp2 = (AmbientInt%1000)//100if temp1 == 0:DisplayCharacter16X24(162,24,charArray[16]) # spaceelse:DisplayCharacter16X24(162,24,charArray[temp1])if temp1 == 0 and temp2 == 0:DisplayCharacter16X24(163,24,charArray[16]) # spaceelse:DisplayCharacter16X24(163,24,charArray[temp2])DisplayCharacter16X24(164,24,charArray[(AmbientInt%100)//10])DisplayCharacter16X24(165,24,charArray[14]) # .DisplayCharacter16X24(166,24,charArray[AmbientInt%10])lcd.show()▼4.根据部件尺寸设计外壳
▼5.使用使用价值6999元的Overlord 3D打印机把测温枪的外壳打印出来
▼6.使用热熔胶和胶水将部件安装到打印的外壳内
大功告成
可以去人多的场合嘚瑟了
测温教你神器工人技术丨天选打(测温教你神器工人技术)
(图片来源网络,侵删)

联系我们

在线咨询:点击这里给我发消息