2018年10月的全部文章
@kidultff

PAT-A 真题 – 1114 Family Property

This time, you are supposed to help us collect the data for family-owned property. Given each person's family members, and the estate(房产)info under his/her own name, we need to know the size of each family, and the averag ...
  • 0
  • 0
@kidultff

树莓派GPIO接开关按钮,并判断单击、双击、长按

树莓派接开关,只需要将一个脚接到3.3V电源,另一个脚接GPIO的输入即可。在Python中,可以通过GPIO库进行判断:import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(4, GPIO.OUT)  & ...
  • 0
  • 1
@kidultff

树莓派3b强行驱动无源蜂鸣器

有源蜂鸣器:自带高频振荡,直接上电并加信号即可蜂鸣,一般引线有3根无源蜂鸣器:不带高频振荡,需要外加震荡才能工作,一般引线有两根。如果你想给树莓派加上个蜂鸣器但是又不想购买,从贺卡或闹钟拆下的蜂鸣器一般就是无源蜂鸣器。我们可以利用 ...
  • 0
  • 3