Open Ephys GUI
|
This class extend ofStandardFirmata and provides additional functionality like servo support through SysEx messages. More...
#include <ofArduino.h>
Public Member Functions | |
ofArduino () | |
virtual | ~ofArduino () |
bool | connect (string device, int baud=57600) |
void | disconnect () |
bool | isArduinoReady () |
void | setUseDelay (bool bDelay) |
void | update () |
bool | isInitialized () |
void | setDigitalHistoryLength (int length) |
void | setAnalogHistoryLength (int length) |
void | setStringHistoryLength (int length) |
void | setSysExHistoryLength (int nSysEx) |
void | sendDigitalPinMode (int pin, int mode) |
void | sendAnalogPinReporting (int pin, int mode) |
void | sendDigital (int pin, int value, bool force=false) |
void | sendPwm (int pin, int value, bool force=false) |
void | sendSysEx (int command, vector< unsigned char > data) |
void | sendString (string str) |
void | sendProtocolVersionRequest () |
void | sendFirmwareVersionRequest () |
void | sendReset () |
void | sendSysExBegin () |
void | sendSysExEnd () |
void | sendByte (unsigned char byte) |
void | sendValueAsTwo7bitBytes (int value) |
int | getPwm (int pin) |
int | getDigital (int pin) |
int | getAnalog (int pin) |
vector< unsigned char > | getSysEx () |
string | getString () |
int | getMajorProtocolVersion () |
int | getMinorProtocolVersion () |
int | getMajorFirmwareVersion () |
int | getMinorFirmwareVersion () |
string | getFirmwareName () |
list< int > * | getDigitalHistory (int pin) |
list< int > * | getAnalogHistory (int pin) |
list< vector< unsigned char > > * | getSysExHistory () |
list< string > * | getStringHistory () |
int | getDigitalPinMode (int pin) |
int | getAnalogPinReporting (int pin) |
int | getValueFromTwo7bitBytes (unsigned char lsb, unsigned char msb) |
void | sendServo (int pin, int value, bool force=false) |
void | sendServoAttach (int pin, int minPulse=544, int maxPulse=2400, int angle=180) |
void | sendServoDetach (int pin) |
int | getServo (int pin) |
Protected Member Functions | |
void | initPins () |
void | sendDigitalPinReporting (int pin, int mode) |
void | sendDigitalPortReporting (int port, int mode) |
void | processData (unsigned char inputData) |
void | processDigitalPort (int port, unsigned char value) |
virtual void | processSysExData (vector< unsigned char > data) |
unsigned long | ofGetSystemTimeMicros () |
float | ofGetElapsedTimef () |
unsigned long | ofGetElapsedTimeMicros () |
This class extend ofStandardFirmata and provides additional functionality like servo support through SysEx messages.
use the OFstdFirmata for servo support...
ofArduino::ofArduino | ( | ) |
|
virtual |
bool ofArduino::connect | ( | string | device, |
int | baud = 57600 |
||
) |
void ofArduino::disconnect | ( | ) |
bool ofArduino::isArduinoReady | ( | ) |
void ofArduino::setUseDelay | ( | bool | bDelay | ) |
void ofArduino::update | ( | ) |
bool ofArduino::isInitialized | ( | ) |
void ofArduino::setDigitalHistoryLength | ( | int | length | ) |
void ofArduino::setAnalogHistoryLength | ( | int | length | ) |
void ofArduino::setStringHistoryLength | ( | int | length | ) |
void ofArduino::setSysExHistoryLength | ( | int | nSysEx | ) |
void ofArduino::sendDigitalPinMode | ( | int | pin, |
int | mode | ||
) |
void ofArduino::sendAnalogPinReporting | ( | int | pin, |
int | mode | ||
) |
void ofArduino::sendDigital | ( | int | pin, |
int | value, | ||
bool | force = false |
||
) |
void ofArduino::sendPwm | ( | int | pin, |
int | value, | ||
bool | force = false |
||
) |
void ofArduino::sendSysEx | ( | int | command, |
vector< unsigned char > | data | ||
) |
void ofArduino::sendString | ( | string | str | ) |
void ofArduino::sendProtocolVersionRequest | ( | ) |
void ofArduino::sendFirmwareVersionRequest | ( | ) |
void ofArduino::sendReset | ( | ) |
void ofArduino::sendSysExBegin | ( | ) |
void ofArduino::sendSysExEnd | ( | ) |
void ofArduino::sendByte | ( | unsigned char | byte | ) |
void ofArduino::sendValueAsTwo7bitBytes | ( | int | value | ) |
int ofArduino::getPwm | ( | int | pin | ) |
int ofArduino::getDigital | ( | int | pin | ) |
int ofArduino::getAnalog | ( | int | pin | ) |
vector<unsigned char> ofArduino::getSysEx | ( | ) |
string ofArduino::getString | ( | ) |
int ofArduino::getMajorProtocolVersion | ( | ) |
int ofArduino::getMinorProtocolVersion | ( | ) |
int ofArduino::getMajorFirmwareVersion | ( | ) |
int ofArduino::getMinorFirmwareVersion | ( | ) |
string ofArduino::getFirmwareName | ( | ) |
list<int>* ofArduino::getDigitalHistory | ( | int | pin | ) |
list<int>* ofArduino::getAnalogHistory | ( | int | pin | ) |
list<vector<unsigned char> >* ofArduino::getSysExHistory | ( | ) |
list<string>* ofArduino::getStringHistory | ( | ) |
int ofArduino::getDigitalPinMode | ( | int | pin | ) |
int ofArduino::getAnalogPinReporting | ( | int | pin | ) |
int ofArduino::getValueFromTwo7bitBytes | ( | unsigned char | lsb, |
unsigned char | msb | ||
) |
void ofArduino::sendServo | ( | int | pin, |
int | value, | ||
bool | force = false |
||
) |
void ofArduino::sendServoAttach | ( | int | pin, |
int | minPulse = 544 , |
||
int | maxPulse = 2400 , |
||
int | angle = 180 |
||
) |
void ofArduino::sendServoDetach | ( | int | pin | ) |
int ofArduino::getServo | ( | int | pin | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |