|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#4
|
|||
|
|||
|
Thanks for your reply
But what do you think about this code, any notes please. Code:
/* A simple program that sends an order to the CMUcam2 camera and
reads back from it*/
:confused: :rolleyes: :]
#include <stdio.h>
#include <string.h>
int main ()
{
FILE* fp;
char prompt = 0;
int Written_Char;
fp = fopen ("/dev/uart1", "r+"); //Open the camera port for reading and writing.
if (fp)
{
Written_Char = fputc(":TC\r",fp); // writing a character to the UART.
prompt = getc(fp); // Get a character from the UART.
fprintf(fp, "Closing the UART file.\n");
fclose (fp);
}
return 0;
}
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2007 CMUcam2 Code | Kevin Watson | Programming | 6 | 10-01-2009 14:06 |
| 2006 CMUcam2 Code | Kevin Watson | Programming | 81 | 10-02-2007 20:17 |
| CMUcam2 code for EDU-RC? | Calvin | Programming | 19 | 27-01-2006 10:41 |
| CMUCam2 code (FRC and EDU?) | Amber | Programming | 0 | 15-02-2005 22:23 |
| Where is the CMUcam2 code? | Matthew_H | Programming | 1 | 14-01-2005 17:49 |