投影仪 java 层控制GPIO
作者:互联网
更新风扇和背光共用GPIO
private void updateFansState(String cmd) {
Log.i(TAG, "-------------cmd=" + cmd + "------------------");
File f = new File("/sys/class/gpio/gpio113/direction");
if (!f.exists()) {
return;
}
OutputStream output = null;
OutputStreamWriter outputWrite = null;
PrintWriter print = null;
StringBuffer strbuf = new StringBuffer("");
strbuf.append(cmd);
try {
output = new FileOutputStream(f);
outputWrite = new OutputStreamWriter(output);
print = new PrintWriter(outputWrite);
print.print(strbuf.toString());
print.flush();<
标签:投影仪,java,strbuf,cmd,new,print,GPIO,null,outputWrite 来源: https://blog.csdn.net/liushengdi110/article/details/120782076