84 int LCDSetPrintf(
int row,
int column,
const char *format, ...);
146 int LCDMenu(
char *st1,
char *st2,
char *st3,
char *st4);
221 int LCDArea(
int x1,
int y1,
int x2,
int y2,
COLOR col,
int fill);
600 TASK
MTSpawn(
void* (*fct) (
void*),
int id);
675 int OSSetTime(
int hrs,
int mins,
int secs);
685 int OSGetTime(
int *hrs,
int *mins,
int *secs,
int *ticks);
708 int SERInit(
int interface,
int baud,
int handshake);
725 int SERSend(
int interface,
char *buf);
784 int AUTone(
int freq,
int time);
913 int MOTORPID(
int motor,
int p,
int i,
int d);
974 int VWGetSpeed(
int *linSspeed,
int *angSpeed);
1002 int VWControl(
int Vv,
int Tv,
int Vw,
int Tw);
1024 int VWTurn(
int angle,
int ang_speed);
1033 int VWCurve(
int dist,
int angle,
int lin_speed);
1042 int VWDrive(
int dx,
int dy,
int lin_speed);
int RADIOReceive(int *id_no, BYTE *buf, int *size)
Read num. of bytes from ID source.
void IPCol2Gray(BYTE *imgIn, BYTE *grayOut)
Transfer color to gray image.
int MTKill(TASK t)
kills the task t
int MTSleep(int n)
sleeps for 10ms ie n/100s
int VWControl(int Vv, int Tv, int Vw, int Tw)
Set PI params. for v and w (typical 70 30 70 10)
void IPRGB2Col(BYTE *r, BYTE *g, BYTE *b, BYTE *imgOut)
Transfer grey to color (3-byte) image.
int VWDriveWait(void)
Blocks until the drive is complete.
int VWSetSpeed(int linSpeed, int angSpeed)
Sets the VW speed, angle.
COLOR LCDGetPixel(int x, int y)
Get the RGB color value of the pixel at (x,y) coordinate.
int VWGetSpeed(int *linSspeed, int *angSpeed)
Obtains the current speeds.
int KEYGetXY(int *x, int *y)
Blocking read for touch at any position, and returns the coordinates of the pressed position...
int SERSendChar(int interface, char ch)
Sends a single character to the given port handle.
int LCDImageSize(int t)
Specifies the size of subsequent LCDImage functions.
Defines types used for the EyeBot 7.
int SEMAInit(SEMA *sem, int val)
initialises the semaphores
void IPPCol2HSI(COLOR c, BYTE *h, BYTE *s, BYTE *i)
Transforms RGB to HSI (for one pixel)
int SERFlush(int interface)
flushes the port
int KEYGet(void)
Blocking read (and wait) for key press (returns KEY1..KEY4)
int IPReadFile(char *filename, BYTE *img)
Read PNM file, fill/crop if req.; return 0 for color, 1 for gray image.
int VWCurve(int dist, int angle, int lin_speed)
Turns the vehicle in a curve.
int LCDSetPrintf(int row, int column, const char *format,...)
LCDPrintf with text position specified.
int CAMGet(BYTE *buf)
Retrieve a camera frame into the provided buffer.
int OSMachineSpeed(void)
Inform the user how fast the processor runs.
int OSVersion(char *buf)
Returns string containing running RoBIOS version.
int OSMachineID(void)
Inform the user with which ID the Eyebot is titled.
int VWTurn(int angle, int ang_speed)
Turns the vehicle on the spot.
int OSMachineName(char *buf)
Inform the user with which name the Eyebot is titled.
int LCDLineInvert(int x1, int y1, int x2, int y2)
Draw a line from (x1,y1) to (x2,y2). The line pixels will invert the color of existing pixels...
int AUTone(int freq, int time)
Play tone with FREQ for time/100 sec.
int COLOR
Definition: types.h:109
int LCDImageBinary(BYTE *b)
Draws a binary [0..1] image to the LCD.
int AUCheckRecord(void)
Non-blocking check whether recording has finished.
int ANALOGRead(int channel)
Reads the analog channel on the IO board.
int IPWriteFileGray(char *filename, BYTE *gray)
Write greyscale PNM file.
int LCDImageGray(BYTE *g)
Draws a greyscale [0..255] image to the LCD.
void IPGray2Col(BYTE *imgIn, BYTE *colOut)
Transfer grey to color (3-byte) image.
int VWSetPosition(int x, int y, int phi)
Sets the position wrt current position.
int IRTVGetStatus(void)
Checks to see if IR input is enabled;.
int VWDriveDone(void)
Checks to see if the current drive is complete.
int AUPlay(BYTE *sample)
Play audio sample.
int LCDSetPos(int row, int column)
Set the text cursor position to (row, column).
int OSDetachTimer(TIMER t)
removes the Timer from the list
int IRTVRead(void)
Non-blocking read, return 0 if nothing and returns the keycode.
int VWControlOff(void)
Stop PI control for v and w.
int MOTORPID(int motor, int p, int i, int d)
Set the given motors with PID control.
int IPSetSize(int resolution)
Sets the size for the image processing (also automatically set by CAMInit).
void IPOverlay(BYTE *c1, BYTE *c2, BYTE *cOut)
Overlay c2 onto c1, all color images.
int LCDClear(void)
Clear the LCD display and all display buffers ie. turn it black.
int ENCODERRead(int quad)
Reads the value from the encoder.
int RADIOCheck(int *id_no)
Non-blocking check whether message is waiting.
int LCDSetFont(int font, int variation)
Sets the font using font type and variation.
int OSWait(int n)
Waits for 1 ms.
int MOTORSpeed(int motor, int ticks)
Sets the controlled motor speed in ticks/sec.
int CAMRelease(void)
Stops and releases all camera structures.
int OSSetTime(int hrs, int mins, int secs)
sets the system time
int LCDImage(BYTE *img)
Draws a colour (RGB) image to the LCD.
int PSDGet(int psd)
Delivers actual timestamp or distance measured by the selected PSD.
int LCDCircleInvert(int x1, int y1, int size)
Inverts the pixels inside of the given circle.
int SEMAUnlock(SEMA *sem)
unlocks the given semaphore
void IPLaplace(BYTE *grayIn, BYTE *grayOut)
apply Laplace tranform to the image
void IPCol2HSI(BYTE *img, BYTE *h, BYTE *s, BYTE *i)
Transfer color image to hue sat int.
int RADIOSend(int id_no, BYTE *buf, int size)
Send spec. number of bytes to ID destination.
int KEYRead(void)
Non-blocking read of key press (returns NOKEY=0 if no key)
int LCDAreaInvert(int x1, int y1, int x2, int y2)
Draw a rectangle with (x1,y1) as top-left coordinate and (x2,y2) as the bottom-right coordinate...
BYTE IPPRGB2Hue(BYTE r, BYTE g, BYTE b)
Convert RGB to hue (0 for gray values)
void IPOverlayGray(BYTE *g1, BYTE *g2, COLOR col, BYTE *cOut)
Overlay gray image g2 onto g1, using col.
int LCDMenuI(int pos, char *string, COLOR fg, COLOR bg)
Set specific menu entry in KEY_CLASSIC mode (index given by pos).
int VWDriveRemain(void)
Checks the remaining drive time.
int SERVORange(int servo, int low, int high)
Sets the range for the servos.
int AUCheckPlay(void)
Non-blocking test if playing has finished.
int DIGITALSetup(int io, char direction)
Sets up the digital input/output pins.
int IRTVGet(void)
Blocking read of IRTV command and returns the keycode.
int AURecord(BYTE *buf, int time, long freq)
Record sound for time/100sec using sample FREQ.
int LCDSetMode(int mode)
Update the internal mode flag bits.
int LCDImageStart(int x, int y, int xs, int ys)
Sets the location and size parameters for subsequent image draws.
int AUCheckTone(void)
Non-blocking test if tone has finished.
int MTGetUID(TASK t)
gets the ID of the taks
int LCDPixel(int x, int y, COLOR col)
Sets the color of the pixel at (x,y) coordinate to color.
int LCDSetFontSize(int fontsize)
Sets the font size.
int MOTORDrive(int motor, int speed)
Set the given motors to the same given speed dependant on hdt table.
int MTExit(void)
kills current task
int LCDLine(int x1, int y1, int x2, int y2, COLOR col)
Draw a color line from (x1,y1) to (x2,y2).
int SERClose(int interface)
closes the port
int AUBeep(void)
Play beep sound.
int LCDArea(int x1, int y1, int x2, int y2, COLOR col, int fill)
Draw a color-filled rectangle with (x1,y1) as top-left coordinate and (x2,y2) as the bottom-right coo...
int LCDPrintf(const char *format,...)
Print formatted string to LCD and refresh LCD. Cursor position is updated.
int RADIOStatus(int IDlist[])
Returns number of robots (incl. self) and list of IDs in network.
int SERSend(int interface, char *buf)
Sends a string to the given port handle.
int RADIOInit(void)
Starts radio communication between the Eyebots.
int TIMER
Definition: types.h:112
int VWStalled(void)
Checks to see if the vehicle is stalled.
int DIGITALWrite(int io, int state)
Writes to the digital input/output pins.
int SERReceive(int interface, char *buf)
Receives a string from port handle.
int OSMachineType(void)
Inform the user in which environment the program runs.
int AUMicrophone(void)
Return microphone A-to-D sample value.
int SERInit(int interface, int baud, int handshake)
Initialises the port.
int CAMInit(int resolution)
Initialises the camera.
COLOR IPPRGB2Col(BYTE r, BYTE g, BYTE b)
Transforms RGB to a COLOR (for one Pixel)
char SERReceiveChar(int interface)
Receives a single character from the given port handle.
char * OSExecute(char *command)
Executes a system command and obtains the string returned after the command.
int SERVOSet(int servo, int angle)
Set the given servos to the same given angle depending on table value.
int VWDrive(int dx, int dy, int lin_speed)
Turns the vehicle in a curve: x[mm] straight and y[mm] left, x>|y|.
int OSGetTime(int *hrs, int *mins, int *secs, int *ticks)
Get system time (ticks in 1/100 sec)
void IPPCol2RGB(COLOR col, BYTE *r, BYTE *g, BYTE *b)
Transforms COLOR to RGB (for one Pixel)
int PSDGetRaw(int psd)
Delivers raw-data measured by the selected PSD.
int MOTORDriveRaw(int motor, int speed)
Set the given motor to a given speed.
TIMER OSAttachTimer(int scale, void(*fct)(void))
adds a function to a 1kHz/scale timer, ie. executes every 1ms*scale usage: OSAttachTimer(<scale>, &<function>);
int LCDSetColor(COLOR fg, COLOR bg)
Set the default color for text (including background).
int KEYReadXY(int *x, int *y)
Non-blocking read for touch at any position, returns coordinates of pressed position.
void IPPRGB2HSI(BYTE r, BYTE g, BYTE b, BYTE *h, BYTE *s, BYTE *i)
Convert RGB to hue, sat, int; hue=0 for gray values.
int ANALOGVoltage(void)
Finds the Analog Voltage as read from the IO board.
int DIGITALRead(int io)
Reads the digital input/output pins.
int CAMGetGray(BYTE *buf)
Grabs a gray image off the camera.
int MOTORPIDOff(int motor)
Shuts off PID control.
void IPSobel(BYTE *imageIn, BYTE *imageOut)
apply Sobel tranform to the image
int LCDGetSize(int *x, int *y)
Get LCD resolution in pixels.
int DIGITALReadAll(void)
Reads all digital pins.
int LCDMenu(char *st1, char *st2, char *st3, char *st4)
Set menu entries in KEY_CLASSIC mode (4-buttons).
int LCDGetPos(int *row, int *column)
Get the text cursor position.
int ENCODERReset(int quad)
Resets the encoder to 0.
int LCDPixelInvert(int x, int y)
Bit-invert the color of the pixel at (x,y) coordinate.
char BYTE
Definition: types.h:110
int VWStraight(int dist, int lin_speed)
Drives straight.
int LCDCircle(int x1, int y1, int size, COLOR col, int fill)
Draws a circle.
int IRTVFlush(void)
Terminates the remote control decoder and releases the irtv thread.
int OSVersionIO(char *buf)
Gives the version of the IO board.
int RADIOGetID(void)
Get own radio ID.
int SEMALock(SEMA *sem)
locks the given semaphoe
int MTInit(void)
initialises the threads
int KEYWait(int key)
Wait for specific keys to be pressed. (use ANYKEY for any key)
int RADIORelease(void)
Terminate radio communication.
int LCDRefresh(void)
Refresh the screen. Refreshes the menu.
int VWGetPosition(int *x, int *y, int *phi)
Gets the position wrt original position.
int IPWriteFile(char *filename, BYTE *img)
Write color PNM file.
int OSGetCount(void)
gives you the count in 1/100 sec since the system start
int SERVOSetRaw(int servo, int angle)
Set the given servos to the same given angle in raw mode.
TASK MTSpawn(void *(*fct)(void *), int id)
Create and initialize thread with given ID.
bool SERCheck(int interface)
checks and flushes the port by sending enter until seeing prompt