标签 Orange Pi 下的文章

防烤糊必备

import os
import time
from pyA20.gpio import gpio
from pyA20.gpio import port
#GPIO:https://github.com/duxingkei33/orangepi_PC_gpio_pyH3
#适用于全H3系列和H2+
Pin = port.PA10
gpio.init() #初始化
gpio.setcfg(Pin, gpio.OUTPUT) #输出
while 1:
    output = os.popen('cat /sys/devices/virtual/hwmon/hwmon1/temp1_input') 
    #读取温度,来自CPU的温度传感器
    #初版Zero由于基准电压的原因,可能偏高
    wd = output.read()
    print int(wd)
    if(int(wd)>50): #大于50度开启
        gpio.output(Pin, 1)
        time.sleep(1)
    if(int(wd)<50):
        gpio.output(Pin, 0)
        time.sleep(1)

1.插上网卡,输入 lsusb

340_1.png

*1-1.更新软件包

apt-get update && apt-get upgrade && apt-get autoremove

2.安装依赖包

apt-get -y install linux-headers-sun8i build-essential fakeroot dpkg-dev

3.下载驱动源码

wget http://cdn-cw.mediatek.com/Downloads/linux/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2

4.解压

tar -jxvf DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913

5.进了目录直接make

make
make install

340_2.png

6.加载驱动

modprobe mt7601Usta

现在可以ifconfig看看了,多出来个ra0,后面按正常连接配置就行了。

340_3.png

MT7601u发热感人,Orange Pi自带XR819就是垃圾。

使用Armbian系统可以很方便的使用h3disp来设置。

root@orangepione:~# h3disp -m
    480i        use "-m 480i" or "-m 0"
    576i        use "-m 576i" or "-m 1"
    480p        use "-m 480p" or "-m 2"
    576p        use "-m 576p" or "-m 3"
    720p50      use "-m 720p50" or "-m 4"
    720p60      use "-m 720p60" or "-m 5"
    1080i50     use "-m 1080i50" or "-m 6"
    1080i60     use "-m 1080i60" or "-m 7"
    1080p24     use "-m 1080p24" or "-m 8"
    1080p50     use "-m 1080p50" or "-m 9"
    1080p60     use "-m 1080p60" or "-m 10"
    1080p25     use "-m 1080p25" or "-m 11"
    1080p30     use "-m 1080p30" or "-m 12"
    1080p24_3d  use "-m 1080p24_3d" or "-m 13"
    720p50_3d   use "-m 720p50_3d" or "-m 14"
    720p60_3d   use "-m 720p60_3d" or "-m 15"
    1080p24_3d  use "-m 1080p24_3d" or "-m 23"
    720p50_3d   use "-m 720p50_3d" or "-m 24"
    720p60_3d   use "-m 720p60_3d" or "-m 25"
    1080p25     use "-m 1080p25" or "-m 26"
    1080p30     use "-m 1080p30" or "-m 27"
    4kp30       use "-m 4kp30" or "-m 28"
    4kp25       use "-m 4kp25" or "-m 29"
    800x480     use "-m 800x480" or "-m 31"
    1024x768    use "-m 1024x768" or "-m 32"
    1280x1024   use "-m 1280x1024" or "-m 33"
    1360x768    use "-m 1360x768" or "-m 34"
    1440x900    use "-m 1440x900" or "-m 35"
    1680x1050   use "-m 1680x1050" or "-m 36"
    2048x1536   use "-m 2048x1536" or "-m 37"

 Two examples:
    'h3disp -m 1080p60 -d' (1920x1080@60Hz DVI)
    'h3disp -m 720i' (1280x720@30Hz HDMI)