/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/¼òÌåÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
/ÖÐÎÄ/
´®¿ÚÉÏλ»úÈí¼þÊÇÒ»¿îʵÓõĴ®¿Úµ÷ÊÔÈí¼þ¡£¸ÃÈí¼þ½çÃæ¼ò½à£¬Ê¹Ó÷½±ã¡£´®¿ÚÉÏλ»ú³ÌÐò¡£ÊµÏÖÈË»ú»á»°£¬¿ÉÏòµ¥Æ¬»ú·¢ËÍÃüÁ²¢Ê¹ÆäÖ´ÐÐÏàÓ¦µÄ²Ù×÷¡£Í¬Ê±¿ÉÒÔ½ÓÊÕµ¥Æ¬»úµÄ·µ»ØÃüÁî²¢×ö³ö»ØÓ¦¡£
Ò»¡¢»ù±¾ÊÕ·¢
1£ºÊÕÂëºÍ·¢Âë¸ñʽ¾ù¿ÉÉèΪHEX»òÕßCHR¡£
2£º¶¨Ê±·¢Ë͹¦ÄÜ¿ÉÒÔ¾«È·µ½ºÁÃ룬µ«ÊDz»ÄÜÌ«¿ì£¨·¢ËÍΪ¶Àռʽ,Êý¾Ý²»·¢ËÍÍ꺯Êý²»»á·µ»Ø£©£¬Èç¹ûÉÏÒ»Ö¡Êý¾Ý»¹Ã»·¢ËÍÍê±Ï¾Í·¢ËÍÏÂÒ»Ö¡Êý¾Ý»á³ö´í¡£
3£ºÇëʹÓÃft232´®¿ÚоƬ»òÖ§³Ö¸ß²¨ÌØÂʵÄоƬ£¬·ñÔò²¨ÌØÂÊÎÞ·¨ÉèÖùý¸ß¡£
¶þ¡¢¸ß¼¶ÊÕÂë
1£ºÊÕÂëÏÔʾΪHEX¸ñʽ¡£
2£ºÏÂλ»ú·¢ËÍ×Ô¶¨ÒåÊý¾Ý£¬¸ñʽΪ£º0x88+FUN+LEN+DATA+SUM FUN¿ÉÒÔÊÇ 0xA1µ½0xAA£¬¹²10¸ö£»LENΪDATAµÄ³¤¶È£¨²»°üÀ¨0x88¡¢FUN¡¢LEN¡¢
SUM£©¡£SUMÊÇ0x88Ò»Ö±µ½DATA×îºóÒ»×ֽڵĺͣ¬uint8¸ñʽ¡££¨¼ÇµÃ´ò¿ªÐèҪʹÓÃÖ¡µÄ¿ª¹Ø£¬¸ü¸ÄÉèÖúóµã»÷±£´æÉèÖÃʹÉèÖÃÉúЧ£©
3£ºÊý¾Ý¿ÉÒÔÊÇuint8¡¢int16¡¢uint16¡¢int32¡¢floatÕ⼸¸ö³£Óøñʽ£¬¶à×Ö½ÚÊý¾Ý¸ßλÔÚÇ°¡£
4£º¹²ÓÐ20¸öÊý¾Ý´æ´¢Æ÷£¬Ã¿¸öÊý¾Ý¿ÉÒÔ·Ö±ðÉèÖÃΪÀ´×Ô10¸ö×Ô¶¨ÒåÖ¡µÄ30¸öÊý¾Ý¡£
5£º¸ßËÙͨѶʱ£¨2msÒ»Ö¡Êý¾Ý»òÕ߸ü¿ì£©£¬Çë¹Ø±Õ¸ß¼¶ÊÕÂëÒ³ÃæµÄÊý¾ÝÏÔʾ°´Å¥£¬·ñÔò¸üйý¿ìÓпÉÄÜ»áÔì³É³ÌÐò¿¨ËÀ¡£
6£º·É¿ØÏÔʾ¶ÔÓ¦µÄÖ¡FUNΪ0xAF£¬£¨Ö¡¸ñʽ£º0x88+0xAF+0x1C+ACC DATA+GYRO DATA+MAG DATA+ANGLE DATA+VOLTAGE + 0x00
0x00+SUM£¬¹²32×Ö½Ú£¬ACC/GYRO/MAG/ANGLE(roll/pitch/yaw)/VOLTAGEÊý¾ÝΪint16¸ñʽ£¬ÆäÖÐANGLEµÄrollºÍpitchÊý¾ÝÒÔ¼°VOLTAGEΪʵ¼ÊÖµ³Ë
ÒÔ100ÒÔºóµÃµ½µÄÕûÊýÖµ£¬yawΪ³ËÒÔ10ÒÔºóµÃµ½µÄÕûÊýÖµ£¬ÉÏλ»úÔÚÏÔʾʱÔÙ³ýÒÔ100ºÍ10£©¡£
7£ºÒ£¿ØÏÔʾ¶ÔÓ¦µÄÖ¡FUNΪ0xAE£¬£¨Ö¡¸ñʽ£º0x88+0xAE+0x12+THROT YAW ROLL PITCH AUX1 2 3 4 5+SUM£¬¹²16×Ö½Ú£©£¬Êý¾ÝΪuint16¸ñʽ£¬Ò£¿Ø
Êý¾Ý×îСÔÚ1000×óÓÒ£¬×î´óÔÚ2000×óÓÒ¡£Ð¡¼¼ÇÉ£ºÈç¹û¸ßËÙͨѶʱÊÇΪÁË»²¨ÐΣ¬¾ÍÖ»¿ª²¨ÐÎÏÔʾ£¬²¢Ö»±£ÁôÐèÒª¹Û²ìµÄ²¨ÐΣ¬Èç¹ûÊÇΪÁ˹۲ìÊý¾Ý£¬¾Í¹Ø
±Õ²¨ÐÎÏÔʾ£¬Ö»±£ÁôÊÕÂëÏÔʾ£¬ÕâÑù¿ÉÒÔ¼Ó¿ì³ÌÐòÏìÓ¦Ëٶȡ£
7£º×î¿ìͨѶËٶȲâÊÔ¹ýÏÂλ»úÓÃ500K²¨ÌØÂÊ£¬Ã¿1ms·¢ËÍ32×Ö½ÚµÄÊý¾Ý£¬ÉÏλ»úÏÔʾÆäÖÐ6Ìõ²¨ÐΣ¬OK£¡£¨ÓпÉÄܺ͵çÄÔÅäÖÃÓйأ©
Èý¡¢²¨ÐÎÏÔʾ
1£º¹²ÓÐ20Ìõ²¨ÐΣ¬¶ÔÓ¦20¸öÊý¾Ý´æ´¢Æ÷¡£
2£ºË«»÷²¨ÐλæÖÆÇøÓò£¬¿ÉÒÔ´ò¿ª²¨ÐÎÏÔʾ¿ª¹Ø¡£
3£º°´×¡CtrlÓÃÊó±ê×ó¼üµã»÷ijһÌõ²¨ÐΣ¬¿ÉÒÔÏÔʾÊý¾Ý±êÇ©£¬Ôٴεã»÷Òþ²Ø¡£
4£º°´×¡Êó±ê×ó¼ü£¬ÔÚ»æͼÇøÓò´ÓÒ»µãÏòÓÒÏ·½Í϶¯£¬È»ºóËÉ¿ª£¬¿ÉÒÔ·Å´óÏÔʾ¿òסµÄ²¨ÐÎÇøÓò£¬¿ÉÒÔ¶à´Î·Å´ó£»
5£º°´×¡Êó±ê×ó¼ü£¬ÔÚ»æͼÇøÓò´ÓÒ»µãÏò×óÉÏ·½Í϶¯£¬È»ºóËÉ¿ª£¬¿ÉÒÔ½«·Å´óºóµÄ²¨Ðλ¹Ô¡£
6£º°´×¡Êó±êÓÒ¼ü£¬ÔÚ»æͼÇøÓòÉÏÏÂ×óÓÒÍ϶¯£¬¿ÉÒÔÒƶ¯²¨ÐΡ£
7£ºÏÔʾ²¨ÐÎʱ°´F9¼ü£¬¿ÉÒÔ´ò¿ª²¨Ðθ߼¶ÉèÖá£
ËÄ¡¢DEBUG¹¦ÄÜ
1£ºÔÚµ÷ÊÔ¹ý³ÌÖпÉÒÔ½«Ä³Ð©±ê־λ¡¢¼Ä´æÆ÷¡¢±äÁ¿ÊµÊ±·¢»ØÉÏλ»ú£¬²¢ÔÚDEBUGÒ³ÃæÏÔʾ¡£
2£ºÍ¨Ñ¶¸ñʽΪ£º0x88 + 0xAD + len + num + DATA + SUM£¬¡¡lenΪnumÓëDATAµÄ×ܳ¤¶È£¬num±íʾҪ¸Ä±äÄĸöÏÔʾ״̬£¬ÀýÈçnum=0x01¼´ÊÇÒª¸Ä±ä
µÚÒ»¸öLED£¬num=0x07¼´ÊǸıäµÚÒ»¸öÊý×ÖÊä³öÏÔʾ¡£µ±Òª¸Ä±äLEDʱ£¬DATAÖ»ÐèÒ»×Ö½Ú£¬DATA=0x00±íʾ¹Ø±ÕLED£¬´óÓÚ0x00±íʾµãÁÁLED£»µ±Òª¸Ä±ä
Êý×ÖÊä³öʱ£¬DATAÐèÒªÁ½×Ö
½Ú£¬±íʾ Ò»¸öuint16Êý×Ö£¬¸ß×Ö½ÚÔÚÇ°¡£SUMΪ´Ó0x88¿ªÊ¼µ½SUMÇ°Ò»×ֽڵĺÍУÑ飬uint8¸ñʽ¡£ÀýÈ磺·¢ËÍ 0x88 + 0xAD + 0x02 + 0x01 + 0x01 +
0x39¡¡¡¡±íʾµãÁÁµÚÒ»¸öLED·¢ËÍ 0x88 + 0xAD + 0x03 + 0x07 + 0x00 + 0x05 + 0x44¡¡ ±íʾÔÚµÚÒ»¸öÊý×ÖÊä³öλÖÃÏÔʾ 5 ¡£
Îå¡¢¼üÊó¿ØÖÆ
1£º¿ØÖÆÊý¾Ý·¢Ë͸ñʽΪ£º0x88 + 0xA1 + 0X1C + THROT YAW ROLL PITCH AUX1 AUX2 AUX3 AUX4 AUX5 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 + SUM£¬Ò£¿ØÊý¾Ý¶¼Îªint16¸ñʽ£¬ÖÐÖµ1500£¬×îС×î´óֵΪ1000¡¢2000¡£
2£º·¢ËÍƵÂÊ 50Hz¡£
3£ºÊó±êÉÏÏ¿ØÖÆÓÍÃÅ£¬×óÓÒ¿ØÖÆYAW£¬¼üÅ̵ÄWASD¿ØÖÆROLL/PITCH£¬¼üÅÌ12345¿ØÖÆAUX12345¡£¹²9ͨµÀ¡£
¹ØÓÚÌÚÅ£ | ÁªÏµ·½Ê½ | ·¢Õ¹Àú³Ì | °æȨÉùÃ÷ | ÏÂÔØ°ïÖú(£¿) | ¹ã¸æÁªÏµ | ÍøÕ¾µØͼ | ÓÑÇéÁ´½Ó
Copyright 2005-2022 QQTN.com ¡¾ÌÚÅ£Íø¡¿ °æȨËùÓÐ ¶õICP±¸2022005668ºÅ-1 | ¶õ¹«Íø°²±¸ 42011102000260ºÅ
ÉùÃ÷£º±¾Õ¾·ÇÌÚѶQQ¹Ù·½ÍøÕ¾ ËùÓÐÈí¼þºÍÎÄÕÂÀ´×Ô»¥ÁªÍø ÈçÓÐÒìÒé ÇëÓë±¾Õ¾ÁªÏµ ±¾Õ¾Îª·ÇÓ®ÀûÐÔÍøÕ¾ ²»½ÓÊÜÈκÎÔÞÖúºÍ¹ã¸æ