Pages: [1]   Go Down
Author Topic: firmata and processing  (Read 784 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello i use firmata for interface with software. i have a problem. i use relay who HIGH with (low). i use this relay
 
Code:
http://www.ebay.com/itm/New-4-Channel-5V-Relay-Module-PIC-ARM-AVR-DSP-Arduino-/270836814943?pt=LH_DefaultDomain_0&hash=item3f0f21d45f

please tell how i turn on with firmata? what edit in the code of fitrmata?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i use relay who HIGH with (low).
What? Relays are turned on or off. If your relay is turned on using LOW, then I'd question how it is wired. Even if it is wired correctly, you can still turn digital pins HIGH and LOW using firmata.

Quote
what edit in the code of fitrmata?
None. Don't mess with the firmata sketch.

Quote
please tell how i turn on with firmata?
Please show the Processing sketch you have now.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes this relay turn on with LOW and turn off with HIGH. look the code
Code:
    int LDR = 0;       
    int relay = 8;   
    int val = 0;     

    void setup() {
      pinMode(LDR, INPUT);     
      pinMode(relay, OUTPUT); 
      digitalWrite(relay,HIGH); 
    }

    void loop() {
      val = analogRead(LDR);     
         
      if(val<800 )
      {
        digitalWrite(releay,LOW);    //start
      }         
      delay(100);                 
    }

and the processing is http://nootropicdesign.com/toolduino/
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

please help me!!!!!!!!!!!!!
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bumping after 2 hours is a sure way to get people to just move on. Poor planning on you part does not constitute an emergency on our part. I work for a living, too.

Is that the sketch that you have loaded while the Processing application is running?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes i use this sketch
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
yes i use this sketch
Well, that explains your problem.

From your link:
The Arduino must be running the Firmata firmware that comes with the Arduino IDE. Toolduino is not for use with your own Arduino sketch -- you must upload the StandardFirmata sketch to your Arduino before starting Toolduino.
Logged

Pages: [1]   Go Up
Jump to: