Bendyroad IDE reference manual.
© Copyright Bendyroad 2024.
Example: A simple switch and LED
-
the switch has the 'name': 'sw1'
-
and connected to 'port' 'D11' (or any other port you chose)
-
use the current value of 'sw1' in a rule, for example
set a LED on when sw1 is on:
if ( sw1 ) {
led1 = 1 ;
} else {
led1 = 0 ;
}