This program demonstrates how to use a MicroNFCBoard as a peripheral from any mbed target and blink the board's LEDs.
Dependencies: MicroNFCBoardAPI mbed
Fork of MicroNFCBoardAPI_Blink by
main.cpp
00001 /* 00002 MicroNFCBoard mbed API 00003 00004 Copyright (c) 2014-2015 AppNearMe Ltd 00005 00006 Licensed under the Apache License, Version 2.0 (the "License"); 00007 you may not use this file except in compliance with the License. 00008 You may obtain a copy of the License at 00009 00010 http://www.apache.org/licenses/LICENSE-2.0 00011 00012 Unless required by applicable law or agreed to in writing, software 00013 distributed under the License is distributed on an "AS IS" BASIS, 00014 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 See the License for the specific language governing permissions and 00016 limitations under the License. 00017 */ 00018 00019 #include "mbed.h" 00020 #include "micronfcboard.h" 00021 00022 MicroNFCBoard nfc(SPI_MOSI, SPI_MISO, SPI_SCK, SPI_CS, D9); 00023 00024 int main() { 00025 nfc.init(); 00026 bool b = true; 00027 for(int i = 0; i < 10; i++) 00028 { 00029 nfc.setLeds(b, !b); 00030 wait_ms(200); 00031 b = !b; 00032 } 00033 }
Generated on Thu Jul 21 2022 05:33:30 by 1.7.2