====== Digito i/o with Studyboard ====== {{:et:naited:digi:io.jpg?300|}} Studyboard ‚Basic’ includes three outputs (LED) and three inputs (microswitch) LEDs are connected to PORTC[3..5] and switches PORTC[0..2]. This simple examples demonstrates how to switch on LED when pushing appropriate switch. Connection schema: {{:et:harjutused:digi:1a_skeem.jpg?500|}} Example C code: /* Labor 1 example Example works with Studyboard Basic v3 Press S1 - LED1 goes ON Press S2 - LED2 goes ON Press S31 - LED3 goes ON Raivo Sell 2008 LED = 0 (ON) LED = 1 (OFF) S = 0 (ON) S = 1 (OFF) PORT direction: 1-output 0-input */ #include //defineeritakse kõrge bit pordis x #define SET(x) |= (1<