虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

Set-Partitioning

  • Arduino学习笔记3_连接HMC5883L三轴电子罗盘传感器

    用途:测量地磁方向,测量物体静止时候的方向,测量传感器周围磁力线的方向。注意,测量地磁时候容易受到周围磁场影响,主芯片HMC5883 三轴磁阻传感器特点(抄自网上): 1,数字量输出:I2C 数字量输出接口,设计使用非常方便。 2,尺寸小: 3x3x0.9mm LCC 封装,适合大规模量产使用。 3,精度高:1-2 度,内置12 位A/D,OFFSET, SET/RESET 电路,不会出现磁饱和现象,不会有累加误差。 4,支持自动校准程序,简化使用步骤,终端产品使用非常方便。 5,内置自测试电路,方便量产测试,无需增加额外昂贵的测试设备。 6,功耗低:供电电压1.8V, 功耗睡眠模式-2.5uA 测量模式-0.6mA   连接方法: 只要连接VCC,GND,SDA,SDL 四条线。 Arduino GND -> HMC5883L GND Arduino 3.3V -> HMC5883L VCC Arduino A4 (SDA) -> HMC5883L SDA Arduino A5 (SCL) -> HMC5883L SCL (注意,接线是A4,A5,不是D4,D5) 源程序: #include <Wire.h> #include <HMC5883L.h> HMC5883Lcompass; voidsetup() { Serial.begin(9600); Wire.begin(); compass = HMC5883L(); compass.SetScale(1.3); compass.SetMeasurementMode(Measurement_Continuous); } voidloop() { MagnetometerRaw raw = compass.ReadRawAxis(); MagnetometerScaled scaled = compass.ReadScaledAxis(); float xHeading = atan2(scaled.YAxis, scaled.XAxis); float yHeading = atan2(scaled.ZAxis, scaled.XAxis); float zHeading = atan2(scaled.ZAxis, scaled.YAxis); if(xHeading < 0) xHeading += 2*PI; if(xHeading > 2*PI) xHeading -= 2*PI; if(yHeading < 0) yHeading += 2*PI; if(yHeading > 2*PI) yHeading -= 2*PI; if(zHeading < 0) zHeading += 2*PI; if(zHeading > 2*PI) zHeading -= 2*PI; float xDegrees = xHeading * 180/M_PI; float yDegrees = yHeading * 180/M_PI; float zDegrees = zHeading * 180/M_PI; Serial.print(xDegrees); Serial.print(","); Serial.print(yDegrees); Serial.print(","); Serial.print(zDegrees); Serial.println(";"); delay(100); }

    标签: Arduino 5883L 5883 HMC

    上传时间: 2014-03-20

    上传用户:tianyi223

  • 简单的session类

    简单的session类,用于手机短信应用。主要包括setAttribute(),getAttribute(), removeSession()个方法,set方法在没有session时自动建立一个session.

    标签: session

    上传时间: 2015-01-07

    上传用户:xiaohuanhuan

  • 单片机最小系统

    单片机最小系统,两位LED数码管由串口输出接两个164驱动,Lout,Rout为左右声道输出,SET, ALT0, ALT1为三个按键,也可自己在开始的I/O定义改成你想用的I/O口;12M晶振若用89C51则只可装下约14首歌曲,用89C52则可装下近40曲

    标签: 单片机 最小系统

    上传时间: 2015-03-14

    上传用户:qiao8960

  • 介绍几种cpuThe 8xC251SA/SB/SP/SQ improves on the MCS-51 architecture and peripheral features, introducin

    介绍几种cpuThe 8xC251SA/SB/SP/SQ improves on the MCS-51 architecture and peripheral features, introducing the advanced register based CPU architecture i.e., the MCS 251 microcontroller architecture. The register based CPU supports a 40-byte register file. In addition, the 8xC251SA/SB/SP/SQ microcontroller has 256-Kbyte expanded external code/data memory space and 64-Kbyte stack space. The new controller is also specially designed to execute C code efficiently. More importantly, the 8xC251SA/SB/SP/SQ maintains binary code compatibility with MCS 51 microcontrollers but at the same time allows the use of the powerful MCS 251 microcontroller instruction set, with many new 8, 16 and 32 bit instructions available. The 8xC251SA/SB/SP/SQ has 512 bytes or 1 Kbyte of on-chip data RAM options and is available in 16 Kbytes and 8 Kbytes of on-chip ROM/OTPROM or ROMless options.

    标签: architecture introducin peripheral improves

    上传时间: 2015-03-15

    上传用户:ccclll

  • 基于matlab的mp3的读写函数Mp3 toolbox for Matlab. Alfredo Fernandez Franco Aalborg University Departament of

    基于matlab的mp3的读写函数Mp3 toolbox for Matlab. Alfredo Fernandez Franco Aalborg University Departament of Acoustics M.Sc. Student aberserk@yahoo.com Includes 2 functions to write and read MP3 files. It works like the commands WAVWRITE and WAVREAD. 1.- Just unpack in the toolbox folder under the MATLAB directory. 2.- Set the MATLAB search path to include that folder. This version was made in MATLAB for WINDOWS only. I ll probably will make the UNIX version later. 01-11-2004.

    标签: Departament University Fernandez Alfredo

    上传时间: 2014-12-02

    上传用户:开怀常笑

  • 应用于ucGUI的16*16点阵字库文件 只要将该文件加入ucGUI的工程中, 再在GUI.H中如下声明: extern const GUI_FONT GUI_Font6x8 ...... exter

    应用于ucGUI的16*16点阵字库文件 只要将该文件加入ucGUI的工程中, 再在GUI.H中如下声明: extern const GUI_FONT GUI_Font6x8 ...... extern const GUI_FONT GUI_Font_HZ16x16 //汉字字体 即可使用. 使用实例: static void DemoHZ(void) { const char str[] = GUI_UC_START"中国人民万岁"GUI_UC_END /* Set ShiftJIS font */ GUI_SetFont(&GUI_Font_HZ16x16) GUI_DispString(str) }

    标签: ucGUI GUI_FONT GUI_Font extern

    上传时间: 2014-12-02

    上传用户:woshini123456

  • 先进的窗口管理器。可以在你的桌面上实现冻结、解冻、更名、设置总在最上面、设置不总在最上面、闪烁、最大化、最小化、聚焦、隐藏、显示和中断一个可视或不可视窗口的功能。 An advanced window

    先进的窗口管理器。可以在你的桌面上实现冻结、解冻、更名、设置总在最上面、设置不总在最上面、闪烁、最大化、最小化、聚焦、隐藏、显示和中断一个可视或不可视窗口的功能。 An advanced window manager that allows you to freeze, dfreeze, rename, set always on top, set not always on top, flash, maximize, minimize, focus, hide, show or terminate an visible or invisible window on your desktop.

    标签: advanced window 窗口 可视

    上传时间: 2015-03-25

    上传用户:qq21508895

  • This model simulates a CDMA2000 1xRTT Forward link (between Base Station and Mobile Station). In par

    This model simulates a CDMA2000 1xRTT Forward link (between Base Station and Mobile Station). In particular, it simulates the Radio Configuration 3 of a Forward Fundamental channel. The block CDMA2k: Initial settings allows you to set different parameters such as data rate, Power Control SubChannel insertion rate, spreading code index, QOSF index and the channel model.

    标签: Station simulates Forward between

    上传时间: 2015-03-28

    上传用户:13215175592

  • This driver was developed using a USB keyboard from Cherry,as indicated by the VID and PID codes. Th

    This driver was developed using a USB keyboard from Cherry,as indicated by the VID and PID codes. These IDs must be set for the device you intend to support. Similarly, you will need to set Class to the appropriate string for your device class.

    标签: developed indicated keyboard Cherry

    上传时间: 2015-04-02

    上传用户:nanxia

  • mp3设计程序资料

    mp3设计程序资料,采用c语言编写。 README file for yampp-3 source code 2001-05-27 This is the current state of the yampp-3 source code, 2001-05-27. This code is intended to run on Rev. B of the yampp-3 PCB, but can ofcourse be used on compatible systems as well. It still uses the "old" song selection system as the yampp-2. However, the disk handling routines has improved a lot and the obviosly, the new VS1001 handling has been put in. The codesize is almost at it s maximum at 1F40 bytes. A .ROM file is included if you don t have the compiler set up. For now, the documentation is in the code

    标签: mp3 设计程序

    上传时间: 2015-04-13

    上传用户:小码农lz