In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

Arduino/Digital/Blink: physical x wonderfl way

A "hello world!" example in physical x wonderfl way
Output:
* The on-board LED on the D13 pin
How to:
http://funnel.cc/Main/GettingStarted
Reference:
http://arduino.cc/en/Tutorial/Blink
http://funnel.cc/Software/ActionScript3
http://funnel.cc/reference/actionscript3/
/**
 * Copyright kotobuki ( http://wonderfl.net/user/kotobuki )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/91zk
 */

// A "hello world!" example in physical x wonderfl way
// 
// Output:
// * The on-board LED on the D13 pin
// 
// How to:
// http://funnel.cc/Main/GettingStarted
// 
// Reference:
// http://arduino.cc/en/Tutorial/Blink
// http://funnel.cc/Software/ActionScript3
// http://funnel.cc/reference/actionscript3/

package {
    import flash.display.Sprite;
    import funnel.*;
    import funnel.gui.*;
    import funnel.ui.*;
    
    public class FlashTest extends Sprite {
        private var arduino:Arduino;
        
        public function FlashTest() {
            arduino = new Arduino(Arduino.FIRMATA);

            // If you want to create a GUI to let users try
            // without hardware, set a GUI as follows
            var gui:ArduinoGUI = new ArduinoGUI();
            addChild(gui);
            arduino.gui = gui;

            var led:LED = new LED(arduino.digitalPin(13));
            led.blink(1000, 0);  // 1000ms interval (i.e. 1Hz)
        }
    }
}