Returns the state of the button A on the micro device as either true or false.
The state of button A is checked in an IF block, and a text message is displayed. If button A is pressed, "A pressed" is displayed, else "A not pressed".
Returns the state of the button B on the micro device as either true or false.
See button A example above.
Returns milliseconds passed since the micro device was connected to the USB port (starting from 0ms),
The timer increments regardless of the program start/stop status. To get a zero start point, use the reset timer block.
The program timer is reset. Then the program displays the timer amount after a certain amount of waiting.
Resets the program timer to zero.
See timer example above.
Returns seconds since the device was powered up or reset.
The seconds increment regardless of the program start/stop status. To get a duration, save the starting value and subtract it from the ending value.
The clock wraps around to zero when it reaches 1073741823 (2^30), about 298261 hours, 37 minutes and 3 seconds..
Program calculates the duration of 1,000,000 additions using timer, seconds, milliseconds and microseconds blocks.
Returns milliseconds since the device was powered up or reset.
The milliseconds increment regardless of the program start/stop status. To get a duration, save the starting value and subtract it from the ending value.
The clock wraps around to zero when it reaches 1073741823 (2^30), about 17896 minutes and 18.2 seconds.
Program calculates the duration of 1,000,000 additions using timer, seconds, milliseconds and microseconds blocks.
Returns microseconds since the device was powered up or reset.
The microseconds increment regardless of the program start/stop status. To get a duration, save the starting value and subtract it from the ending value.
The clock wraps around to zero when it reaches 1073741823, about 17 minutes and 53 seconds.
Program calculates the duration of 1,000,000 additions using timer, seconds, milliseconds and microseconds blocks.
returns the type of the micro device connected to the USB port.
Supported board types as of microBlocks v1.0.8.
Program display the type of micro device it is running on.
Returns TRUE/FALSE depending on if the microcontroller is connected to the IDE or not.
Returns the firmware version loaded on the microcontroller.
For the microcontrollers that support BLE, it returns the 3-letter code used as BLE-id. This code differentiates different BLE-capable microcontrollers used in the projects, and is assigned automatically by MicroBlocks. It will show up in the Connection port scan of the PC and serves as the BLE Name for the device.
Returns milliseconds since the given starting time (in milliseconds).
The optional parameter end time lets one calculate the time difference between two points in time.
Returns microseconds since the given starting time (in microseconds).
The optional parameter end time lets one calculate the time difference between two points in time.
Note: Time difference shown is a bit more than the actual value of 1000 micros, due to the processing time involved with the say block.