-
Notifications
You must be signed in to change notification settings - Fork 64
Machine communication
Tinkerspy edited this page Mar 16, 2016
·
11 revisions
- Using the message queue
- Triggering state events
- Calling state() method
- Calling custom methods
// Sending messages:
led.msgWrite( led.MSG_ON );
factory.msgSend( 'LED', led.MSG_ON );
// Receiving messages
msgRead( MSG_ON );
// Triggering an event
led.trigger( led.EVT_ON );
// Directly change the led machine's state
led.state( led.ON );
// Call the led machine's on() method
led.on();