#include <tucbot/tucbot.h>
void testServo(void);
int main(void);
void testServo(void) {
int8_t pos = 0;
lcdstr_p(PSTR(
"###" "\xDF" " <+> <-> "));
while (1) {
if (pos < 70) {
pos++;
}
if (pos > -70) {
pos--;
}
}
}
}
int main (void) {
testServo();
return (0);
}
void leds_set(eLedMask bitmask, uint8_t bool)
Sets the selected leds on or off.
@ kLedOn
constant (0xFF): turn leds on
Definition: leds.h:63
@ kLedRight
bit mask (0x04): right led
Definition: leds.h:46
void servo_set(int8_t pos)
Sets the servo to the given position in degrees.
void int16tostr(void *out, int16_t number, uint8_t digits)
Converts an integer to a string and passes it to an output function.
@ kRequestContinuous
constant (3): request continuous updates
Definition: update.h:37
@ kLedMiddle
bit mask (0x08): middle led
Definition: leds.h:44
@ kLedOff
constant (0x00): turn leds off
Definition: leds.h:61
void lcdclr(void)
Clears the display.
void lcdxy(uint8_t x, uint8_t y)
Moves the cursor to a postion on the display.
void lcdstr_p(const char *send_data)
Writes a string located in the flash to the display.
void lcdout(uint8_t data)
Writes one byte to the display.
void init_tucbot(uint8_t enable_interrupts)
Initiates the TUC-Bot.
void mdelay(uint16_t mseconds)
Waits for the given time in milliseconds.