精品导航

Pressing the buttons

Pressing the buttons

Nibble has 7 main clickable buttons, 1 reset button, and 1 power switch. It's quite simple - you press the button and something happens.
Only the main 7 buttons are programmable, while the remaining two always have the same function.
The buttons have tiny white text next to them so you know which is which.
On the left side of the console there are directional buttons and the menu button, while on the right side A and B buttons.
We're going to focus here on using the functions of drawing on the screen, but this time we're controlling it with a simple press of a button.
This gives us much more flexibility and dramatically improves the possibilities of a program. Before we begin, add the "begin nibble variant" block:


This program is really simple - it changes the color of the screen and writes a simple text when a button has been pressed.
The screen color and the text are different depending on the button that has been pressed.
The system that is used on Nibble is called the callback system, meaning that the button presses are small events that trigger whenever a button press has been detected.
That way there is no checking whether the button has been pressed or not in the loop section, but rather only when a button has been pressed a button press function is called. Remember to include the "Time" block inside these buttons to specify how much time will pass between each action.

Another thing you must never forget while using the buttons, is to include the "Scan buttons" inside the "Loop forever" block to ensure that your buttons are being scanned at all times.

Holding the buttons and multiple functions

Now we go a bit more advanced.
Besides activating the button on press and release, you can also activate it after holding it down for a certain amount of time.
Firstly, we fill the frame with white.

Then, we look for the "When button pressed/released" blocks and drag it into the drawing section.

What will happen when a certain event is triggered, the display will change the color.

Also, don't forget to include the "Scan buttons" block at the end.

Click the Run button and check it out.



If you want to put the stock firmware back onto your device, you can click the Restore firmware button in the top right corner on CircuitBlocks.

友情链接:蘑菇影视 | 蘑菇网页版入口 | 色婷婷 | 福利精品 | 龙物视频 | 久久视频 | 福利盒子 | 青青伊人 | 玖玖资源站 | 色妞 | 蘑菇tv网页版 | zhuoyemall.com | 天堂在线 | 五月丁香 | 伊人色 | tissu-premier.com | 小蓝视频 | sanzhucare-zhpg.com | mogus.cc | 日本高清 | 六月婷婷 | 琵琶妞 | 樱花视频 | 秋霞网 | 久久爱 | 宅男影院 | mogu | 久久久久久 | 蘑菇短视频入口 | 永久网站 | 在线午夜 | 色啪 | 蘑菇视频ios | woqidz.com | tsxhyq.com | 番号网 | 蘑菇視頻 | 四虎影视 | 蘑菇网 | 酒色世界 | 摩天轮社区 | 小草社区 | 超碰视频 | dk99999.com | 天天综合 | 蘑菇视频网站 | 红桃视频 | 老王影院 | 4008108885.com | 蓝色导航 | 第一福利 | 永久地址 | mogu视频 | jxty00.com | 秋霞影院 | 蘑菇传媒在线观看 | 午夜在线观看 | 资源导航 | 青草青青 | 导航大全 | 蘑菇在线观看网页版 | 汤姆影院 | 久久香蕉 | 蜜芽视频 | 迷妹网 | zpzb2008.com | 屁屁影院 | 精品免费 | 最新av | btupic.com | gzdksw.com | 亚洲精品 | rencai98.com | 亚洲网 | hebeijiaoyuwang.com | 青草草 | 在线亚洲 | 蘑菇传媒 | 协和影院 | 扒哥黑料 | 无名网 | 五福影院 | 蘑菇视频入口 | 性知音 | 蘑菇app | 欧美午夜 | 玖玖爱 | 老司机视频 | mogutv | 草莓视 | bt搜索 | lf397.com | 综合影院 | p站视频 | dna0126.com | 琳琅导航 | fltou.com | 青娱 | 看片神器