added example with rtc and pir