Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of PIR_Motion_Sensor_WIZwiki-W7500 by
main.cpp
00001 // PIR Motion Sensor Modlue : HC-SR501 00002 #include "mbed.h" 00003 00004 DigitalOut myled(LED1); 00005 DigitalIn PIR(PC_7); //D8 00006 00007 Serial pc(USBTX, USBRX); 00008 00009 int main() { 00010 pc.baud(115200); 00011 wait(0.5f); 00012 pc.printf("Hello WizWIki-W7500!\n\r"); 00013 pc.printf("===========================================\n\r"); 00014 int PIR_sensor; 00015 while(1) { 00016 PIR_sensor = PIR; 00017 pc.printf("PIR Value : %d\r\n",PIR_sensor); 00018 myled =! PIR_sensor; 00019 wait(0.1f); 00020 } 00021 }
Generated on Sat Jul 16 2022 14:57:25 by
1.7.2
