VoxCommando

General Discussion => General Discussion => Topic started by: Bahraini.75 on March 08, 2020, 02:36:51 PM

Title: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 08, 2020, 02:36:51 PM
Hi all

How can I make arduino monitor for example (temperature or water level) if reaches a certain limit then trigger event for example (event&&WaterLevelLow )or(event&&HighTemp) to VC through serial the easiest and semple way
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Kalle on March 08, 2020, 04:52:17 PM
Hi,
maybe this post will help you

https://voxcommando.com/forum/index.php?topic=2293.msg19848#msg19848 (https://voxcommando.com/forum/index.php?topic=2293.msg19848#msg19848)

and here

https://voxcommando.com/forum/index.php?topic=1452.msg12742#msg12742 (https://voxcommando.com/forum/index.php?topic=1452.msg12742#msg12742)
Title: Re: Arduino udp or serial monitor trigger event???
Post by: jitterjames on March 08, 2020, 05:39:38 PM
You asked the same question two years ago and we answered it.

What part are you still having trouble with?
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 08, 2020, 06:58:52 PM
I tried but it not work with me maybe I missed something  :-[  :bonk
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 08, 2020, 07:53:06 PM
When arduino send the event it's not showed VC history I mean the event
Title: Re: Arduino udp or serial monitor trigger event???
Post by: nime5ter on March 08, 2020, 10:01:13 PM
Is it possible that you do not have the 'Show All Events' option selected under VC Options?
https://voxcommando.com/mediawiki/index.php?title=Main_Menu#Options

If it is unchecked, and you have not yet created a VC command that uses the event you are sending from Arduino, the event will not show in the VC history window.
Title: Re: Arduino udp or serial monitor trigger event???
Post by: jitterjames on March 09, 2020, 09:21:06 AM
Never heard of heic file format before.

If you are posting an image please use a normal universal format like .jpg or .png or .gif.
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 09, 2020, 09:46:39 AM
this what i want to do

please check the attach bellow
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 09, 2020, 10:01:57 AM
sorry
i send it again
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Kalle on March 09, 2020, 10:02:18 AM
Never heard of heic file format before.

If you are posting an image please use a normal universal format like .jpg or .png or .gif.
This is a iPhone image format, but what do you want show us?
You can hover your mouse over the orange messages in the VC history window which contain some information what goes wrong.
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Kalle on March 09, 2020, 10:04:55 AM
I can‘t see any event sent from your Arduino
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 09, 2020, 10:42:28 AM
Hi kale
Did you see the attach file
There is no event there you are right
where the stars I but I need event to trigger  to vc
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 09, 2020, 10:49:53 AM
This is a iPhone image format, but what do you want show us?
You can hover your mouse over the orange messages in the VC history window which contain some information what goes wrong.

Title: Re: Arduino udp or serial monitor trigger event???
Post by: jitterjames on March 09, 2020, 11:16:34 AM
Please post your complete VoxLog.txt file
Title: Re: Arduino udp or serial monitor trigger event???
Post by: jitterjames on March 09, 2020, 11:19:05 AM
Also you attached your arduino code two times but did not attach your python code.
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 09, 2020, 11:32:07 AM
Hi James
I don't have python code  ::)
I just send arduino code to help me with it
I don't know how to make it work  ::saddest
Title: Re: Arduino udp or serial monitor trigger event???
Post by: jitterjames on March 09, 2020, 11:38:28 AM
You can't get VoxCommando to communicate with Arduino if you don't use any Python code.  OK, maybe there is a way to do this, but the example that we gave you requires Python code.

Several times we have sent you sample code, which includes both Arduino code and Python code.  The example shows you exactly how to do what you are asking for.  There is no point in continuing to ask us to help you if you ignore the information we give you.

Here is the link you need again: https://voxcommando.com/forum/index.php?topic=1452.msg12742#msg12742

You should review the information here: https://voxcommando.com/mediawiki/index.php?title=Arduino

You might also need to look at this: https://voxcommando.com/mediawiki/index.php?title=Python

One more problem you will need to face.  I do not think you know how to program Arduino.  For example, you are setting your digital pins to HIGH before setting them to OUTPUT.  You need to set them to output first, then you can set them to HIGH.
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 09, 2020, 11:43:32 AM
Also you attached your arduino code two times but did not attach your python code.

i have bad internet i attach it but it show i didnt that way sorry for that

about the VoxLog.txt file i attach it
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 09, 2020, 11:55:30 AM
well you are right i setting my digital pins to HIGH before setting them to OUTPUT
because i copy it from the original code
this the original code :
Code: [Select]
int sw1 = 0; int sw11 = 0; int sw21 = 0;
int sw2 = 0; int sw12 = 0; int sw22 = 0;
int sw3 = 0; int sw13 = 0; int sw23 = 0;
int sw4 = 0; int sw14 = 0; int sw24 = 0;
int sw5 = 0; int sw15 = 0; int sw25 = 0;
int sw6 = 0; int sw16 = 0; int sw26 = 0;
int sw7 = 0; int sw17 = 0; int sw27 = 0;
int sw8 = 0; int sw18 = 0; int sw28 = 0;
int sw9 = 0; int sw19 = 0; int sw29 = 0;
int sw10 = 0; int sw20 = 0; int sw30 = 0;
int sw31 = 0; int sw41 = 0; int sw51 = 0;
int sw32 = 0; int sw42 = 0; int sw52 = 0;
int sw33 = 0; int sw43 = 0; int sw53 = 0;
int sw34 = 0; int sw44 = 0;
int sw35 = 0; int sw45 = 0;
int sw36 = 0; int sw46 = 0;
int sw37 = 0; int sw47 = 0;
int sw38 = 0; int sw48 = 0;
int sw39 = 0; int sw49 = 0;
int sw40 = 0; int sw50 = 0;


void setup() {
 pinMode(22, OUTPUT);     pinMode(32, OUTPUT);     pinMode(42, OUTPUT);     pinMode(52, OUTPUT);
  pinMode(23, OUTPUT);     pinMode(33, OUTPUT);     pinMode(43, OUTPUT);     pinMode(53, OUTPUT);
  pinMode(24, OUTPUT);     pinMode(34, OUTPUT);     pinMode(44, OUTPUT);
  pinMode(25, OUTPUT);     pinMode(35, OUTPUT);     pinMode(45, OUTPUT);
  pinMode(26, OUTPUT);     pinMode(36, OUTPUT);     pinMode(46, OUTPUT);
  pinMode(27, OUTPUT);     pinMode(37, OUTPUT);     pinMode(47, OUTPUT);
  pinMode(28, OUTPUT);     pinMode(38, OUTPUT);     pinMode(48, OUTPUT);
  pinMode(29, OUTPUT);     pinMode(39, OUTPUT);     pinMode(49, OUTPUT);
  pinMode(30, OUTPUT);     pinMode(40, OUTPUT);     pinMode(50, OUTPUT);
  pinMode(31, OUTPUT);     pinMode(41, OUTPUT);     pinMode(51, OUTPUT);
 

  digitalWrite(22, HIGH);    digitalWrite(32, HIGH);    digitalWrite(42, HIGH);    digitalWrite(52, HIGH);
  digitalWrite(23, HIGH);    digitalWrite(33, HIGH);    digitalWrite(43, HIGH);    digitalWrite(53, HIGH);
  digitalWrite(24, HIGH);    digitalWrite(34, HIGH);    digitalWrite(44, HIGH);
  digitalWrite(25, HIGH);    digitalWrite(35, HIGH);    digitalWrite(45, HIGH);
  digitalWrite(26, HIGH);    digitalWrite(36, HIGH);    digitalWrite(46, HIGH);
  digitalWrite(27, HIGH);    digitalWrite(37, HIGH);    digitalWrite(47, HIGH);
  digitalWrite(28, HIGH);    digitalWrite(38, HIGH);    digitalWrite(48, HIGH);
  digitalWrite(29, HIGH);    digitalWrite(39, HIGH);    digitalWrite(49, HIGH);
  digitalWrite(30, HIGH);    digitalWrite(40, HIGH);    digitalWrite(50, HIGH);
  digitalWrite(31, HIGH);    digitalWrite(41, HIGH);    digitalWrite(51, HIGH);

 Serial.begin(9600);
}
void loop() {
  if (Serial.available() > 1) {
    int input = Serial.read() ;

    Serial.println( input, DEC);
 
    if (input == 'A') {
      digitalWrite(22, sw1);
      sw1 = !sw1;
    }
      if (input == 'B'){
        digitalWrite(23, sw2);
      sw2 = !sw2;
  }
            if (input == 'C'){
              digitalWrite(24, sw3);
      sw3 = !sw3;
}
            if (input == 'D'){
              digitalWrite(25, sw4);
      sw4 = !sw4;
}
            if (input == 'E'){
              digitalWrite(26, sw5);
      sw5 = !sw5;
}
            if (input == 'F'){
              digitalWrite(27, sw6);
      sw6 = !sw6;
}
            if (input == 'G'){
              digitalWrite(28, sw7);
      sw7 = !sw7;
}
            if (input == 'H'){
              digitalWrite(29, sw8);
      sw8 = !sw8;
}
            if (input == 'I'){
              digitalWrite(30, sw9);
      sw9 = !sw9;
}
            if (input == 'J'){
              digitalWrite(31, sw10);
      sw10 = !sw10;
}
             if (input == 'K'){
               digitalWrite(32, sw11);
      sw11 = !sw11;
}
             if (input == 'L'){
               digitalWrite(33, sw12);
      sw12 = !sw12;
}
             if (input == 'M'){
               digitalWrite(34, sw13);
      sw13 = !sw13;
}
             if (input == 'N'){
               digitalWrite(35, sw14);
      sw14 = !sw14;
}
             if (input == 'O'){
               digitalWrite(36, sw15);
      sw15 = !sw15;
}
             if (input == 'P'){
               digitalWrite(37, sw16);
      sw16 = !sw16;
}
             if (input == 'Q'){
               digitalWrite(38, sw17);
      sw17 = !sw17;
}
             if (input == 'R'){
               digitalWrite(39, sw18);
      sw18 = !sw18;
}
             if (input == 'S'){
               digitalWrite(40, sw19);
      sw19 = !sw19;
}
             if (input == 'T'){
               digitalWrite(41, sw20);
      sw20 = !sw20;
}
             if (input == 'U'){
               digitalWrite(42, sw21);
      sw21 = !sw21;
}
             if (input == 'V'){
               digitalWrite(43, sw22);
      sw22 = !sw22;
}
             if (input == 'W'){
               digitalWrite(44, sw23);
      sw23 = !sw23;
}
             if (input == 'X'){
               digitalWrite(45, sw24);
      sw24 = !sw24;
}
             if (input == 'Y'){
               digitalWrite(46, sw25);
      sw25 = !sw25;
}
             if (input == 'Z'){
               digitalWrite(47, sw26);
      sw26 = !sw26;
}
             if (input == '1'){
               digitalWrite(48, sw27);
      sw27 = !sw27;
}
             if (input == '2'){
               digitalWrite(49, sw28);
      sw28 = !sw28;
}
             if (input == '3'){
               digitalWrite(50, sw29);
      sw29 = !sw29;
}
             if (input == '4'){
               digitalWrite(51, sw30);
      sw30 = !sw30;
}
             if (input == '5'){
               digitalWrite(52, sw31);
      sw31 = !sw31;
}
             if (input == '6'){
               digitalWrite(53, sw32);
      sw32 = !sw32;
             }
  }
}
Title: Re: Arduino udp or serial monitor trigger event???
Post by: jitterjames on March 09, 2020, 12:10:09 PM
The original code is in the correct order.  I guess you made a mistake when you copied it.

In your log it looks like there is an error loading the Python plugin.  Maybe you should start by making a clean install of a newer version of VoxCommando.  This would be the first step.  You need to make sure the Python plugin is working, and then you need to look at the sample code that we provided to you.
Title: Re: Arduino udp or serial monitor trigger event???
Post by: Bahraini.75 on March 09, 2020, 12:15:13 PM
Ok