在树莓派上实现垃圾桶的粗糙智能化

首先,我们的智能垃圾桶拥有以下几个功能
1、超声波模块:当超声波测算的距离在一定范围内驱动舵机
2、L9110S桥两路直流电机驱动板:实现上下左右的行走功能
3、DS18B20温度传感器:检测温度并显示在显示屏上
我们来实现超声波模块:

#include
#include
#include

#define Echo 0
#define Trip 2

void distime()
{
	struct timeval tv1;
	struct timeval tv2;
	long start,stop;
	float dis;
	digitalWrite(Trip,LOW);
	delay(500);
	digitalWrite(Trip,HIGH);
	delay(500);
	digitalWrite(Trip,LOW);
	while(!(digitalRead(Echo)==1));
	gettimeofday(&tv1,NULL);
	while(!(digitalRead(Echo)==0));
	gettimeofday(&tv2,NULL);
	start=tv1.tv_sec*1000000+tv1.tv_usec;
	stop=tv2.tv_sec*1000000+tv2.tv_usec;
	dis=(float)(stop - start)/1000000*34000/2;
	printf("dis=%f\n",dis);
}

void main()
{
	wiringPiSetup();
	pinMode(Trip,OUTPUT);
	pinMode(Echo,INPUT);
	while(1)
	{
	distime();	
	}
}

温度传感器的实现
wendu.h

#ifndef WENDU_H
#define WENDU_H
#include 
#include 
#include 
#include 
#include 
#include 
#include 
char *wendu();
char *fenge(char *readbuf); 

#endif 

wendu.c

#include "wendu.h"
char *fenge(char *readbuf)
{
	char buf[1024]={0};
	char buf1[1024]={0};
	char buf2[128]={0};
	float i;
	char *pEnd;
	strcpy(buf,readbuf);
	char *p;
	char *p1;
	p=strtok(buf,"\n");
	p=strtok(NULL,"\n");
	strcpy(buf1,p);
	p1=strtok(buf1,"=");
	p1=strtok(NULL,"=");
	strcpy(buf2,p1);
	i=strtof(buf2,&pEnd);
	memset(buf2,0,sizeof(buf2));
	sprintf(buf2,"wendu:%f ",i/1000);
	strcpy(p,buf2);
	return p;
}

char *wendu()
{
	char readbuf[1024]={0};
	char *p=malloc(128);
	FILE *fd;
	fd=popen("cat /sys/bus/w1/devices/28-031697798f95/w1_slave","r");
	if(fd==0||fd<0)
	{
		perror("open");
	}
	fread(readbuf,1,1024,fd);
	strcpy(p,readbuf);
	return p;
}

直流电机的使用
在这里我创建了一个服务端,然后在服务端会接收来自客户端的消息,并对该消息进行处理,决定向那个方向前行

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include "msg.h"
#define PORT 8892
#define B1 21
#define B2 22
#define A1 23
#define A2 24
void forward()
{
	digitalWrite(A1,HIGH);
	digitalWrite(A2,LOW);
	digitalWrite(B1,HIGH);
	digitalWrite(B2,LOW);

}

void back()
{
	digitalWrite(A1,LOW);
	digitalWrite(A2,HIGH);
	digitalWrite(B1,LOW);
	digitalWrite(B2,HIGH);

}

void left()
{
digitalWrite(A1,LOW);
	digitalWrite(A2,LOW);

	digitalWrite(B1,HIGH);
	digitalWrite(B2,LOW);
}

void right()
{
	digitalWrite(A1,HIGH);
	digitalWrite(A2,LOW);
digitalWrite(B1,HIGH);
	digitalWrite(B2,HIGH);

}

void witch(char *readbuf)
{
	printf("1\n");
	char a[128]="a";
	if(strcmp(readbuf,"w")==0)
	{
		printf("a\n");
		forward();
	}
if(strcmp(readbuf,"s")==0)
	{
		printf("a\n");
		back();
	}
if(strcmp(readbuf,"a")==0)
	{
		printf("a\n");
		left();
	}
if(strcmp(readbuf,"d")==0)
	{
		printf("a\n");
		right();
	}
}

