Advertisement
Guest User

Untitled

a guest
Jan 19th, 2013
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. #include "hardware.h"
  2.  
  3. // Initialise the hardware
  4. void appInitHardware(void) {
  5.     initHardware();
  6. }
  7. // Initialise the software
  8. TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
  9.     return 0;
  10. }
  11. // This is the main loop
  12. TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart) {
  13.  
  14.     if(myUart.isRxBufferEmpty()){
  15.     // We have no data to process. So do other things....
  16.     }else
  17.         {
  18.     int ch = cin.read();
  19.     if(ch != EOF){
  20.     display.print( ch );
  21.     //cout.write(ch);
  22.         }// We have data to process so start reading it in
  23.     }
  24.     // -------- Start HD44780 Compatible-------
  25.     {      
  26.         // Clear the screen:-
  27.         display.clear();
  28.         // A display is a 'Stream' so can use the print calls
  29.         display.setLineWrap(TRUE);
  30.         display.print( "this is a rather long string" );
  31.         //display.print( 1234 );    
  32.     }
  33.     // -------- End   HD44780 Compatible-------
  34.  
  35.     // -------- Start Text to Speech-------
  36.     // Say an English phrase
  37.     speech.print("Soon we will command with r s 2 3 2. ");
  38.     // -------- End   Text to Speech-------
  39.  
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement