senseBox Blockly
senseBox-Logo
  1. ›
  2. Galerie

  3. ›
  4. Würfel

Würfel

Sensors
WIFI
ESPNOW
Ethernet
SD
LED
LED Matrix
Display
openSenseMap
LoRa
Aktivierung
Lora Message
TTN Mapper
Cayenne LPP
Bluetooth
Phyphox
Webserver
MQTT
Logic
Loops
Text
Time
Time control
RTC
NTP
Math
Audio
Variables
Functions
Advanced
Serial
Input/Output
Motors
Watchdog
senseBox WuerfelBetätige den Button.Show Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates40ValueShow Text/NumberFont colorWhite ▾Fontsize2x-Coordinates0y-Coordinates0ValuePrint on displayInitialize DisplayButtonis Pressed ▾Pin:on Board ▾16random integer fromto300intZufallszahl ▾1= ▾342606064323Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Rectanglex-Coordinatesy-CoordinatesWidthHeightfilled✓Print on displayClear DisplayintZufallszahl ▾2= ▾34260604917379473Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Rectanglex-Coordinatesy-CoordinatesWidthHeightfilled✓Print on displayClear DisplayintZufallszahl ▾3= ▾3426060491736432379473Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Rectanglex-Coordinatesy-CoordinatesWidthHeightfilled✓Print on displayClear DisplayintZufallszahl ▾4= ▾342606049173791734947379473Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Rectanglex-Coordinatesy-CoordinatesWidthHeightfilled✓Print on displayClear DisplayintZufallszahl ▾5= ▾34260604917379173643234947379473Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Rectanglex-Coordinatesy-CoordinatesWidthHeightfilled✓Print on displayClear DisplayintZufallszahl ▾6= ▾3426060491737917349323793234947379473Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Rectanglex-Coordinatesy-CoordinatesWidthHeightfilled✓Print on displayClear Displayifdoelse ifdoelse ifdoelse ifdoelse ifdoelse ifdowaitmillisecondssetintZufallszahl ▾toifdoArduino run first:Arduino loop forever:
1113000100500100500100TitleUnitTitleUnit01505050150000000latitudelongitudealtitudepDOPfixType10110110001000000000101197011100110022010090
{ }
Arduino Source Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Code generated by senseBox Blockly on Fri May 30 2025 09:15:39 GMT+0000 (Coordinated Universal Time)
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h> // http://librarymanager/All#Adafruit_GFX_Library
#include <Adafruit_SSD1306.h> // http://librarymanager/All#Adafruit_SSD1306
#include <JC_Button.h> // http://librarymanager/All#JC_Button
int Zufallszahl;
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
Button button_0(0);
int mathRandomInt (int min, int max) {
  if (min > max) {
    int temp = min;
    min = max;
    max = temp;
  }
  return min + (rand() % (max - min + 1));
}
void setup() {
<>
XML Blocks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<xml xmlns="https://developers.google.com/blockly/xml" board="null">
  <variables>
    <variable type="int" id="P==Xuf1.;p_|1N|@Ol62">Zufallszahl</variable>
  </variables>
  <block type="arduino_functions" id="5KebY,-ltvxB7K^El}1(" x="-493" y="-3078">
    <statement name="SETUP_FUNC">
      <block type="sensebox_display_beginDisplay" id="#6-w|szo36LFC4H%1nY7">
        <next>
          <block type="sensebox_display_show" id="*wvdS5:alSO5hX;8tZ#X">
            <statement name="SHOW">
              <block type="sensebox_display_printDisplay" id="|hi2A`.7eNL}SM9mw/VO">
                <field name="COLOR">WHITE,BLACK</field>
                <field name="SIZE">2</field>
                <field name="X">0</field>
                <field name="Y">0</field>
                <value name="printDisplay">
                  <block type="text" id="EDyznp0kU?Qs=^7S1R.V">
                    <field name="TEXT">senseBox Wuerfel</field>
                  </block>
                </value>
                <next>
                  <block type="sensebox_display_printDisplay" id="vg}z|2a}ndb#2Ax8b[lU">
                    <field name="COLOR">WHITE,BLACK</field>
                    <field name="SIZE">1</field>
                    <field name="X">0</field>
                    <field name="Y">40</field>
                    <value name="printDisplay">
                      <block type="text" id="tNAiuh`kC^VLu(.~K){;">
                        <field name="TEXT">Betätige den Button.</field>
                      </block>
                    </value>

Information about the Block

Select a Block to show the hint

This website uses cookies to enhance the user experience.
Impressum

|

Privacy

|

News

|

sensebox.de
Menu
    Blockly
    Tutorials
    Gallery
    Code Editor

    Login
    FAQ
    Settings

Which board are you using?

senseBox MCU

senseBox MCU-S2

senseBox MCU:mini

Here you can access the old blockly Version for the Arduino UNO or the senseBox MCU