View Single Post
Old 04-06-2008, 04:50 AM   #3 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location:
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 157
Thanked 266 Times in 209 Posts
simple buttons?

Also want to look into simple to make touch sensitive switches: http://www.bytecraft.com/Touch_Sensitive_Switch


Code:
char touch_switch (void)   {
  pb_direction = output;
  pb.0 = 0;    // Discharge the pin     
  delay_Ms(1);          // Wait
  pb_direction = input; // Turn on the Constant current source     
  delay_Us(5);          // Wait for 5 u_seconds     
  if (pb.0 == 1) return (0);         // No touch detected     
  else return (1);         // Touch detected   
}
Ok, I'm going back to the palmpilot stuff. Just had to get all that out before I left atmega land for a while.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote