example1.pd 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #N canvas 72 251 862 565 10;
  2. #X declare -stdpath Fraise;
  3. #X obj 19 141 fruit/fruit 1 fruit1 10 example1;
  4. #X obj 235 331 fruit/send2 fruit1;
  5. #X obj 21 38 pied/pied 0 41424;
  6. #X floatatom 536 199 8 0 0 0 - - -, f 8;
  7. #X obj 539 139 hsl 128 15 3500 18000 0 0 empty empty empty -2 -8 0
  8. 10 -262144 -1 -1 0 1;
  9. #X msg 536 222 c 20 c 1 i \$1;
  10. #X text 206 40 Output RC servo waveforms to K11 (channel 0) and K12
  11. (channel 1).;
  12. #X text 209 20 RC servo example for Versa1.0;
  13. #X text 543 180 position of servo channel 1 \, in 1/8 us steps.;
  14. #X floatatom 235 201 8 0 0 0 - - -, f 8;
  15. #X obj 238 141 hsl 128 15 3500 18000 0 0 empty empty empty -2 -8 0
  16. 10 -262144 -1 -1 0 1;
  17. #X text 239 183 position of servo channel 1 \, in 1/8 us steps.;
  18. #X text 307 106 example range 4000 to 16000 = 0.5 ms to 2 ms (adjust
  19. the ranges for your servos and mechanical assembly);
  20. #X msg 235 224 c 20 c 0 i \$1;
  21. #X obj 511 343 fruit/receive fruit1;
  22. #X msg 514 295 c 20 c 254 c 1;
  23. #X obj 511 363 route 20;
  24. #X obj 511 384 route 0 1;
  25. #X msg 514 272 c 20 c 254 c 0;
  26. #X floatatom 511 418 8 0 0 3 pos_0 - -, f 8;
  27. #X floatatom 571 418 8 0 0 3 pos_1 - -, f 8;
  28. #X text 205 65 Here main servo channel is set to 20 in firmware (see
  29. example1/main.c).;
  30. #X text 607 272 get current pos of servo 0;
  31. #X text 607 295 get current pos of servo 1;
  32. #X text 566 364 Receive requested channel positions.;
  33. #X obj 22 6 declare -stdpath Fraise;
  34. #X connect 3 0 5 0;
  35. #X connect 4 0 3 0;
  36. #X connect 5 0 1 0;
  37. #X connect 9 0 13 0;
  38. #X connect 10 0 9 0;
  39. #X connect 13 0 1 0;
  40. #X connect 14 0 16 0;
  41. #X connect 15 0 1 0;
  42. #X connect 16 0 17 0;
  43. #X connect 17 0 19 0;
  44. #X connect 17 1 20 0;
  45. #X connect 18 0 1 0;