Changes between Version 15 and Version 16 of 32u4bb


Ignore:
Timestamp:
Nov 26, 2011 2:26:42 AM (12 years ago)
Author:
sgk
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 32u4bb

    v15 v16  
    8282   * Mac OSXなら、「`/tmp`」のどっかですかねえ。
    8383
     84== もうひとつお試し ==
     85
     86[attachment:MouseText.hex MouseTest.hex]
     87
     88{{{
     89#!C
     90int phase = 0;
     91int full = 100;
     92int radius = 100;
     93int delay_msec = 2;
     94
     95int x = radius;
     96int y = 0;
     97
     98void setup() {
     99}
     100
     101void 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
    84115''(2011/11/26)''