Society of Robots - Robot Forum
Software => Software => Topic started by: spizzak on July 12, 2009, 03:46:25 PM
-
Hey everyone, I'm trying to troubleshoot my system and was wondering if there is anyway to have the robot send data back to the computer while its running
For example what I'm thinking of doing for my $50 robot is to have the photoresistors send back the readings to the computer so I can actively monitor it as I move the robot around.
Also, is there a way to do print statements?
-
Ya using the printf() function along with uarts and hyperterminal... let me get you the links
read these in order!!
http://www.societyofrobots.com/microcontroller_uart.shtml (http://www.societyofrobots.com/microcontroller_uart.shtml)
http://www.societyofrobots.com/programming_printf.shtml (http://www.societyofrobots.com/programming_printf.shtml)
http://www.societyofrobots.com/microcontroller_uart_50_robot.shtml (http://www.societyofrobots.com/microcontroller_uart_50_robot.shtml)
-
So where is it supposed to display when I call the printf?
-
it will display it in hyperterminal. start>all programs>accessories>communication>hyperterminal.
you will need to make/buy an RS232 shifter so you can connect your mcu to a usb or serial connection.
like one of these http://www.sparkfun.com/commerce/product_info.php?products_id=133 (http://www.sparkfun.com/commerce/product_info.php?products_id=133)
(http://www.sparkfun.com/commerce/images/products/Shifter-0.jpg)
-
or bluetooth i you want to spend the money (and chicks dig wireless ;) )
-
As it has been said read the SoR tutorials.
I had trouble understanding all the various printing libraries and commands and how to choose and why. So here is my 2cents.
The rprintf command recommended in the tutorial is my choice. It stands for ReducedPrintFormated. The more common printf command is designed to everything including printing the kitchen sink. rprintf is geared towards the microprocessor with smaller memory use and a little less power. I have never needed more power than it provides.
rprintf is part of the avrlib library set.
I have another post on trying to get rprintf to work with an LCD (which I am told works)
Kirk