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 //Gyro test01 00002 // Akidukidensi AE-GYRO-SMD 00003 #include "mbed.h" 00004 #include "TextLCD0420.h" 00005 00006 #define ON 1 00007 #define OFF 0 00008 00009 DigitalOut mled0(LED1); 00010 DigitalOut mled1(LED2); 00011 AnalogIn gyro1_adc(p16); 00012 AnalogIn gyro2_adc(p17); 00013 00014 TextLCD lcd(p24, p25, p26, p27, p28, p29, p30,20,4); // rs, rw, e, d0, d1, d2, d3 00015 00016 int main() { 00017 float gy1_data; 00018 lcd.cls(); 00019 lcd.locate(0,0); 00020 lcd.printf("*** Gyro test01***\n"); 00021 00022 while(1){ 00023 gy1_data=gyro1_adc.read(); 00024 lcd.locate(0,1); 00025 lcd.printf("Gyro1:%2.5f",gy1_data); 00026 }//while 00027 }//main 00028
Generated on Fri Aug 26 2022 05:58:39 by
