【Ubuntu 语音控制安卓设备刷短视频 orangePi zero2 H616 (已开源) 】.md uptada:23/11/07

编程入门 行业动态 更新时间:2024-10-24 01:53:14

【Ubuntu 语音控制安卓设备刷短视频 orangePi zero2 H616 (已<a href=https://www.elefans.com/category/jswz/34/1770131.html style=开源) 】.md uptada:23/11/07"/>

【Ubuntu 语音控制安卓设备刷短视频 orangePi zero2 H616 (已开源) 】.md uptada:23/11/07

文章目录

      • H616_实现Ubuntu语音控制安卓设备刷短视频
        • 小美效果展示
        • H616 ubuntu系统 安装adb
        • 智能公元 SU-03T 离线语音模组 固件制作
        • 配合串口实现 小美_控制安卓刷抖音

H616_实现Ubuntu语音控制安卓设备刷短视频

注意:orangePi zero2 H616 安装系统为ubuntu

小美效果展示

语言小美

H616 ubuntu系统 安装adb
  1. 在 Ubuntu PC 上安装 adb 工具
    test@test:~$ sudo apt update
    test@test:~$ sudo apt install -y adb

  2. 插入u口连接手机后,查看:
    test@test:~$ adb devices
    List of devices attached
    8c00141167058911ccd device

  3. 然后在 Ubuntu PC 上连接网络 adb
    // IP 地址需要修改为需控制的安卓手机IP 地址,并处于同一局域网段
    // 手机打开 开发者模式 开启adb调试
    test@test:~$ adb connect 192.168.1.xxx

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    connected to 192.168.1.xxx:5555
    test@test:~$ adb devices
    List of devices attached
    192.168.1.xxx:5555 device
  1. 拔掉u口数据线,断开与手机的有线连接;
    如果不断开 这时u口有线连接+局域网ip连接,会有两个设备,故为方便操作,断开数据线,只保留一个设备即可;有线连接也能用,但是无线更帅一点嘛;
    test@test:~$ adb devices
    List of devices attached
    8b983433 device
    192.168.1.166:5555 device

  2. 然后在 Ubuntu PC 上通过 adb shell 就可以登录 android 系统
    test@test:~$ adb shell
    huawei-p20:/ #

智能公元 SU-03T 离线语音模组 固件制作

在线官网 选择对应产品 纯离线方案制作固件并发布
下载固件后 据工具官方文档及工具烧录固件即可
具体制作示例(简易图形化操作即可完成固件定制):


配合串口实现 小美_控制安卓刷抖音

源码:

/* xiaomei shuaDouYin*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
// #include <wiringPi.h>
// #include <wiringSerial.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include "uartTool.h" // 不使用wiringPi库,这里为自己封装的串口库;
// 详见往期:
//【全志H616 使用标准库 完成自制串口库(分文件实现) orangepi zero2(开源)】.md updata: 23/11/07:
//  fd;void* func1()
{char data[32] = {0};  while(1){memset(data,'\0',32);scanf("%s",data);//发送数据_串口mySerialsend (fd, data) ;     }
}void* func2()
{char buf[32] = {0};while(1){while(mySerialread(fd,buf)){ //接收数据_串口   printf("%s\n",buf);  //判断串口指令for(int i = 0; i < strlen(buf); i++){switch (buf[i]){                           case 'N':printf("next\n");system("adb shell input swipe 540 1300 540 500 100");break;case 'U':printf("up\n");system("adb shell input swipe 540 500 540 1300 100");break;case 'Z':printf("zan\n");system("adb shell input tap 350 1050");system("adb shell input tap 350 1050");break;case 'Q':printf("qu\n");system("adb shell input keyevent 26");break;}}}}
}int main ()
{pthread_t t1,t2;if ((fd = mySerialOpen ("/dev/ttyS5", 115200)) < 0){fprintf (stderr, "Unable to open serial device: %s\n", strerror (errno)) ;return 1 ;}    pthread_create(&t1,NULL,func1,NULL); pthread_create(&t2,NULL,func2,NULL);     while(1){sleep(10);};    return 0 ;
}

更多推荐

【Ubuntu 语音控制安卓设备刷短视频 orangePi zero2 H616 (已开源) 】.md uptada:23/11/07

本文发布于:2023-11-30 01:18:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1648236.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:开源   语音   设备   视频   Ubuntu

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!