樹莓派 BerryClip 6 LED Add-on Board Python學習板 筆記

BerryClip 6 LED Add-on Board Python學習板 SKU編碼:RPi-MS100A python

Python是樹莓派Raspberry Pi官方推薦的面向硬件控制語言。本開發板硬件包含有6只LED,1個按鈕,1個蜂鳴器。見下圖的A/B/C區域。本寶貝可直接插入樹莓派26P排針中,直接開始Python語言創做。即插即用!設計中預留排線槽,對從此官方的Addon擴展板進行物理空間兼容。 編程

安裝實例: dom

預留排線槽,對從此官方的Addon擴展板進行物理空間兼容 編程語言

淘寶連接: http://item.taobao.com/item.htm?spm=a1z09.2.9.11.4PFMrj&id=35904520777 oop

--------------------------------------------------------------------------------------------------- 學習

筆記: http://www.raspberrypi-spy.co.uk/berryclip-6-led-add-on-board/berryclip-6-led-add-on-board-instructions/ 編碼

BerryClip是一個Rpi的擴展板,它能直接插在樹莓派的GPIO接口上,提供了6只LED,1個按鈕,1個蜂鳴器。可使用任何支持操做GPIO pins的編程語言(如python)來控制它。 設計

代碼在:https://bitbucket.org/MattHawkinsUK/ ,已經fork,RPiSpy BerryClip 和 RPiSpy BerryClip Plus code

  • berryclip_01.py – Test LEDs only
  • berryclip_02.py – Test Buzzer only
  • berryclip_03.py – Test Switch only
  • berryclip_04.py – Test LEDs and Switch
  • berryclip_05.py – Test LEDs, Buzzer and Switch
  • berryclip_06.py – LED sequence
  • berryclip_07.py – Dice Simulator
  • berryclip_08.py – Reaction time game
  • berryclip_09.py – Random LEDs
  • berryclip_10.py – Multiple LED sequences in a loop
  • berryclip_11.py – Traffic light simulator
  • berryclip_12.py – Morse code generator
sudo python berryclip_01.py

針腳對應參考: htm

LED 1  - Pin 7  - GPIO4
LED 2  - Pin 11 - GPIO17
LED 3  - Pin 15 - GPIO22
LED 4  - Pin 19 - GPIO10
LED 5  - Pin 21 - GPIO9
LED 6  - Pin 23 - GPIO11
Buzzer - Pin 24 - GPIO8
Switch - Pin 26 - GPIO7
相關文章
相關標籤/搜索