void socket_in()
{
	int s_fd;
	int c_fd;
	int len;
	struct msg *in_msg;
	char readbuf[128]={0};
	char a;
	in_msg=malloc(sizeof(struct msg));
//	in_msg->caozuo=malloc(128);
	s_fd=socket(AF_INET,SOCK_STREAM,0);
	if(s_fd==0||s_fd<0)
	{
		perror("socket");
	}
	struct sockaddr_in s_addr;
	struct sockaddr_in c_addr;
	s_addr.sin_family=AF_INET;
	s_addr.sin_port=htons(PORT);
	s_addr.sin_addr.s_addr=htonl(INADDR_ANY);
	len=sizeof(struct sockaddr_in);
	bind(s_fd,(void *)&s_addr,sizeof(struct sockaddr_in));
	listen(s_fd,10);
	c_fd=accept(s_fd,(void *)&s_addr,&len);
	printf("in ip=%d\n",inet_ntoa(c_addr.sin_addr));
	while(1)
	{
		read(c_fd,readbuf,sizeof(readbuf));
		printf("msg=%s\n",readbuf);
		witch(readbuf);
	}
}

void main()
{
	wiringPiSetup();
	pinMode(A1,OUTPUT);
	pinMode(A2,OUTPUT);
	pinMode(B1,OUTPUT);
	pinMode(B2,OUTPUT);
	socket_in();
}

结合起来使用:

#include 
#include 
#include 
#include
#include 
#include 
#include 
#include "wendu.h"
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define Echo 4
#define Trip 5
#define duoji 29
#define PORT 8893
#define B1 21
#define B2 22
#define A1 23
#define A2 24

int fd;
pthread_mutex_t mutex1;
unsigned char  yi[4][16]={
" Made by hhc    ",//第一行
"                ",//第二行
"                ",//第三行
"                " //第四行
};               //显示内容
const unsigned char zi[];
void forward()
{
	digitalWrite(A1,HIGH);
	digitalWrite(A2,LOW);
	digitalWrite(B1,HIGH);
	digitalWrite(B2,LOW);

}

void back()
{
	digitalWrite(A1,LOW);
	digitalWrite(A2,HIGH);
	digitalWrite(B1,LOW);
	digitalWrite(B2,HIGH);

}

void left()
{
digitalWrite(A1,LOW);
	digitalWrite(A2,LOW);

	digitalWrite(B1,HIGH);
	digitalWrite(B2,LOW);
}

void right()
{
	digitalWrite(A1,HIGH);
	digitalWrite(A2,LOW);
	digitalWrite(B1,HIGH);
	digitalWrite(B2,HIGH);
}

void stop()
{
	digitalWrite(A1,HIGH);
	digitalWrite(A2,HIGH);
	digitalWrite(B1,HIGH);
	digitalWrite(B2,HIGH);
}
void witch(char *readbuf)
{
	printf("1\n");
	char a[128]="a";
	if(strcmp(readbuf,"w")==0)
	{
		printf("a\n");
		forward();
	}
if(strcmp(readbuf,"s")==0)
	{
		printf("a\n");
		back();
	}
if(strcmp(readbuf,"a")==0)
	{
		printf("a\n");
		left();
	}
if(strcmp(readbuf,"d")==0)
	{
		printf("a\n");
		right();
	}
if(strcmp(readbuf,"stop")==0)
{
	stop();
}
}

void socket_in()
{
//	pthread_mutex_lock(&mutex1);
	int s_fd;
	int c_fd;
	int len;
	struct msg *in_msg;
	char readbuf[128]={0};
	char a;
//	in_msg=malloc(sizeof(struct msg));
//	in_msg->caozuo=malloc(128);
	s_fd=socket(AF_INET,SOCK_STREAM,0);
	if(s_fd==0||s_fd<0)
	{
		perror("socket");
	}
	struct sockaddr_in s_addr;
	struct sockaddr_in c_addr;
	s_addr.sin_family=AF_INET;
	s_addr.sin_port=htons(PORT);
	s_addr.sin_addr.s_addr=htonl(INADDR_ANY);
	len=sizeof(struct sockaddr_in);
	bind(s_fd,(void *)&s_addr,sizeof(struct sockaddr_in));
	listen(s_fd,10);
	c_fd=accept(s_fd,(void *)&s_addr,&len);
//	pthread_mutex_unlock(&mutex1);
	printf("in ip=%d\n",inet_ntoa(c_addr.sin_addr));
	while(1)
	{
		read(c_fd,readbuf,sizeof(readbuf));
		printf("msg=%s\n",readbuf);
		witch(readbuf);
	}
}

