Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ofserial-option

 ofserial-option

ofSerialで実装されていないシリアル制御のオプションを拡張

Hideaki Tai

December 13, 2015
Tweet

More Decks by Hideaki Tai

Other Decks in Programming

Transcript

  1. ֦ுͯ͠Έ·ͨ͠ class ofxSerial : public ofSerial { void setParity(parity p);

    void setStopBits(stop_bits s); void setDataBits(data_bits d); };
  2. ͯ͜ͱͰɺ͜Μͳײ͡Ͱॻ͚͹OK void setup() { Serial.begin(9600, SERIAL_8E2); // ϘʔϨʔτͱΦϓγϣϯͷઃఆ } void

    loop() { while (Serial.available()) { Serial.print("got message! : "); Serial.println((int)Serial.read()); } }