To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 2927
2926  |  2928
Subject: 
average_sensor
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 1 Nov 1997 18:19:41 GMT
Original-From: 
Terry P. Gathright <669@worldnet&antispam&.att.net>
Reply-To: 
669@POSTOFFICEspamcake.WORLDNET.ATT.NET
Viewed: 
1316 times
  
Could someone please show me how to use this function by example, It
will load but I don't know what to ask when trying to use.
This example is on page 22 of the IC manual for the handy board.
Thanks in advance.    Terry Gathright

void average_sensor(int port, int *result)
{

int sum= 0;
int i;


for (i= 0; i< 10; i++) sum += analog(port);


*result=  sum/10;

       }



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR