Paso 3: Programe el esclavo
Ahora que las conexiones físicas existen, necesita programar el microcontrolador esclavo. He añadido algo de código que debe ayudarle a empezar.
Dim SLAVE As New oDDELinkDim LED As New oDIO1Sub Main() 'set our I2C address to 2 (note, this must match the remote 'address we set in the master code) ooPIC.Node = 2 'setup an LED LED.IOLine = 5 LED.Direction = cvOutput 'now, link the output of our DDELink object to 'the LED, and turn it on...now automagically, the LED will blink SLAVE.Output.Link(LED) SLAVE.Operate = cvTrueEnd Sub