11 2017 档案

SPI编程
摘要:#include <stdio.h>#include <wiringPi.h>#include <wiringPiSPI.h> int main(void){ unsigned char date[2],rec[2]; int spiChannel = 0; int clock = 1000000; 阅读全文

posted @ 2017-11-17 09:20 玲珑子 阅读(867) 评论(0) 推荐(0)

树莓派配置(一):打开SPI
摘要:1.树莓派默认SPI关闭,在进行编程前需要打开SPI cd /boot/ sudo vi config.txt 将#dtparam=spi=off 改成:dtparam=spi=on 重启 sudo reboot 之后会在/dev/目录下看到 spidev0.0 和 spidev0.1两个驱动设备 阅读全文

posted @ 2017-11-13 16:40 玲珑子 阅读(8028) 评论(0) 推荐(0)

C++: I/O流详解(三)——串流
摘要:一、串流 串流类是 ios 中的派生类 C++的串流对象可以连接string对象或字符串 串流提取数据时对字符串按变量类型解释;插入数据时把类型 数据转换成字符串 串流I/O具有格式化功能 例: 阅读全文

posted @ 2017-11-01 22:07 玲珑子 阅读(1497) 评论(0) 推荐(0)

C++: I/O流详解(二)——输入输出格式控制
摘要:一、格式控制 ios提供直接设置标志字的控制格式函数 iostream和iomanip库还提供了一批控制符简化I/O格式化操作 设置标识字: 例1: 输出: 例二:不同基数形式的输入输出 输出: 例三:格式化输出浮点数 二、格式控制符 控制符是istream和ostream类定义了一批函数,作为重载 阅读全文

posted @ 2017-11-01 21:44 玲珑子 阅读(2789) 评论(0) 推荐(0)

C++: I/O流详解
摘要:一、输入流操作 1.read 无格式输入指定字节数 istream& read ( char* pch, int nCount ); istream& read ( unsigned char* puch, int nCount ); istream& read ( signed char* psc 阅读全文

posted @ 2017-11-01 21:12 玲珑子 阅读(1872) 评论(0) 推荐(1)

导航