lineSimple.c
/*******************************************************************************
* examples/lineSimple.c *
* ===================== *
* *
* Version: 1.0.5 *
* Date : 07.11.17 *
* Author : Peter Weissig *
*******************************************************************************/
//*********************************<Included files>*****************************
#include <tucbot/tucbot.h>
//*********************************<Methods>************************************
void testLine(void);
int main(void);
//*********************************[testLine]***********************************
void testLine(void) {
lcdclr();
lcdstr_p(PSTR("Line" ));
lcdxy(0,1);
lcdstr_p(PSTR("### ### ###"));
while (1) {
lcdxy( 0,1);
lcdxy( 6,1);
lcdxy(13,1);
mdelay(250);
}
}
}
//*********************************[main]***************************************
int main (void) {
init_tucbot(0xFF);
testLine();
return (0);
}
kLineEnableFront
@ kLineEnableFront
bit mask (0x01): enable front line sensors
Definition: line.h:53
line_request
void line_request(eLineSelectMask bitmask, eRequestType request)
Requests new data from the line sensors.
kLineGetFrontMiddle
@ kLineGetFrontMiddle
constant (2): front middle line sensor
Definition: line.h:147
kLineGetFrontLeft
@ kLineGetFrontLeft
constant (1): front left line sensor
Definition: line.h:145
line_get
uint8_t line_get(eLineGet select)
Returns the last stored version of the selected value.
kRequestContinuous
@ kRequestContinuous
constant (3): request continuous updates
Definition: update.h:37
kLineSetEnable
@ kLineSetEnable
constant (kLineGetEnable): bitfield of enabled line sensor groups
Definition: line.h:169
uint16tostr
void uint16tostr(void *out, uint16_t number, uint8_t digits)
Converts an unsigned integer to a string and passes it to an output function.
lcdclr
void lcdclr(void)
Clears the display.
line_changed
eLineSelectMask line_changed(eLineSelectMask bitmask)
Indicates if new data changed the selected data blocks.
lcdxy
void lcdxy(uint8_t x, uint8_t y)
Moves the cursor to a postion on the display.
kLineGetFrontRight
@ kLineGetFrontRight
constant (3): front right line sensor
Definition: line.h:149
lcdstr_p
void lcdstr_p(const char *send_data)
Writes a string located in the flash to the display.
lcdout
void lcdout(uint8_t data)
Writes one byte to the display.
init_tucbot
void init_tucbot(uint8_t enable_interrupts)
Initiates the TUC-Bot.
mdelay
void mdelay(uint16_t mseconds)
Waits for the given time in milliseconds.
line_set
void line_set(eLineSet select, uint8_t value)
Sets the selected values of the line sensors.
kLineSelectFront
@ kLineSelectFront
Definition: line.h:122