tino / pyFirmata

Python interface for the Firmata (http://firmata.org/) protocol. It is compliant with Firmata 2.1. Any help with updating to 2.2 is welcome. The Capability Query is implemented, but the Pin State Query feature not yet.
MIT License
578 stars 191 forks source link

Blink an LED with DIGITAL_PULSE 0x91 #43

Closed pinocchiodrc closed 9 years ago

pinocchiodrc commented 9 years ago

first of all thanks for the nice library. Im just trying to setup an LED blink function with standardFirmata. But I didnt find the Sysex in Firmata.h. I did so, but I think it wont work.

#define DIGITAL_PULSE 0x91

void Digitalpulsecallback() { digitalWrite(13, LOW); delayMicroseconds(1000); digitalWrite(13, HIGH); delayMicroseconds(1); digitalWrite(13, LOW); delayMicroseconds(1000); }

void setup() { Firmata.attach(DIGITAL_PULSE, Digitalpulsecallback); }

Is there someone, who knows how to make this and what should I in standardFirmata add? Thanks!

tino commented 9 years ago

I am not sure what your question is. Did you try this? Does it work? Does it give you errors?

pinocchiodrc commented 9 years ago

sorry, I mean I didnt find the command. Now I know there is actully no Pulse_SEQUENCE command in Firmata. I creat a new by myself and it works now. thanks!