Butterfly Joystick

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm working on a project using the AVR Butterfly board. I want to push buttons on the joystick and turn on outputs while displaying data on the LCD.

I just need a driver I can understand.

Smiley Micros provides a bunch of code in Chapter 7, and I can't figure out what I need from it or how to use it.

Also, Atmel has button.c, but it calls up a dozen other source files.

Anyone have any advice or a simpler driver? Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The most common method is just to poll the value of the pins at a regular interval. If the value of pin remains the same for, say, 8 of those intervals, then consider the pin to be at that value. You just need to have the size of the interval that matches the characteristics of the switch. Something in the range of 1-10ms should be good.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe these will help.

Smiley

Attachment(s):