eBoard ①⑧⑨
Written for SIA 2017/2018
lcd_debug.cpp File Reference

a lcd debug example More...

#include <eBoard.h>
+ Include dependency graph for lcd_debug.cpp:

Go to the source code of this file.

Macros

#define EBOARD_DEBUG_MODE   0x0
 who you gonna call? More...
 
#define EBOARD_I2C   0x1
 we need the I2C functionality More...
 
#define EBOARD_LCD   0x1
 we want to use the LCD More...
 

Functions

int main ()
 

Variables

SoccerBoard board
 the board object More...
 
LCD lcd (board)
 the lcd object More...
 
DynamixelBoard dBoard (board)
 the dBoard object More...
 
AX12Servo links (dBoard, 1)
 left servo More...
 
AX12Servo rechts (dBoard, 2)
 right servo More...
 

Detailed Description

a lcd debug example

Definition in file lcd_debug.cpp.

Macro Definition Documentation

◆ EBOARD_DEBUG_MODE

#define EBOARD_DEBUG_MODE   0x0

who you gonna call?

Definition at line 5 of file lcd_debug.cpp.

◆ EBOARD_I2C

#define EBOARD_I2C   0x1

we need the I2C functionality

Definition at line 7 of file lcd_debug.cpp.

◆ EBOARD_LCD

#define EBOARD_LCD   0x1

we want to use the LCD

Definition at line 9 of file lcd_debug.cpp.

Function Documentation

◆ main()

int main ( void  )
Note
you can copy paste this code into your ARDUINO IDE - keep in mind to change the path!

Compiled Size for ARUDINO UNO: 8,526 bytes => 3.0: 6,734 bytes => 3.2: 5,610 bytes
Compiled Size for ARUDINO MEGA: 10,058 bytes => 3.0: 8,170 bytes => 3.2: 6,386 bytes

Definition at line 29 of file lcd_debug.cpp.

References DynamixelBoard::action(), board, LCD::changeBackground(), LCD::clear(), dBoard, AX12Servo::getPosition(), lcd, links, LCD::print(), rechts, SoccerBoard::sleep(), and AX12Servo::storePosition().

30 {
31  links.storePosition(40);
32  rechts.storePosition(200);
33  //lcd.changeID(0x3C);
34  board.sleep(1);
35  lcd.clear();
37  lcd.print(1,0,rechts.getPosition());
38  dBoard.action();
39  board.sleep(1);
40  lcd.changeBackground(true);
41  lcd.print(2,0,links.getPosition());
42  lcd.print(3,0,rechts.getPosition());
43  return 0;
44  }
void storePosition(int pos, int speed=0x3FF)
This saves the Servo Position.
optVAL_t getPosition(void)
This "kind of" returns the Servo-Position.
void sleep(uint16_t t)
Say goodnight!
SoccerBoard board
the board object
Definition: lcd_debug.cpp:12
AX12Servo links(dBoard, 1)
left servo
AX12Servo rechts(dBoard, 2)
right servo
void changeBackground(bool newBackground=false)
changes the background of the display
bool clear(void)
clears the LCD
void action(void)
will force every AX12Servo to drive to AX12Servo::storedPos with AX12Servo::storedSpeed ...
LCD lcd(board)
the lcd object
DynamixelBoard dBoard(board)
the dBoard object
void print(const char *data)
prints a string to the display
+ Here is the call graph for this function:

Variable Documentation

◆ board

SoccerBoard board

the board object

Definition at line 12 of file lcd_debug.cpp.

Referenced by main().

◆ dBoard

the dBoard object

Referenced by main().

◆ lcd

LCD lcd(board)

the lcd object

Referenced by main().

◆ links

AX12Servo links(dBoard, 1)

left servo

Note
untested!

Referenced by main().

◆ rechts

AX12Servo rechts(dBoard, 2)

right servo

Note
untested

Referenced by main().