eBoard ๐Ÿ‰  โ‘ โ‘งโ‘จ
Written for SIA 2017/2018
lcd_debug.ino
Go to the documentation of this file.
1 ///@file lcd_debug.ino
2 ///@brief a lcd debug example
3 
4 ///@brief we need the I2C functionality
5 #define EBOARD_I2C 0x1
6 ///@brief we want to use the LCD
7 #define EBOARD_LCD 0x1
8 #include "/eagleoutice/projects/github/eBoard/eBoard.h"
9 /// @brief the board object
10 SoccerBoard board;
11 /// @brief the lcd object
12 LCD lcd(board);
13 /// @brief the dBoard object
14 DynamixelBoard dBoard(board);
15 /// @brief left servo
16 /// @note untested!
17 AX12Servo links(dBoard,1);
18 /// @brief right servo
19 /// @note untested
20 AX12Servo rechts(dBoard,2);
21 /**
22  @note you can copy paste this code into your ARDUINO IDE - keep in mind to change the path!
23 
24  Compiled Size for ARUDINO UNO: 8,526 bytes => 3.0: 7,278 bytes \n
25  Compiled Size for ARUDINO MEGA: 10,058 bytes => 3.0: 8,242 bytes
26 */
27 int main()
28 {
29  links.storePosition(40);
30  rechts.storePosition(200);
31  //lcd.changeID(0x3C);
32  board.sleep(1);
33  lcd.clear();
34  lcd.print(links.getPosition());
35  lcd.print(1,0,rechts.getPosition());
36  dBoard.action();
37  board.sleep(1);
38  lcd.changeBackground(true);
39  lcd.print(2,0,links.getPosition());
40  lcd.print(3,0,rechts.getPosition());
41  return 0;
42  }