Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
Class | ofWiring |
||||
---|---|---|---|---|---|
Name | sendDigital() |
||||
Examples | void testApp::update(){ if ( wiring.isWiringReady()){ if (bSetupWiring == false){ setupWiring(); bSetupWiring = true; // only do this once } // 2nd do the update of the wiring updateWiring(); } } //-------------------------------------------------------------- void testApp::setupWiring(){ wiring.sendDigitalPinMode(48, OUTPUT); wiring.sendDigitalPinMode(39, INPUT); wiring.sendAnalogPinReporting(0, ANALOG); } //-------------------------------------------------------------- void testApp::updateWiring(){ // update the wiring wiring.update(); cout<<wiring.getAnalog(0)<<endl; } //-------------------------------------------------------------- void testApp::mousePressed(int x, int y, int button){ wiring.sendDigital(48, HIGH); } //-------------------------------------------------------------- void testApp::mouseReleased(int x, int y, int button){ wiring.sendDigital(48, LOW); } |
||||
Description | Writes HIGH or LOW in a digital pin. | ||||
Syntax | sendDigital(pin, value) |
||||
Parameters |
|
||||
Returns | None | ||||
Usage | Application |