external push button

Hi,

Is there a way to interface a push button to the board? I am going to
perform a software action when the button is pressed. I am planning on
using the expansion connector on the board. How do I access the button
through software? I will be using Python on an Angstrom build.

I would appreciate any response.

You can use the user button for this purpose. Just map the pin connected to the user button as a GPIO pin.

Gerald

I cant use the user button because the button must be a few inches
above the board. I guess my question is more general, how do I access
the gpio pin in a high level language such as python. I understand how
to do it in assembly.

You can wire a switch into the expansion connector and mount it anywhere you like. There are several GPIO pins for use there.

As to the python issue I will let the SW folks chime in on this… I am what you might call the HW guy.

Gerald

You can wire a switch into the expansion connector and mount it anywhere you
like. There are several GPIO pins for use there.

As to the python issue I will let the SW folks chime in on this.. I am what
you might call the HW guy.

Gerald

You can use the GPIO button facility in the kernel. Then the button will
appear as a /dev/input/eventX device to all userland apps. If you using the
linux-omap kernel, look in arch/arm/mach-omap2/board-omap3beagle.c. The
user button is defined as a gpio_key_button already. Just make sure you have
the pin mux configured as a GPIO and you should be set.

Thanks!
Are distributions, such as Angstrom, built on the linux-omap kernal?
How do I find out? Should I simply search for arch/arm/mach-omap2/
board-omap3beagle.c? If its not built on the linux-omap kernal? How do
I load that file onto the beagleboard?

Thanks!
Are distributions, such as Angstrom, built on the linux-omap kernal?
How do I find out? Should I simply search for arch/arm/mach-omap2/
board-omap3beagle.c? If its not built on the linux-omap kernal? How do
I load that file onto the beagleboard?

I think Angstrom uses a linux-omap kernel with patches. You can just
look to see if the userbutton is defined in that file. If it is not
there, you can add it. Just be sure to enable support for GPIO keys in
your kernel config.GPIO keys should have been in the mainline kernel for
a while now.

Thanks!

> Are distributions, such as Angstrom, built on the linux-omap kernal?
> How do I find out? Should I simply search for arch/arm/mach-omap2/
> board-omap3beagle.c? If its not built on the linux-omap kernal? How do
> I load that file onto the beagleboard?
>
I think Angstrom uses a linux-omap kernel with patches. You can just
look to see if the userbutton is defined in that file. If it is not
there, you can add it. Just be sure to enable support for GPIO keys in
your kernel config.GPIO keys should have been in the mainline kernel for
a while now.

>
>>
>>> You can wire a switch into the expansion connector and mount it
anywhere you
>>> like. There are several GPIO pins for use there.
>>> As to the python issue I will let the SW folks chime in on this.. I
am what
>>> you might call the HW guy.
>>> Gerald
>> You can use the GPIO button facility in the kernel. Then the button will
>> appear as a /dev/input/eventX device to all userland apps. If you
using the
>> linux-omap kernel, look in arch/arm/mach-omap2/board-omap3beagle.c. The
>> user button is defined as a gpio_key_button already. Just make sure
you have
>> the pin mux configured as a GPIO and you should be set.
>>
>>
>>
>>
>>
>>>> I cant use the user button because the button must be a few inches
>>>> above the board. I guess my question is more general, how do I access
>>>> the gpio pin in a high level language such as python. I understand how
>>>> to do it in assembly.
>>>>> You can use the user button for this purpose. Just map the pin
connected
>>>> to
>>>>> the user button as a GPIO pin.
>>>>> Gerald
>>>>>> Hi,
>>>>>> Is there a way to interface a push button to the board? I am
going to
>>>>>> perform a software action when the button is pressed. I am
planning on
>>>>>> using the expansion connector on the board. How do I access the
button

noob question: where is the "arch" directory?