Problem with comparison.
/Modules/CommSerial/I2C232V01A/SW/I2C232V01A_test.py |
---|
0,0 → 1,59 |
#!/usr/bin/python |
# Python test script for MLAB I2C232V01A translator module with HMC5888L Magnetometer sensor as I2C device. |
#uncomment for debbug purposes |
import logging |
logging.basicConfig(level=logging.DEBUG) |
import time |
import datetime |
import sys |
from pymlab import config |
#### Script Arguments ############################################### |
if len(sys.argv) != 2: |
sys.stderr.write("Invalid number of arguments.\n") |
sys.stderr.write("Usage: %s #I2CPORT\n" % (sys.argv[0], )) |
sys.exit(1) |
port = sys.argv[1] |
#### Sensor Configuration ########################################### |
cfg = config.Config( |
i2c = { |
"port": port, |
"device": 'serial', # here you can explicitly set I2C driver with 'hid', 'smbus', 'serial' |
}, |
bus = [ |
{ |
"name": "mag", |
"type": "mag01", |
"gauss": 0.88, |
}, |
], |
) |
cfg.initialize() |
mag = cfg.get_device("mag") |
sys.stdout.write(" MLAB magnetometer sensor module example \r\n") |
time.sleep(0.5) |
#### Data Logging ################################################### |
sys.stdout.write("Magnetometer data acquisition system started \n") |
try: |
while True: |
mag.route() |
(x, y, z) = mag.axes() |
#sys.stdout.write("\rHeading: " + magnetometer.degrees(magnetometer.heading()) + " X: " + str(x) + " Y: " + str(y) + " Z: " + str(z) + " " ) |
sys.stdout.write(" X: " + str(x) + " Y: " + str(y) + " Z: " + str(z) + " " + "\r\n") |
sys.stdout.flush() |
time.sleep(0.5) |
except KeyboardInterrupt: |
sys.exit(0) |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/Modules/CommSerial/I2C232V01A/DOC/SRC/img/I2C232V01A_QRcode.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/CommSerial/I2C232V01A/DOC/SRC/img/I2C232V01A_Top_Big.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/CommSerial/I2C232V01A/DOC/SRC/I2C232V01A.doc |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/CommSerial/I2C232V01A/DOC/I2C232V01A.cs.pdf |
---|
0,0 → 1,4521 |
%PDF-1.5 |
%µµµµ |
1 0 obj |
<</Type/Catalog/Pages 2 0 R/Lang(cs-CZ) /StructTreeRoot 51 0 R/MarkInfo<</Marked true>>>> |
endobj |
2 0 obj |
<</Type/Pages/Count 3/Kids[ 3 0 R 41 0 R 46 0 R] >> |
endobj |
3 0 obj |
<</Type/Page/Parent 2 0 R/Resources<</Font<</F1 5 0 R/F2 7 0 R/F3 12 0 R/F4 14 0 R/F5 19 0 R/F6 22 0 R/F7 24 0 R/F8 29 0 R/F9 31 0 R/F10 36 0 R>>/XObject<</Image21 21 0 R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 595.32 841.92] /Contents 4 0 R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 0>> |
endobj |
4 0 obj |
<</Filter/FlateDecode/Length 4193>> |
stream |
+n9Ñy¯zë2h¨õY]¬cÆZ¯Øxõb¥½lÅv.ÃCB^å_t}tÙÞÃà±ÁÇ>}IN¢Q6+YUÒFCeïtçÁ #JôÞjÚ9èÚ=^V:StIf¦û¶húµ;1°ÐÃtª×®Ù4ÀG3N~?4`ÙºÁâÚuô½Å8Ó{¦H;Ó«ÐÝ sè%2k4¨ (ÕK V#dorçû&ÕH°@ iH#Ð6VÖ´êCî×Q÷Å9hX8`ë úã2,u~ EËOØnïP&ñãD |
+¬À¡æ=w¾Aç!|VÓ*ô±0 ÙÃ0Ê÷F奢¡A82Ãn#Cf3ÅV%fn(aW(ìp.(RØ!eMv¨49ì"äà¨ã K+,AécööIC!Á±¢Ut5ò9è¢XJAê.û®P9èrCÉJt¦lÔjÞ|5Fzg2Ú°½Hòy$ÁÎ º$Ð |
+&00V´^JÃaÐQë^ÏÐÅö¦·5i±jÌnsÙ°jö¾Mnô½7lIø58²¤¹ ³I7@b åTNV¤Ð9¾½*8nÀ í| |Ö¼$cZX6L¼2éÂo'Ïn¨|f@B© |
+$ѽÍ(9g"£q¯¢<apB |
+:Ð@æ÷´ P¸uL3 °%Ú¢cÖgd§N½«@"m^Cr²L¥¾àhö(lËÀy^ÚÞcdá023eÓ_<w |
+Ev÷io>ì/¯û&ÆjqÄù©oKõ]ø[ÜhÔÀÀ¢PöO_ê«c_ºåjzqaÆç¡>Æ0í cZu;9ubX~°õNV¥Ê¦Mÿâ¢÷t¦û½½dr#ñÓ~û0ÇíS1í7änóÞ |
+¿¼xqÙæQIÍ\b*Üd6Ýe¥×çBh-¤¼Â!lÿüîá§Âm óL |
+Ö?CÛË"Û=̬^ƤºÏºÁà¥1fVÍ1n>²}d6Zv[RÌ-:x²NÐ×LÔÝïK(!+¾d¹R6Ô3¦HR¤ â+k6ôR)íãy´ÈyåÛõJMF«¹äÐ[µbRwÌÈèÝÉðlb·z¼ô9¡8 ¢Ø¢¥åP3¯«õL©ó |
+OZËJ}AªÏºh¿Ñ(2YWê9_oÛetµxä °_µà¨ÿþóæ@þÝÚ¬è9úw|^z+wTï7óíÝ ôÌY)CaGLb÷Z<8LÓD6£N¼ÔJÿkóâîúç[%»ËûîÕÌdvÿ7&*k|\ µ>F9·üü1søÅ9¯#,ÏgÔ±±)MÒoöò |
+:|ÑKQãñÄØ¢ûk¶nó3ÊÀÑ=4Ú¼æüó*ïãÓZr²STl¸+cÕfõVÇ¿´?l÷)%ZH)8ëZ©ÕÝíîã_{תf§ð&Ã|¨ªðòÒ¯ A2ð«ÃX#GW_>¤qfa¯0L¾Áâ xÇJ}·ruýPJʸº[ëÕ-»õ[}~oðyb¥ ³s-wôÁ«Á$ |
+ù¶0Ú§ |
+G¦[:%ÎÓÁ£\æ+²YÄ>¬ö¤T6ôUÖXí#ð:ö^+5Åë¤çÃáz¬æ÷X,Ó_SÈçk¥W/ÁÈh÷pÑ ?bFôA¬´ëb]ÑòÁPw¤¦E:$»9GHÇtcáÈ_FißɳL')0&É7#¦´/mÔTáiInfM¼h¶ø"`Q÷2^åîe¸ÊóïC+|Ù×Ç mÑ |
+Ç©Ï+¥óKÊP/Úü$A§®3Û\'Z,Ðez\Çï&ªAÙ`1ÈM1(+úp(ÿ¨k s>Cöx/4µù×^=¦ ¯ç×tÞÛ7? ·AÏãÛ±6*à}é¯þÆ8 |
+Ä5<&rä³Ýƨä |
+8×òðÚéû®ô/C]±ëB Ró0ÔÅêpÙ¸uÑÓÐP('Å=¥Ñ#½Ã¹cǹq.ëÌi1¹¢çanª§^ÂÏ·&sBDÿR´"SdÝüRU²xðYBf=Ïw}øóç£J³_¦K2j8/æ¥<jñ£ÙL=jÎ;/åQ½#6hâù |
+¦êîîQÆ¿E®?LÜ_~h9)?*5ËÉ&êÙ]$¦·út`¦ù=¿0é ¿|°°ð>qV÷ þ˼©õÞN\ô%R´2»/±0>¶Ì9öæ|wý¬ýÂ#ldþâ+}Qù!}uòfÁrgâT«¶ ôW8ûÜcÿöºyOÝe½ÇîJ£åswYØâÁ;[~R¦n×G1û0v Ì»/eøi½û¤+Ù"añNv03Ët#[ Y¸¬8®¹3C1y7;Ä@Ñû%7|µ |
+endstream |
+endobj |
+5 0 obj |
+<</Type/Font/Subtype/TrueType/Name/F1/BaseFont/Times#20New#20Roman/Encoding/WinAnsiEncoding/FontDescriptor 6 0 R/FirstChar 32/LastChar 122/Widths 291 0 R>> |
+endobj |
+6 0 obj |
+<</Type/FontDescriptor/FontName/Times#20New#20Roman/Flags 32/ItalicAngle 0/Ascent 891/Descent -216/CapHeight 693/AvgWidth 401/MaxWidth 2614/FontWeight 400/XHeight 250/Leading 42/StemV 40/FontBBox[ -568 -216 2046 693] >> |
+endobj |
+7 0 obj |
+<</Type/Font/Subtype/Type0/BaseFont/Arial/Encoding/Identity-H/DescendantFonts 8 0 R/ToUnicode 292 0 R>> |
+endobj |
+8 0 obj |
+[ 9 0 R] |
+endobj |
+9 0 obj |
+<</BaseFont/Arial/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 10 0 R/FontDescriptor 11 0 R/W 294 0 R>> |
+endobj |
+10 0 obj |
+<</Ordering(Identity) /Registry(Adobe) /Supplement 0>> |
+endobj |
+11 0 obj |
+<</Type/FontDescriptor/FontName/Arial/Flags 32/ItalicAngle 0/Ascent 905/Descent -210/CapHeight 728/AvgWidth 441/MaxWidth 2665/FontWeight 400/XHeight 250/Leading 33/StemV 44/FontBBox[ -665 -210 2000 728] /FontFile2 293 0 R>> |
+endobj |
+12 0 obj |
+<</Type/Font/Subtype/TrueType/Name/F3/BaseFont/Arial/Encoding/WinAnsiEncoding/FontDescriptor 13 0 R/FirstChar 32/LastChar 117/Widths 295 0 R>> |
+endobj |
+13 0 obj |
+<</Type/FontDescriptor/FontName/Arial/Flags 32/ItalicAngle 0/Ascent 905/Descent -210/CapHeight 728/AvgWidth 441/MaxWidth 2665/FontWeight 400/XHeight 250/Leading 33/StemV 44/FontBBox[ -665 -210 2000 728] >> |
+endobj |
+14 0 obj |
+<</Type/Font/Subtype/Type0/BaseFont/Arial,Italic/Encoding/Identity-H/DescendantFonts 15 0 R/ToUnicode 296 0 R>> |
+endobj |
+15 0 obj |
+[ 16 0 R] |
+endobj |
+16 0 obj |
+<</BaseFont/Arial,Italic/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 17 0 R/FontDescriptor 18 0 R/W 298 0 R>> |
+endobj |
+17 0 obj |
+<</Ordering(Identity) /Registry(Adobe) /Supplement 0>> |
+endobj |
+18 0 obj |
+<</Type/FontDescriptor/FontName/Arial,Italic/Flags 32/ItalicAngle -12/Ascent 905/Descent -208/CapHeight 728/AvgWidth 441/MaxWidth 1876/FontWeight 400/XHeight 250/Leading 33/StemV 44/FontBBox[ -517 -208 1359 728] /FontFile2 297 0 R>> |
+endobj |
+19 0 obj |
+<</Type/Font/Subtype/TrueType/Name/F5/BaseFont/Arial,Italic/Encoding/WinAnsiEncoding/FontDescriptor 20 0 R/FirstChar 32/LastChar 116/Widths 299 0 R>> |
+endobj |
+20 0 obj |
+<</Type/FontDescriptor/FontName/Arial,Italic/Flags 32/ItalicAngle -12/Ascent 905/Descent -208/CapHeight 728/AvgWidth 441/MaxWidth 1876/FontWeight 400/XHeight 250/Leading 33/StemV 44/FontBBox[ -517 -208 1359 728] >> |
+endobj |
+21 0 obj |
+<</Type/XObject/Subtype/Image/Width 474/Height 365/ColorSpace/DeviceRGB/BitsPerComponent 8/Filter/DCTDecode/Interpolate true/Length 33543>> |
+stream |
+ÿØÿà JFIF H H ÿÛ C |
+2!!22222222222222222222222222222222222222222222222222ÿÀ mÚ" |