精品导航

Types of blocks

There are a total of nine block types in CB. Each of them is represented by their color. Every block translates to code, which is then compiled and uploaded to the phone, just like on every Arduino based platform.

Pressing on every block type will open a section from which you can drag and drop those blocks into the drawing area.
Also, pressing on ‘More’ will open even more blocks that are not so commonly used.
There are two main functions of every Arduino code – void setup() and void loop().
Everything that goes into the void setup() the function will run only once. It is primarily used to start the software, initialize and declare variables, and run functions that only have to run once (ex., Intro screen in a video game).
The void loop() is where everything else takes place. It basically runs every bit of code inside it repeatedly (speed depends on the device – just imagine it’s ultra-fast!). It should pretty much follow the screen's refresh rate and make the program do things accordingly.
Every block you place automatically goes into the void loop() function.
If you wish to put something in the void setup(), you have to drag the main block from Functions and place your blocks inside as you wish, but more on that a little bit later.

Elliptical blocks

Elliptical blocks represent variables. Whether we’re talking about integers, strings, or other variable types (other than Boolean), they can all be recognized by the same shape.

Also, larger blocks with elliptical shapes return either integer or float values.

random image
random image


Whenever you find circular “holes” inside some blocks, you can insert variables. It’s most commonly found in comparison or action blocks.

Triangular blocks

Triangular blocks represent boolean variables. Both variables (true and false) and functions that return boolean values have the same shape.

random image
random image


Regardless of color, each of these blocks returns either true or false. Triangular “holes” require boolean blocks to be inserted.

Building blocks

Everything else is basically a building block. Those are functions that have no return value (they return null). Both elliptical and triangular blocks must first be placed inside the building blocks to act as part of the program.

They have a specific “puzzle” shape and can be stacked inside each other.

random image
random image


The main building block is located inside the ‘Functions’ section.
It basically gives you two main building blocks sections.
Everything placed inside Arduino runs first goes into void setup(), and everything placed inside Arduino loop forever goes into a void loop().

Inserting blocks

Now, this is the main part.
The whole point of blocks-like IDE is connecting blocks and placing them inside another.
It is all done by simple drag-and-drop action.
Here is an example of a program that will set the variable Var to 1 and then increase that variable while it is smaller than 10.
At the end of the program, Var will be 10.
This is just a simple example, and block-building will be further explained in the following chapters.

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