-
Notifications
You must be signed in to change notification settings - Fork 0
/
mpu6050rpi-help.pd
69 lines (69 loc) · 2.72 KB
/
mpu6050rpi-help.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#N canvas 108 110 930 636 12;
#X obj 399 253 bng 15 250 50 0 empty empty calculate_offsets 17 7 0
10 -262144 -1 -1;
#X msg 525 360 12200.6 12401.2 -11263.7 -285.711 -159.256 130.335;
#X obj 525 249 loadbang;
#X msg 569 333 set \$1 \$2 \$3 \$4 \$5 \$6;
#X obj 537 309 t b l;
#X msg 287 168 start;
#X msg 245 168 stop;
#X text 416 10 First thing to do after installing a new sensor is to
calculate the offsets. To do so \, bang the second inlet. This will
take a couple of minutes \, and it is important that the sensor lay
still on a flat surface during this procedure. When this is done the
offsets will be output on the third outlet. It is recommended that
you set these in a message as done here \, and loadbang them into the
third inlet. That way \, you won't have to calculate the offsets for
the particular sensor again., f 39;
#X text 20 329 1) Accelerometer range (0 \, 1 \, 2 or 3);
#X text 20 348 2) Gyroscope range (0 \, 1 \, 2 \, or 3);
#X text 21 309 Creation arguments:;
#X obj 471 411 s \$0-setoffset;
#X obj 537 286 r \$0-setoffset;
#X obj 327 584 nbx 5 14 -1e+37 1e+37 0 0 empty empty x 0 -8 0 10 -262144
-1 -1 0.00970135 256;
#X obj 407 548 nbx 10 14 -5000 5000 0 0 empty empty z 0 -8 0 10 -262144
-1 -1 -0.394258 256;
#X obj 367 567 nbx 5 14 -1e+37 1e+37 0 0 empty empty y 0 -8 0 10 -262144
-1 -1 -0.0179549 256;
#X obj 327 514 unpack f f f;
#X obj 435 518 nbx 5 14 -1e+37 1e+37 0 0 empty empty x 0 -8 0 10 -262144
-1 -1 -0 256;
#X obj 515 478 nbx 10 14 -5000 5000 0 0 empty empty z 0 -8 0 10 -262144
-1 -1 1.003 256;
#X obj 475 497 nbx 5 14 -1e+37 1e+37 0 0 empty empty y 0 -8 0 10 -262144
-1 -1 0.001 256;
#X obj 435 444 unpack f f f;
#X text 123 51 The mpu6050rpi external uses its own thread to calculate
the angles continuosly. To start or stop the thread \, send messages
"start" or "stop" to the first inlet., f 28;
#X text 521 526 The first outlet outputs the filtered x \, y and z
angles. These combines the accelerometer and gyroscope using a complimentary
filter., f 31;
#X text 622 447 The second outlet outputs offset compensated accelerometer
values in Gs., f 27;
#X obj 327 387 mpu6050rpi 0 0 2 0.95;
#X text 20 385 4) Filter coefficient. This basically means how much
to trust the accelerometer vs gyro in the filtering algorithm., f
35;
#X text 20 367 3) Update frequency;
#X text 21 459 If you omit the creation arguments they will by default
be 0 0 2 0.95, f 35;
#X connect 0 0 24 1;
#X connect 1 0 24 2;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X connect 4 1 3 0;
#X connect 5 0 24 0;
#X connect 6 0 24 0;
#X connect 12 0 4 0;
#X connect 16 0 13 0;
#X connect 16 1 15 0;
#X connect 16 2 14 0;
#X connect 20 0 17 0;
#X connect 20 1 19 0;
#X connect 20 2 18 0;
#X connect 24 0 16 0;
#X connect 24 1 20 0;
#X connect 24 2 11 0;