精品导航

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.

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