void dianji()
{
	wiringPiSetup();
	pinMode(A1,OUTPUT);
	pinMode(A2,OUTPUT);
	pinMode(B1,OUTPUT);
	pinMode(B2,OUTPUT);
}


void duoji1()
{
	wiringPiSetup();
	softPwmCreate(duoji,15,200);
	softPwmWrite(duoji,25);
	delay(1000);
	softPwmWrite(duoji,15);
	delay(1000);
}
void distime()
{
	struct timeval tv1;
	struct timeval tv2;
	long start,stop;
	float dis;
	digitalWrite(Trip,LOW);
	delay(500);
	digitalWrite(Trip,HIGH);
	delay(500);
	digitalWrite(Trip,LOW);
	while(!(digitalRead(Echo)==1));
	gettimeofday(&tv1,NULL);
	while(!(digitalRead(Echo)==0));
	gettimeofday(&tv2,NULL);
	start=tv1.tv_sec*1000000+tv1.tv_usec;
	stop=tv2.tv_sec*1000000+tv2.tv_usec;
	dis=(float)(stop - start)/1000000*34000/2;
	printf("dis=%f\n",dis);
	if(dis<10)
	{
		duoji1();
	}
}

void ceju()
{
	wiringPiSetup();
	pinMode(Trip,OUTPUT);
	pinMode(Echo,INPUT);
	while(1)
	{
	distime();	
	}
}

void init(void)//初始化
{
	wiringPiSetup();
        fd=wiringPiI2CSetup(0x3c);//i2c初始化 0x3c是oled的从机地址
        wiringPiI2CWriteReg8(fd,0x00,0xa1);//图像反了修改成0xa0
        wiringPiI2CWriteReg8(fd,0x00,0xc8);//行输出反了修改成0xc0
        wiringPiI2CWriteReg8(fd,0x00,0x8d);//允许电荷泵
        wiringPiI2CWriteReg8(fd,0x00,0x14);
        wiringPiI2CWriteReg8(fd,0x00,0xa6);//想反相显示改成0xa7
	wiringPiI2CWriteReg8(fd,0x00,0x21);//重置列地址
	wiringPiI2CWriteReg8(fd,0x00,0x00);
	wiringPiI2CWriteReg8(fd,0x00,0x7f);
        wiringPiI2CWriteReg8(fd,0x00,0xaf);//开显示
}
void qingping(void)//清屏
{
	char zt1,zt2;
	for(zt1=0;zt1<8;zt1++)
	{
		wiringPiI2CWriteReg8(fd,0x00,0xb0+zt1);
	        for(zt2=0;zt2<128;zt2++) wiringPiI2CWriteReg8(fd,0x40,0x00);
	}
}
void ascii(void)//显示ASCII码8*16
{
	int zt;
        char zt3,zt4;
	for(zt3=0;zt3<4;zt3++)
        {
		wiringPiI2CWriteReg8(fd,0x00,0xb0+(zt3*2));
                for(zt4=0;zt4<16;zt4++)
			for(zt=0;zt<8;zt++)
                        	wiringPiI2CWriteReg8(fd,0x40,zi[yi[zt3][zt4]*16+zt]);
                wiringPiI2CWriteReg8(fd,0x00,0xb0+(zt3*2)+1);
                for(zt4=0;zt4<16;zt4++)
                	for(zt=0;zt<8;zt++)
                        	wiringPiI2CWriteReg8(fd,0x40,zi[yi[zt3][zt4]*16+zt+8]);
	}
}
void shijian(void)//当前时间
{
        struct tm *ptr;
	char *p=malloc(128);
        time_t lt;
	char a[16]={"172.20.10.3"};
	strcpy(p,wendu());
	strcpy(p,fenge(p));
	printf("p=%s\n",p);
        lt=time(<);
        ptr=localtime(<);
	strcpy(yi[1],a);
       // strftime(yi[1],16,"%m/%d %a",ptr); //月/日 周几
	strftime(yi[2],16,"%R %p",ptr);//时:分 am或pm
	strcpy(yi[3],p);
}

