Solder the flat side of your LED to an approx
1kohm resistor and the resistor to the wire coming from the module. Note:
The resistor is needed to give the proper voltage for
the LED. If you want to work with bulbs, you don't need the resistor.
Connect the other "leg" of the LED to the +12V wire.
Now for the coding of the module.
#Define OUTPUT
2
Definemodule(0,OUTPUT,0,4)
#Define Testled
"address"
:LedOn
{
Setpoint(Testled)
}
:LedOff
{
Clearpoint(Testled)
}
Definebutton(XX,on,LedOn)
Definebutton(XX,off,LedOff)
Replace "address" with the actual address of your LED.
You can easily read the address from the picture above.
With the code above your LED will illuminate when you
press your button and it will be turned off when you release that same
button. Note:
If you don't write the "#Define Testled 0,0,0b00000001"
statement, you will have to replace the words "Testled" with the address
of your LED.
You can also control the lights using events from EPIC,
that EPIC get's from your simulation software. However, this requires the
simulation software to communicate with EPIC. There are additional programs
that extract this info from the simulation, like my memreader.
In this case, you get the events from the software to EPIC in form of Qproc's.
If your lights should be controlled by the simulation software, you do
anything as in the example above, except for the Definebutton statements.
You need to replace these with:
DefineQproc(XX,LedOn)
DefineQproc(XX,LedOff)
Voilà, your lights are now controlled by the software.