1953 views|6 replies

1453

Posts

1

Resources
The OP
 

[Raspberry Pi Pico Review] How to use the buttons [Copy link]

This post was last edited by jinglixixi on 2021-4-15 20:21

A button is a commonly used input device, and its usage is divided into two categories, namely query mode and interrupt mode.

Since the small Raspberry Pi development board does not have any buttons for users to use, a touch button at hand is used. The connection method is shown in Figure 1.

Figure 1 Button connection diagram

1. Interrupt mode

In order to verify the interrupt mode, the print statement can be called in interrupt mode to output the corresponding information when the key is touched. The program content and running results are shown in Figure 2.

Figure 2 Program and running results

2. Query method

In the query mode, the corresponding output can be controlled by using the keys. The program content and running results are shown in Figures 3 and 4.

Figure 3 Program content

Figure 4: Operation results

This post is from DIY/Open Source Hardware

Latest reply

You have so many modules.   Details Published on 2021-4-16 21:06
 

6555

Posts

0

Resources
2
 

After learning how to use the buttons, what are you going to play next?

This post is from DIY/Open Source Hardware

Comments

I'm working on an OLED screen display, but it's been a bit of a bummer because I lack the corresponding library file. If possible, write one yourself.  Details Published on 2021-4-16 00:08
 
 

1453

Posts

1

Resources
3
 
This post was last edited by jinglixixi on 2021-4-16 20:49
Jacktang posted on 2021-4-15 21:26After finishing the use of the buttons, what are you going to play next?

I'm working on an OLED screen display, but it doesn't seem to work because I'm missing the corresponding library file. If possible, I'd like to write a function myself to make one.

This post is from DIY/Open Source Hardware
 
 
 

2w

Posts

74

Resources
4
 

Small button with big use, good, good

This post is from DIY/Open Source Hardware
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Comments

Indeed, there is no detailed introduction in the relevant tutorials.  Details Published on 2021-4-16 10:07
Personal signature

加油!在电子行业默默贡献自己的力量!:)

 
 
 

1453

Posts

1

Resources
5
 
soso posted on 2021-4-16 09:17 Small button with big uses, not bad

Indeed, there is no detailed introduction in the relevant tutorials.

This post is from DIY/Open Source Hardware
 
 
 

1237

Posts

66

Resources
6
 

You have so many modules.

This post is from DIY/Open Source Hardware

Comments

They are all small toys, and some higher-end ones will be placed in the back.  Details Published on 2021-4-16 21:22
 
 
 

1453

Posts

1

Resources
7
 
dql2016 posted on 2021-4-16 21:06 You have so many modules

They are all small toys, and some higher-end ones will be placed in the back.

This post is from DIY/Open Source Hardware
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list