精品导航

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.

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