Changes between Version 15 and Version 16 of 32u4bb
- Timestamp:
- Nov 26, 2011 2:26:42 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
32u4bb
v15 v16 82 82 * Mac OSXなら、「`/tmp`」のどっかですかねえ。 83 83 84 == もうひとつお試し == 85 86 [attachment:MouseText.hex MouseTest.hex] 87 88 {{{ 89 #!C 90 int phase = 0; 91 int full = 100; 92 int radius = 100; 93 int delay_msec = 2; 94 95 int x = radius; 96 int y = 0; 97 98 void setup() { 99 } 100 101 void loop() { 102 ++phase; 103 phase %= full; 104 105 double th = 3.141592 * 2 * phase / full; 106 int xx = radius * cos(th); 107 int yy = radius * sin(th); 108 Mouse.move(xx - x, yy - y, 0); 109 x = xx; 110 y = yy; 111 delay(delay_msec); 112 } 113 }}} 114 84 115 ''(2011/11/26)''