Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Help please

(you are viewing a thread; or go back to list of threads)

Help please (by Ahmad sakr)
Could you please help me
After I compile sketch for arduino and opening the file.ino at arduino ide
If I want to write some if statements which depends on input, output and internal relay status in the arduino ide
I can do that for input and output
How to write if statement depends on internal relay status without giving me errors while compile at arduino ide?
I tried many times but gives me error was not declared in this scope
Like in the attachment program I want to write if statement for Rrelay
Fri Mar 2 2018, 15:39:37, download attachment New folder.rar
(no subject) (by Ahmad sakr)
Dear friends
Could anyone help me please
Thanks
Sat Mar 3 2018, 01:53:22
(no subject) (by Ihor Nehrutsa)
1) Open https://github.com/LDmicro/LDmicro/wiki
2) Type arduino at "Find a Page" field
3) Read 4 articles in this order


After Compile Arduino sketch you get 4 files...
Sat Mar 3 2018, 13:01:43, download attachment arduino.JPG
(no subject) (by Ahmad sakr)
Dear Ihor Nehrutsa
I don't have any problems in using ldmicro with arduino
My question is
If I used internal relay in ldmicro and I want to write something else in arduino ide depends on the internal relay status like if statement or while.
I can write if statement depends upon input and output pins status but can't do this with internal relay and this is my question,
As in the attachment I can write if(pin_up_Xstart) =high
But how to write if statement for the internal relay Rrelay
Sorry for my bad English but I hope that you understand me
Thanks very much for your reply
Sat Mar 3 2018, 16:25:15
(no subject) (by Ihor Nehrutsa)
in nn.cpp
...
STATIC ldBOOL Ub_Rrelay = 0;
...

in nn.h
...
#define Read_Ub_Rrelay() Ub_Rrelay
#define Write_Ub_Rrelay(x) (Ub_Rrelay = x)
#define Write0_Ub_Rrelay() (Ub_Rrelay = 0)
#define Write1_Ub_Rrelay() (Ub_Rrelay = 1)
...


So
...
if( Read_Ub_Rrelay() ) {
//do something
}
Sat Mar 3 2018, 17:18:32
(no subject) (by Ahmad sakr)
Dear sir
I make what you say
if( Read_Ub_Rrelay() gives error not declared
Also for if( Read_Ub_Rrelay(x) gives error macro passed 1 argument but takes just 0
Thanks
Mon Mar 5 2018, 23:40:35
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):