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.
main.cpp
00001 /* 00002 * ====================== 00003 * VS-C3/VS-RCV3 PIN 00004 * ====================== 00005 * 1:NC 2:NC 00006 * 3:DAT 4:CMD 00007 * 5:SEL 6:CLK 00008 * 7:+5~7V 8:NC 00009 * 9:+3V 10:GND 00010 * 00011 */ 00012 00013 #include "mbed.h" 00014 #include "PS_PAD.h" 00015 00016 PS_PAD vsc3(p5, p6, p7, p21); 00017 00018 DigitalOut myled[] = {LED1, LED2, LED3, LED4}; 00019 00020 int main() { 00021 vsc3.init(); 00022 printf("START\n"); 00023 while(1) { 00024 vsc3.poll(); 00025 myled[0] = vsc3.read(PS_PAD::PAD_CIRCLE); 00026 myled[1] = vsc3.read(PS_PAD::PAD_SQUARE); 00027 myled[2] = vsc3.read(PS_PAD::PAD_TRIANGLE); 00028 myled[3] = vsc3.read(PS_PAD::PAD_X); 00029 wait(0.05); 00030 } 00031 }
Generated on Wed Jul 13 2022 06:02:51 by
1.7.2