more G-Labs products

Author Topic: Serial data send to arduino (DIP/"INTELIGENT" Switch)  (Read 818 times)

July 12, 2015, 01:48:05 PM
Read 818 times

Szab02

  • *
  • Information
  • Newbie
  • Posts: 4
Hi!

Can anybody help me. Why drop always gini the port?

I attached the hgx file.

July 13, 2015, 01:54:11 PM
Reply #1

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
Looks like some of your braces are mixed up?  Try moving "}" before When.WebServiceCallReceived to close HandleStatusChanged action.  You'll need to delete the brace which is down at the end about 45 lines.

Code: [Select]
Action<bool>
HandleStatusChanged = (bool connected) => {
 
  // this will be called every time the connection status changes
  Program.Notify("SerialPort Status", connected ? "CONNECTED!" : "DISCONNECTED!");
   /* As a switch, the module should also handle "Control.On" and "Control.Off" commands issued by the user
 from the Web user interface, or by scripting. (define Web service) */

} // <== MOVE BRACE TO HERE to finish the action

 When.WebServiceCallReceived("ArduRCswitch", ( args ) =&gt;

July 16, 2015, 06:36:47 PM
Reply #2

Szab02

  • *
  • Information
  • Newbie
  • Posts: 4
Hi kevin1!

Unfortunately not the Bracket. The problem come, when i make OFF or ON with original DIP SWITCH remote control, after that  the gini drop the port. (When is necessary then can i upload the ardu code.)


OMG!

I have a find the error (slash):

//var sensor = Modules.InDomain("ArduSensor")
« Last Edit: July 16, 2015, 07:00:46 PM by Szab02 »