Python library for Crow Pi
Python library for Crow Pi
Preparation
การเตรียมความพร้อมสำหรับใช้ library python ในการสั่งงาน sensor บนบอร์ด CrowPi
คำสั่ง: update และ upgrade package ของ Raspberry Pi OS
sudo apt-get update && sudo apt-get upgrade
คำสั่ง: ติดตั้ง package สำหรับ run python3
sudo apt-get install build-essential python3-dev python3-smbus python3-pip python3-pil liblircclient-dev
Drivers installation
การใช้ sensor หรืออุปกรณ์บน CrowPi จำเป็นต้องลง driver สำหรับใช้งาน ซึ่ง CrowPi ได้จัดเตรียม Driver ที่จำเป็นและการ setup ไว้ในแล้ว ซึ่งสามารถทำตามขั้นตอนดังต่อไปนี้
คำสั่ง: คัดลอกไฟล์จาก github
git clone https://github.com/Elecrow-RD/CrowPi.git
cd CrowPi/Drivers
คำสั่ง: install Driver Adafruit_Python_CharLCD:
cd Adafruit_Python_CharLCD
sudo python3 setup.py install
cd ..
คำสั่ง: install Driver Adafruit_Python_LED_Backpack:
cd Adafruit_Python_CharLCD
sudo python3 setup.py install
cd ..
คำสั่ง:install Driver Luma Matrix LED:
cd luma.led_matrix
sudo python3 setup.py install
cd ..
Ex ทดลองรัน code python ใน ไดเรกทอรี่ 5 คำสั่งแล้วบันทึกผล
คำสั่ง: run python code สั่ง buzzer.py ทำงาน
python3 buzzer.py
Date: May 2023
Author: Soontree Jaikhong (AIC-Researcher)
Author: Thanaluk Pranekunakol (AIC-Researcher)
Last updated
Was this helpful?