- 博客(40)
- 收藏
- 关注
原创 基于全志H616的智能家居
需要的数据 把dict数据问AI用python写出来 face.py。修改“default” face.py。实现c语言调用python代码 face.c。3.接上串口烧入安装包并且用电脑串口测试。人脸识别示例代码的位置。获取score最大的值在数据库去开锁。修改文件名指令“mv”5.接入阿里云人脸识别。4.板子测试语音模块。
2025-02-05 17:33:04
575
原创 全志对接阿里云视觉垃圾分类项目总结
这里在response.body.to_map()函数后面解析出jason数据的中文垃圾分类类别。同时将场景二注释,场景一代码打开,修改open函数图片本地识别的路径,并输入自己测试图片的路径。1.注册阿里云账号,找到视觉垃圾分类,获取AccessKey ID &Secret。export命令可查看已绑定的AccessKey。将上面的示例代码本地分类封装成一个函数。4.在阿里云平台复制python。然后在末尾输入上面两行后保存。文件在本地或文件不在同一地域。,下面的两行写入到家目。
2025-01-26 11:16:07
236
原创 Linux文件的读写操作及光标的移动 open write read lseek
【代码】Linux文件的读写操作及光标的移动 open write read lseek。
2024-12-02 21:05:27
91
原创 VMware虚拟接网络连接的三种方式
再ping 192.168.1.89//可ping自己也可在Windows cmd上ping。3.Host-Only(仅主机模式)1.Bridged(桥接模式)//2.NAT(网络地址转换模式)一、下图为桥接原理(了解)
2024-06-26 18:04:55
304
原创 Linux虚拟机和Windows间的文件传输方式
1. 在Windows新建文件,再把文件拖到Linux即可,反之也可2.将Windows文件共享到Linux下的方法如下启用共享文件夹3.用ftp(filezilla、totalcommand、cuteftp)
2024-06-26 17:27:44
186
原创 2021-08-18
execl函数//文件execl.c#include <stdio.h>#include <stdlib.h>#include <unistd.h>//函数原型:int execl(const char *path, const char *arg, ...);int main(void){ printf("before execl\n"); if(execl("./echoarg","echoarg","-l",NULL) == -1)
2021-08-18 20:39:46
67
原创 2021-08-16
exec函数族参数说明:path:可执行文件的路径名字arg:可执行程序所带的参数,第一个参数为可执行文件名字,没有带路径且arg必须以NULL结束file:如果参数file中包含/,则就将其视为路径名,否则就按PHTH环境变量,在它所指定的各目录中搜寻可执行文件。...
2021-08-16 21:53:53
63
原创 2021-08-15
exec族函数https://blog.youkuaiyun.com/u014530704/article/details/73848573
2021-08-15 22:02:11
51
原创 2021-08-14
Linux进程.父子进程与孤儿进程孤儿进程父进程如果不等待子进程退出,在子进程之前就结束了自己的“生命”,此时子进程叫做孤儿进程 Linux避免系统存在过多孤儿进程,init进程收留孤儿进程,变成孤儿进程的父进程。wait()waitpid()fork()vfork()僵死进程...
2021-08-14 14:39:12
73
原创 2021-08-13
Linux进程_创建进程函数fork的使用#include <stdio.h>#include <sys/types.h>#include <unistd.h>int main(){ pid_t pid; pid_t pid2; pid = getpid(); printf("fork before pid:%d\n",pid); fork(); pid2 = g
2021-08-13 12:43:28
69
原创 2021-08-12
Linux进程相关概念1.什么是程序,什么是进程,有什么区别?2.如何查看系统中有哪些进程?3.什么是进程标识符?4.什么叫父进程,什么叫子进程?5.c程序的存储空间是如何分配?
2021-08-12 10:55:18
67
原创 2021-08-11
Linux标准c库#include <stdio.h>#include <string.h>int main(){ FILE *fp; char *str = "chenlichen hen shuai"; char readBuf[128] = {0}; fp = fopen("./chen.txt","w+"); fwrite(str,sizeof(char)*strlen(str),1,
2021-08-11 22:39:59
54
原创 2021-08-10
Linux写结构体数组到文件#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <stdlib.h>#include <string.h>struct Text{ int a; char c;};int main()
2021-08-10 22:21:37
54
原创 2021-08-10
Linux写一个整数到文件#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <stdlib.h>#include <string.h>struct Text{ int a; char c;};int main()
2021-08-10 22:09:30
53
原创 2021-08-10
Linux配置文件的修改int main(int argc,char **argv){ int fdSrc; char *readBuf = NULL; fdSrc = open(argv[2],O_RDWR); int size = lseek(fdSrc,0,SEEK_END); lseek(fdSrc,0,SEEK_SET); readBuf = (char *)malloc(sizeof(char)*s
2021-08-10 22:03:31
54
原创 2021-08-09
配置文件的修改#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <stdlib.h>#include <string.h>int main(int argc,char **argv){ int fdSrc; c
2021-08-09 22:49:05
53
原创 2021-08-07
Linux cp指令代码原文件:src.c目标文件:des.c思路1.打开src.c2.读src到buf3.打开/创建des.c注意:要用到参数 main函数原型要写完整int main( int argc,char **argv)argc为参数cp代码:#include <stdio.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include
2021-08-07 19:00:17
74
原创 2021-08-04
学生成绩管理系统用链表头插法录取学生成绩#include <stdio.h>#include <stdlib.h>struct Text{ int Chinesedata; int Mathdata; int Englishdata; struct Text *next;};void printfChineseScore(struct Text *head){ struct Text *p=head; int
2021-08-04 18:42:37
79
原创 2021-08-03
Linux文件的读取与及光标的移动read()lseek()#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <string.h>int main(){ int fd; char *buf = "chenlechen h
2021-08-03 15:25:56
56
原创 2021-08-02
Linux创建并写入文件write函数头文件指令:man 2 writeclose函数头文件指令:man 2 writestrlen函数头文件指令:man strlenwrite(fd,buf,strlen(buf));close(fd);#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdio.h>#include <sys/types.
2021-08-02 10:52:48
100
原创 2021-08-01
Linux文件的创建文件描述符:在一个进程中不止一个文件,这个进程会建立结构体,打开你需要的那个文件要看文件描述符。O_RDONLY 只读打开O_WRONLY 只写打开O_RDWR 可读可写打开Linux工作空间下open函数的头文件打开指令:man 2 open先 touch一个file1文件open("./file1",O_RDWR)int fd;//原型file description ,文件描述符open("./file1",O_RDWR);//打开文件file,可读可写的方式
2021-08-01 17:07:03
61
原创 2021-07-15
智能晾衣#设计介绍智能晾衣系统使用开源硬件arduino作为主控,涉及按键开关的使用,雨水感应器的使用和直流电机的使用,还会涉及一些机械的运用。通电→按键选择模式①雨水感应模式 → 1号LED指示灯亮 →雨水传感器检测外界是否存雨水,并向主控板arduino传输信号 →传感器检测不到雨水时,电机执行顺时针转动,推出晾衣架,并当运行到限位开关时停止
2021-07-15 17:07:10
365
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人