Go to Post My mom's cousin heard from her friend who heard from her brother who heard from his barber who heard from his son that his teacher told him that his father's brother's sister's former roommate heard from Frank himself. - notmattlythgoe [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 01-03-2007, 15:23
lrantisi lrantisi is offline
Registered User
no team
 
Join Date: Feb 2007
Location: Canada
Posts: 2
lrantisi is an unknown quantity at this point
Wink Re: C code to get information from CMUcam2

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
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 19:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi