WiTilt in Max/MSP

May 25, 2007 at 2:04am

WiTilt in Max/MSP

Hello list,
Im trying to extract data from WiTilt (SparkFun) into an iMac and MaxMSP. I use a 9V battery with a 5V voltage divider for power supply. I use the following patch to get the data from the accelerometer, but unfortunately after 10-15 minutes MaxMSP starts to become unstable – freezes, stops and starts again, seems to consume too much CPU although nothing else is open, etc.
If anyone has any idea or a similar problem and if it is not too much trouble give me any idea on how to fix this.
Thanks,
St.Dee

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 154 387 100 196617 Z;
#P comment 117 387 100 196617 Y;
#P toggle 82 185 15 0;
#P newex 82 203 29 196617 gate;
#P toggle 184 185 15 0;
#P newex 184 203 29 196617 gate;
#P comment 287 78 100 196617 < - end transmit;
#P number 152 367 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 116 367 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 80 367 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 80 342 67 196617 unpack 0 0 0;
#P newex 337 268 20 196617 t b;
#P newex 296 211 40 196617 t clear;
#P newex 337 242 67 196617 match 10 13;
#P newex 337 179 48 196617 bucket 2;
#P message 265 77 20 196617 32;
#P newex 32 315 202 196617 regexp .*X=(\\d+).*Y=(\\d+).*Z=(\\d+);
#P newex 142 279 40 196617 itoa;
#P newex 142 250 67 196617 zl group 240;
#P message 265 51 20 196617 49;
#P toggle 77 48 15 0;
#P newex 77 71 57 196617 qmetro 20;
#P newex 82 226 54 196617 print data;
#P newex 184 226 63 196617 print status;
#P newex 142 116 71 196617 serial e 9600;
#P comment 288 51 100 196617 < - start transmit;
#P comment 78 387 100 196617 X;
#P window linecount 4;
#P comment 269 363 169 196617 This patch simply reads the default
data out of the WiTilt. In the other modes of the device , it could
serve as a resonable model for extension.;
#P connect 10 0 11 0;
#P connect 7 0 6 0;
#P connect 11 1 17 0;
#P connect 17 0 18 0;
#P connect 25 0 24 0;
#P connect 24 0 5 0;
#P fasten 3 0 24 1 147 192 106 192;
#P connect 17 1 19 0;
#P connect 6 0 3 0;
#P fasten 12 0 3 0 270 98 147 98;
#P fasten 8 0 3 0 270 71 147 71;
#P connect 3 0 9 0;
#P fasten 16 0 9 0 342 294 281 294 281 173 147 173;
#P connect 9 0 10 0;
#P connect 17 2 20 0;
#P connect 23 0 22 0;
#P connect 22 0 4 0;
#P connect 3 1 22 1;
#P connect 13 0 15 0;
#P fasten 3 0 13 0 147 137 342 137;
#P connect 13 0 14 0;
#P connect 13 1 14 0;
#P connect 15 0 14 0;
#P connect 14 0 16 0;
#P window clipboard copycount 28;

#32093

You must be logged in to reply to this topic.