Wii to track wheel motion

May 2, 2011 at 10:41am

Wii to track wheel motion

Hi All.
I’m a little bit lost: I have to use, for technicals reasons a wii. Thanks to the wii, the idea is to scratch the video‚Ķ
I don’t know how to treat datas from accelerometers (because it goes down and up according to the position on the wheel.) I can’t use ir datas beacause the wii wiil be include in the wood wheel.

Do you have any idea ? THANK YOU.
FRATZEN

#56788
May 2, 2011 at 11:41am

You will have to show us your patch, and also be a little bit more specific about how your wii data is getting into Max and what exactly you wish to do with this data………

Brendan

#203528
May 2, 2011 at 11:58am

max v2;
#N vpatcher 0 44 1680 1046;
#P origin 42 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 104 462 115 196617 Receive from osculator;
#P user led 262 265 17 17 2 150;
#P window setfont “Sans Serif” 24.;
#P window linecount 2;
#P comment 305 864 294 196632 how can I analyse this to learn the wheel direction;
#P objectname [23];
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 1506 112 48 196617 loadbang;
#P newex 315 828 76 196617 print compare.;
#P objectname
[8];
#P newex 325 766 29 196617 gate;
#P objectname
[21];
#P newex 339 801 27 196617 f;
#P objectname
[22];
#P newex 443 728 51 196617 >= 0.003;
#P objectname
[24];
#P newex 439 694 37 196617 abs 0.;
#P objectname
[25];
#P window setfont “Sans Serif” 24.;
#P comment 611 715 238 196632 < #P objectname
[26];
#P window setfont “Sans Serif” 9.;
#P newex 429 661 101 196617 – 0.;
#P objectname
[27];
#P newex 414 631 107 196617 t f f;
#P window setfont “Sans Serif” 12.;
#P comment 313 638 61 196620 N+1 >N ?;
#P window setfont “Sans Serif” 36.;
#P flonum 445 787 157 36 0 0 8228 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 9.;
#P newex 339 724 54 196617 t f f;
#P flonum 489 705 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname
[28];
#P user panel 293 623 314 313;
#X brgb 255 255 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user ubutton 1201 46 104 43 0 2;
#P window setfont “Arial Bold” 14.;
#P comment 1211 57 90 -1195376626 Connection;
#P user panel 1200 44 106 45;
#X brgb 255 235 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 34;
#X shadow 0;
#X done;
#P user jsui 275 210 48 48 0 0 0 ej.led.js;
#J statemessage redrawoff;
#J statemessage mode 1;
#J statemessage circlesize 0.83;
#J statemessage blinktime 150;
#J statemessage brgb 255 255 255;
#J statemessage brgb2 255 255 255;
#J statemessage frgb 0 0 0;
#J statemessage frgb2 0 255 222;
#J statemessage redrawon;
#P objectname ej.lui-2164429[6];
#P window setfont “Sans Serif” 9.;
#N vpatcher 20 74 620 474;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 265 84 41 196617 * 100.;
#P newex 178 127 27 196617 t b i;
#P objectname
[3];
#P newex 164 107 90 196617 scale 1. 0. 0. 255;
#P objectname
[2];
#P newex 110 166 102 196617 sprintf frgb %i %i 0;
#P objectname
[1];
#P flonum 53 74 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 50 50 71 196617 route battery;
#P newex 54 103 87 196617 scale 1. 0. 255 0;
#P window linecount 4;
#P message 263 105 137 196617 script send panel_pourcentage brgb 191 191 191 , script send pourcentage set $1%;
#P inlet 50 30 15 0;
#P outlet 50 72 15 0;
#P outlet 263 161 15 0;
#P outlet 53 94 15 0;
#P outlet 110 188 15 0;
#P connect 4 0 7 0;
#P connect 7 0 3 0;
#P connect 7 0 8 0;
#P connect 8 0 1 0;
#P connect 8 0 6 0;
#P connect 11 0 9 0;
#P connect 10 0 9 0;
#P connect 9 0 0 0;
#P connect 8 0 10 0;
#P connect 6 0 11 0;
#P connect 11 1 9 1;
#P connect 12 0 5 0;
#P connect 5 0 2 0;
#P connect 7 0 12 0;
#P pop;
#P hidden newobj 1439 387 77 196617 p visu_battery;
#N thispatcher;
#Q end;
#P hidden newobj 1506 413 61 196617 thispatcher;
#P window setfont “Sans Serif” 20.;
#P comment 1115 482 103 196628 100.00%;
#P objectname pourcentage;
#P window setfont “Sans Serif” 12.;
#P comment 1135 449 61 196620 Battery:;
#P user panel 1124 446 83 24;
#X brgb 255 171 25;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont “Sans Serif” 9.;
#P hidden newex 1433 537 114 196617 sprintf %i Battery: %f;
#P hidden newex 1530 438 48 196617 loadbang;
#N coll ;
#P hidden newobj 1433 565 53 196617 coll;
#P objectname
[4];
#P hidden newex 1500 195 30 196617 t b b;
#P user multiSlider 1213 404 53 116 0. 1. 1 2937 14 0 0 2 0 0 0;
#M frgb 0 255 0;
#M brgb 198 198 198;
#M rgb2 127 127 127;
#M rgb3 140 140 140;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P hidden message 1364 116 135 196617 /osculator/discovery start;
#P hidden message 1364 149 131 196617 /osculator/discovery stop;
#P hidden message 1502 227 133 196617 /osculator/wii/1 battery?;
#P hidden newex 1364 219 115 196617 udpsend localhost 8000;
#P hidden newex 1439 358 140 196617 OSC-route /osculator/wii/1;
#P message 614 133 167 196617 0.636592 0.557491 0.066667;
#P window linecount 2;
#P newex 614 82 126 196617 OSC-route /xys/1 /xys/2 /xys/3 /xys/4;
#P window linecount 1;
#P newex 614 114 62 196617 prepend set;
#P newex 644 231 51 196617 zl slice 0;
#P newex 520 231 120 196617 if $i1 == 4 then 1 else 0;
#P newex 520 211 34 196617 zl len;
#P comment 528 249 51 196617 ir1 data;
#P comment 454 252 51 196617 xyz data;
#P comment 402 252 47 196617 pry data;
#P comment 288 268 28 196617 data;
#P comment 135 184 23 196617 ir1;
#P comment 112 184 23 196617 xyz;
#P comment 91 184 22 196617 pry;
#P comment 73 184 18 196617 all;
#P comment 54 184 18 196617 off;
#P comment 130 194 13 196617 |;
#P comment 114 194 13 196617 |;
#P comment 97 194 13 196617 |;
#P comment 80 194 13 196617 |;
#P comment 64 194 13 196617 |;
#P comment 48 238 122 196617 print data to Max window;
#P number 64 223 24 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user multiSlider 64 206 76 17 0. 4. 1 2664 47 0 3 6 0 0 0;
#M frgb 255 0 0;
#M brgb 149 149 149;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 979 423 76 144 0. 1. 1 2937 14 0 0 2 0 0 0;
#M frgb 75 149 0;
#M brgb 198 198 198;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 903 423 76 144 0. 1. 1 2937 12 0 0 2 0 0 0;
#M frgb 255 165 9;
#M brgb 198 198 198;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 828 423 76 144 0. 1. 1 2937 13 0 0 2 0 0 0;
#M frgb 198 125 0;
#M brgb 198 198 198;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P comment 603 169 129 196617 /device/address;
#P newex 403 168 200 196617 OSC-route /wii/1 /wii/2 /wii/3 /wii/4;
#P window setfont “Sans Serif” 12.;
#P comment 855 120 280 196620 position: {pitch , roll , yaw & scalar accel data};
#P user multiSlider 1072 145 76 144 0. 1. 1 2937 14 0 0 2 0 0 0;
#M frgb 255 59 252;
#M brgb 198 198 198;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 996 145 76 144 0. 1. 1 2937 12 0 0 2 0 0 0;
#M frgb 141 255 229;
#M brgb 198 198 198;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 920 145 76 144 0. 1. 1 2937 12 0 0 2 0 0 0;
#M frgb 241 255 75;
#M brgb 198 198 198;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 845 145 76 144 0. 1. 1 2937 13 0 0 2 0 0 0;
#M frgb 247 70 1;
#M brgb 198 198 198;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 510 87 73 196617 < -- select receiving port;
#P window linecount 1;
#P hidden newex 348 271 66 196617 switch 4;
#P window setfont “Sans Serif” 12.;
#P comment 858 400 171 196620 acceleration: {x , y & z axis};
#P window setfont “Sans Serif” 9.;
#P newex 363 89 67 196617 prepend port;
#P window setfont “Sans Serif” 18.;
#P user ubumenu 433 86 75 196626 0 1 1 0;
#X setrgb 31 31 31 75 255 149 234 234 234 4 4 4 141 141 141 112 112 112;
#X add 9000;
#X add 9001;
#X add 9002;
#X add 9003;
#X add 9004;
#X add 9005;
#X add 9006;
#X add 9007;
#X add 9008;
#X add 9009;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P window setfont “Sans Serif” 9.;
#P hidden newex 348 292 54 196617 print data;
#P message 990 567 58 196617 0.404818;
#P hidden newex 972 377 62 196617 prepend set;
#P message 912 567 58 196617 0.473756;
#P hidden newex 909 377 62 196617 prepend set;
#P message 838 567 58 196617 0.496223;
#P hidden newex 846 377 62 196617 prepend set;
#P hidden newex 874 346 76 196617 unpack 0. 0. 0.;
#P hidden newex 873 325 35 196617 r xyz;
#P message 1082 289 58 196617 0.197687;
#P newex 1060 97 62 196617 prepend set;
#P message 1006 289 58 196617 0.455444;
#P newex 997 97 62 196617 prepend set;
#P message 930 289 58 196617 0.487309;
#P newex 934 97 62 196617 prepend set;
#P message 853 289 58 196617 0.585641;
#P newex 871 97 62 196617 prepend set;
#P newex 917 68 88 196617 unpack 0. 0. 0. 0.;
#P newex 1011 27 34 196617 r pry;
#P newex 452 235 35 196617 s xyz;
#P window linecount 2;
#P hidden newex 45 265 167 196617 OSC-route /Up /Down /Left /Right /A /B /Minus /Home /Plus /1 /2;
#P window linecount 1;
#P comment 657 190 78 196617 /function;
#P newex 403 235 34 196617 s pry;
#P newex 403 212 108 196617 OSC-route /pry /xyz;
#P newex 403 189 149 196617 OSC-route /accel /button /ir/;
#P newex 520 263 211 196617 unpack 0. 0. 0.;
#P newex 339 139 90 196617 OpenSoundControl;
#P newex 363 117 122 196617 udpreceive 9000 CNMAT;
#P user panel 847 397 196 24;
#X brgb 255 171 25;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 784 392 324 210;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 845 119 297 21;
#X brgb 255 171 25;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 834 113 337 211;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 51 182 113 25;
#X brgb 255 171 25;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 45 178 153 79;
#X brgb 214 215 214;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 280 264 39 18;
#X brgb 255 171 25;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 362 157 42 196617 all data;
#P hidden newex 1500 166 75 196617 qmetro 60000;
#P hidden toggle 1500 143 15 0;
#N counter;
#X flags 0 0;
#P hidden newobj 1473 468 66 196617 counter;
#P hidden button 1450 435 15 0;
#P hidden message 1508 447 14 196617 1;
#P hidden number 1464 501 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden button 1561 111 15 0;
#P user panel 1113 393 169 136;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P objectname panel_pourcentage;
#P hidden newex 1213 186 20 196617 t b;
#P newex 1006 48 44 196617 qlim 33;
#P number 1050 35 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden fasten 22 1 26 0 454 208 50 208;
#P hidden connect 62 0 63 0;
#P hidden fasten 20 0 119 0 344 165 267 165;
#P connect 20 0 100 0;
#P connect 115 0 116 0;
#P connect 113 0 115 0;
#P connect 19 0 20 0;
#P connect 110 0 106 0;
#P connect 106 0 115 1;
#P hidden fasten 62 0 50 0 69 207 353 207;
#P hidden connect 50 0 46 0;
#P connect 115 0 114 1;
#P hidden fasten 20 1 50 1 384 165 367 165;
#P hidden fasten 47 1 48 0 470 70 368 70;
#P connect 48 0 19 0;
#P hidden fasten 23 0 50 2 408 257 381 257;
#P hidden fasten 23 1 50 3 457 258 395 258;
#P connect 20 1 57 0;
#P connect 57 0 22 0;
#P connect 22 0 23 0;
#P connect 23 0 24 0;
#P hidden fasten 81 1 50 4 690 259 409 259;
#P fasten 29 2 109 0 974 325 419 325;
#P connect 109 1 110 0;
#P connect 110 0 112 0;
#P connect 112 0 113 0;
#P connect 115 0 107 0;
#P connect 23 1 27 0;
#P connect 105 0 113 1;
#P fasten 22 2 79 0 500 208 525 208;
#P connect 79 0 80 0;
#P fasten 81 1 21 0 690 259 525 259;
#P connect 109 0 110 1;
#P hidden fasten 22 2 83 0 500 208 619 208;
#P connect 83 0 82 0;
#P connect 82 0 84 0;
#P fasten 22 2 81 0 500 208 649 208;
#P fasten 80 0 81 1 525 259 701 259 701 224 690 224;
#P hidden connect 39 0 59 0;
#P hidden connect 40 0 41 0;
#P hidden connect 29 0 52 0;
#P hidden connect 39 0 40 0;
#P hidden connect 30 0 31 0;
#P hidden connect 29 0 30 0;
#P hidden connect 38 0 39 0;
#P hidden connect 39 1 60 0;
#P hidden connect 39 1 42 0;
#P hidden connect 42 0 43 0;
#P connect 1 0 29 0;
#P hidden connect 29 1 53 0;
#P hidden connect 32 0 33 0;
#P hidden connect 29 1 32 0;
#P hidden connect 39 2 44 0;
#P hidden connect 39 2 61 0;
#P hidden connect 44 0 45 0;
#P hidden connect 29 2 54 0;
#P hidden connect 29 2 34 0;
#P connect 28 0 1 0;
#P hidden connect 34 0 35 0;
#P connect 0 0 1 1;
#P hidden connect 29 3 36 0;
#P hidden connect 29 3 55 0;
#P hidden connect 36 0 37 0;
#P hidden connect 103 0 2 0;
#P hidden fasten 99 2 90 0 1488 612 1218 612;
#P hidden fasten 99 1 90 0 1466 612 1218 612;
#P hidden connect 2 0 89 0;
#P hidden fasten 88 0 86 0 1369 191 1369 191;
#P hidden connect 89 0 86 0;
#P hidden connect 87 0 86 0;
#P hidden fasten 8 0 94 0 1478 498 1438 498;
#P hidden fasten 94 0 92 0 1438 559 1438 559;
#P hidden fasten 20 1 85 0 384 290 1444 290;
#P hidden fasten 85 0 99 0 1444 381 1444 381;
#P hidden fasten 8 0 5 0 1478 493 1469 493;
#P hidden fasten 91 0 8 0 1505 340 1478 340;
#P hidden fasten 7 0 8 0 1455 459 1478 459;
#P hidden fasten 117 0 9 0 1511 136 1505 136;
#P hidden fasten 9 0 10 0 1505 162 1505 162;
#P hidden fasten 4 0 10 0 1566 136 1505 136;
#P hidden connect 10 0 91 0;
#P hidden fasten 6 0 8 2 1513 465 1506 465;
#P hidden connect 91 1 87 0;
#P hidden connect 99 3 98 0;
#P hidden connect 93 0 6 0;
#P hidden fasten 99 0 94 1 1444 536 1542 536;
#P pop;

thank
FRATZEN

#203529
May 5, 2011 at 7:52am

Nobody ?
FRATZEN

#203530

You must be logged in to reply to this topic.