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.
Fork of SI570 by
main.cpp
00001 #include "mbed.h" 00002 #include "SI570.h" 00003 #include "QEI.h" 00004 #include "LCD_DISCO_F746NG.h" 00005 00006 LCD_DISCO_F746NG lcd; 00007 SI570 si570(D14, D15, 0xAA); 00008 QEI wheel (A4, A5, NC, 360); 00009 00010 00011 int main() { 00012 int wp,swp=0; 00013 float startfreq=7.0; 00014 float freq; 00015 00016 while (1) { 00017 lcd.Clear(LCD_COLOR_BLUE); 00018 lcd.SetBackColor(LCD_COLOR_BLUE); 00019 lcd.SetTextColor(LCD_COLOR_WHITE); 00020 00021 wp = wheel.getPulses(); 00022 freq=startfreq+wp*0.00001; 00023 if (swp != wp) { 00024 si570.set_frequency(freq); 00025 swp = wp; 00026 } 00027 lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"%f Mhz", CENTER_MODE); 00028 } 00029 }
Generated on Thu Jul 14 2022 12:41:47 by
1.7.2