void xianshi()
{
//	pthread_mutex_lock(&mutex1);
	init();
	qingping();
	while(1)
	{
		shijian();
		ascii();
		delay(100);
//		pthread_mutex_unlock(&mutex1);
	}
}
int main(void)
{
	dianji();
	pthread_t t1;
	pthread_t t2;
	pthread_t t3;
	pthread_create(&t1,NULL,(void *)xianshi,NULL);
	pthread_create(&t2,NULL,(void *)ceju,NULL);
	pthread_create(&t3,NULL,(void *)socket_in,NULL);
//	pthread_mutex_init(&mutex1,NULL);
	while(1);
}



const unsigned char zi[] =
{
/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//0

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//1

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//2

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//3

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//4

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//5

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//6

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//7

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//8

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//9

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//10

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//11

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//12

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//13

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//14

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//15

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//16

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//17

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//18

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//19

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//20

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//21

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//22

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//23

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//24

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//25

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//26

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//27

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//28

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//29

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//30

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//31

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//32

/*--  文字:  !  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x00,//33

/*--  文字:  "  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x10,0x0C,0x02,0x10,0x0C,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//34

/*--  文字:  #  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x40,0xC0,0x78,0x40,0xC0,0x78,0x00,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x00,//35

/*--  文字:  $  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x88,0x88,0xFC,0x08,0x30,0x00,0x00,0x18,0x20,0x20,0xFF,0x21,0x1E,0x00,//36

/*--  文字:  %  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0xF0,0x08,0xF0,0x80,0x60,0x18,0x00,0x00,0x00,0x31,0x0C,0x03,0x1E,0x21,0x1E,0x00,//37

/*--  文字:  &  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x2C,0x19,0x27,0x21,0x10,//38

/*--  文字:  '  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x12,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//39

/*--  文字:  (  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//40

/*--  文字:  )  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//41

/*--  文字:  *  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//42

/*--  文字:  +  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x0F,0x01,0x01,0x01,//43

/*--  文字:  ,  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x70,0x00,0x00,0x00,0x00,0x00,//44

/*--  文字:  -  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x00,//45

/*--  文字:  .  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//46

/*--  文字:  /  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0xC0,0x38,0x04,0x00,0x00,0x60,0x18,0x07,0x00,0x00,0x00,0x00,//47

/*--  文字:  0  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//48

/*--  文字:  1  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,//49

/*--  文字:  2  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x08,0x08,0x08,0x08,0xF0,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//50

/*--  文字:  3  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x30,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x18,0x20,0x21,0x21,0x22,0x1C,0x00,//51

/*--  文字:  4  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x40,0x30,0xF8,0x00,0x00,0x00,0x06,0x05,0x24,0x24,0x3F,0x24,0x24,//52

/*--  文字:  5  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xF8,0x88,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x20,0x20,0x20,0x11,0x0E,0x00,//53

/*--  文字:  6  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x88,0x88,0x90,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x20,0x1F,0x00,//54

/*--  文字:  7  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x18,0x08,0x08,0x88,0x68,0x18,0x00,0x00,0x00,0x00,0x3E,0x01,0x00,0x00,0x00,//55

/*--  文字:  8  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//56

/*--  文字:  9  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xF0,0x08,0x08,0x08,0x10,0xE0,0x00,0x00,0x01,0x12,0x22,0x22,0x11,0x0F,0x00,//57

/*--  文字:  :  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//58

/*--  文字:  ;  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,//59

/*--  文字:  <  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//60

/*--  文字:  =  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x00,//61

/*--  文字:  >  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//62

/*--  文字:  ?  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x48,0x08,0x08,0x88,0x70,0x00,0x00,0x00,0x00,0x30,0x37,0x00,0x00,0x00,//63

/*--  文字:  @  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x28,0x2F,0x28,0x17,0x00,//64

/*--  文字:  A  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//65

/*--  文字:  B  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//66

/*--  文字:  C  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//67

/*--  文字:  D  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//68

/*--  文字:  E  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//69

/*--  文字:  F  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//70

/*--  文字:  G  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//71

/*--  文字:  H  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//72

/*--  文字:  I  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//73

/*--  文字:  J  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//74

/*--  文字:  K  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//75

/*--  文字:  L  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//76

/*--  文字:  M  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x01,0x3E,0x01,0x3F,0x20,0x00,//77

/*--  文字:  N  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//78

/*--  文字:  O  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//79

/*--  文字:  P  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//80

/*--  文字:  Q  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x28,0x28,0x30,0x50,0x4F,0x00,//81

/*--  文字:  R  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//82

/*--  文字:  S  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//83

/*--  文字:  T  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//84

/*--  文字:  U  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//85

/*--  文字:  V  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//86

/*--  文字:  W  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x00,0xF8,0x00,0xF8,0x08,0x00,0x00,0x03,0x3E,0x01,0x3E,0x03,0x00,0x00,//87

/*--  文字:  X  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//88

/*--  文字:  Y  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//89

/*--  文字:  Z  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//90

/*--  文字:  [  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//91

/*--  文字:  \  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x04,0x38,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//92

/*--  文字:  ]  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//93

/*--  文字:  ^  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x04,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//94

/*--  文字:  _  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//95

/*--  文字:  `  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//96

/*--  文字:  a  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x19,0x24,0x24,0x12,0x3F,0x20,0x00,//97

/*--  文字:  b  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x10,0xF0,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//98

/*--  文字:  c  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//99

/*--  文字:  d  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x80,0x80,0x90,0xF0,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//100

/*--  文字:  e  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x24,0x24,0x24,0x24,0x17,0x00,//101

/*--  文字:  f  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x80,0x80,0xE0,0x90,0x90,0x20,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//102

/*--  文字:  g  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//103

/*--  文字:  h  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x10,0xF0,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//104

/*--  文字:  i  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//105

/*--  文字:  j  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//106

/*--  文字:  k  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x10,0xF0,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x06,0x29,0x30,0x20,0x00,//107

/*--  文字:  l  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//108

/*--  文字:  m  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//109

/*--  文字:  n  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//110

/*--  文字:  o  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//111

/*--  文字:  p  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0x91,0x20,0x20,0x11,0x0E,0x00,//112

/*--  文字:  q  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0x91,0xFF,0x80,//113

/*--  文字:  r  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//114

/*--  文字:  s  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//115

/*--  文字:  t  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x10,0x00,//116

/*--  文字:  u  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//117

/*--  文字:  v  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x03,0x0C,0x30,0x0C,0x03,0x00,0x00,//118

/*--  文字:  w  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x80,0x80,0x00,0x80,0x80,0x00,0x80,0x80,0x01,0x0E,0x30,0x0C,0x07,0x38,0x06,0x01,//119

/*--  文字:  x  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x80,0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x20,0x31,0x0E,0x2E,0x31,0x20,0x00,//120

/*--  文字:  y  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x81,0x86,0x78,0x18,0x06,0x01,0x00,//121

/*--  文字:  z  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//122

/*--  文字:  {  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0xFC,0x02,0x02,0x00,0x00,0x00,0x00,0x01,0x3E,0x40,0x40,//122

/*--  文字:  |  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//124

/*--  文字:  }  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x02,0x02,0xFC,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x3E,0x01,0x00,0x00,0x00,0x00,//125

/*--  文字:  ~  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x02,0x01,0x02,0x02,0x04,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//126

/*--  文字:     --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//127
};

你可能感兴趣的:(在树莓派上实现垃圾桶的粗糙智能化)