如何成為Open Hardware的 Maker( 香蕉派篇 )- 哈爸雜記

最後編輯:2015-09-11 建立:2015-08-25 歷史紀錄

 

 

 

WUULONG S初步使用步驟

安裝殼 : PASS

閱讀 user manual , 開機登入,當一般 linux 使用

在 M1+ 用內核提供的方式點燈

安裝設定BPI-WiringPi2-Python

M1+ 40 pin IO 定義

run BPI-WiringPi2-Python/test.py

  • 需確定 test.py 中, 這個能點燈,驗證 WiringPi2 工作正常
    • wiringpi.wiringPiSetupGpio()
    • wiringpi.pinMode(22,1)
    • wiringpi.digitalWrite(22,0)

 

run gpio readall

  • ./build OK, ./pintest can run, but show some faults detected. also show
  • Oops - unable to deteremine board type .... model : 7

 

驗證 Glove shield : Quick PASS

  • GlovePi
  • I2C can be read by GlovePi shield - quick PASS

驗證 SPI

  • WiringPi2Python
    • serial = wiringpi2.serialOpen('/dev/ttyS2',115200) # Requires device/baud and returns an ID
    • wiringpi2.serialPuts(serial,"hello")
    • wiringpi2.serialClose(serial) # Pass in ID
    • Code 可 run, 沒 error, 需check output
    • 不知道為何要使用 ttyS2? UART可能在是 PIN8,10 GPIO 14,15

驗證 I2C : Quick PASS

  • I2C 可能接在 PIN 27/28
  • I2C RPI tool
    • Tool installed. need to setup i2c BPI kernel module. How?
    • 參考香蕉派 LCD
      • vi /etc/modprobe.d/raspi-blacklist.conf should be bpi-blacklist.conf
  • Try similar code with Grove - LCD RGB Backlight datasheet
    • import wiringpi2
    • i2c = wiringpi2.I2C()
    • dev = i2c.setup(0x20) ( not sure about what to pass into the setup function, but presumably a device address? )
    • i2c.read(dev)

 

  • 用 GrovePi + Grove-LCD RGB Backlight 可以讀到 i2c devices
  • >i2cdetect -y 2
  • 0 1 2 3 4 5 6 7 8 9 a b c d e f
  • 00: 03 -- -- -- -- -- -- -- -- -- -- -- --
  • 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  • 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  • 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  • 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  • 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  • 60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
  • 70: 70 -- -- -- -- -- -- --

 

  • i2c address 0x62 confirmed for LCD, but should have 0x3e, not detected, why? 另外為何有 0x03, 0x70

44

  • lcd.sh 目前測試 write fail, 改 i2cbus =2 , 也同樣失敗
  • sudo i2cget -y 2 0x62 0 => 0x11 i2c read register PASS
    • addr(0): 0x11
    • addr(1):0x0544
    • addr(2):0x00
    • addr(3):0x00
    • addr(4):0x00
    • addr(5):0x00
    • addr(6):0xff
    • addr(7):0x00
    • addr(8):0x00
    • addr(9):0xe2
    • addr(10):0xe4
    • addr(11):0xe8
    • addr(12):0xe0

 

setup ssh : PASS

  • boot with sshd ready - OK
  • fix eth interface with 192.168.168.168 - OK (with boot ready)
  • boot with internet ready by eth and fix ip - WIP

 

Remote X 或是遠端桌面 : WIP

  • install xrdp
    • sudo apt-get install xrdp
    • apt-get install tightvncserver
  • Host use VNC to connect bananapi, ex: readvnc, jollysfastvnc

 

Wifi 開機自動連上

 

Raspberry Pi超炫專案與完全實戰(深入Raspberry Pi的全面開發經典) : 快讀過