Go to Post I'll toss this out to stir up the pot: if you need double precision floats for your FRC software, you should re-think what you're doing. - Ether [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
  #1   Spotlight this post!  
Unread 23-01-2008, 00:07
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Does reading from the serial port work?

With a fresh crop of beginning programmers on our team this year, we decided EasyC was what we'd use. Alas, a lot of my accumulated tools and tricks didn't quite make the transition, and I'm trying to reimplement a few of them.

Specifically, I want to implement something like the menus in Kevin Watson's "Bells & Whistles" camera code last year. I've found references to ReadSerialPortOne() and tried to use it, but it doesn't seem to work. Here's the code I put in a fresh OperatorControl function:
Code:
unsigned char keypress;
keypress = ReadSerialPortOne();
if (keypress != 0)
{
   WriteSerialPortOne(keypress);
}
I expect that to echo anything I type at the terminal. What I get is nothing. I've tried HyperTerminal instead of the EasyC Pro Terminal window, with no change. I know the terminal itself is working, as I can see the IFI> prompt show up when I reset the Robot Controller. I have the RC and OI tethered. While trying to figure out what wasn't working, I added a timer and called WriteSerialPortOne(65) every 100 milliseconds, and saw an "A" show up ten times a second, so I know the code is running.

What am I doing wrong?
 


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
No Serial Port G1279 Programming 5 10-01-2008 15:15
Programming the vex microcontroller to respond to commands on the serial port crashoverride02 Programming 1 20-10-2006 14:17
Scripting Setup and the Camera + Serial Port Drivers CJO Programming 22 11-01-2006 17:42
Programming Vex Starter Kit To Recieve From Serial Port firetrap FIRST Tech Challenge 0 26-09-2005 17:27
TTL port to a serial port on a demo board ImmortalAres Programming 16 09-07-2005 23:44


All times are GMT -5. The time now is 22:01.

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