senseBox Blockly
senseBox-Logo
  1. ›
  2. Galerie

  3. ›
  4. Geh auf Punktefang

Geh auf Punktefang

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
Initialize Display10118random integer fromto1054random integer fromtoAccelerometerDirectionY-Axis ▾Range2g ▾100× ▾-1001000128Map Valuefrom Minfrom Maxto Minto MaxAccelerometerDirectionX-Axis ▾Range2g ▾100× ▾-100100064Map Valuefrom Minfrom Maxto Minto MaxfloatMapX ▾floatMapY ▾3floatrandomX ▾floatrandomY ▾3Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓Draw Pointx-Coordinatesy-CoordinatesRadiusfilled✓floatMapX ▾floatrandomX ▾= ▾floatMapY ▾floatrandomY ▾= ▾and ▾10118random integer fromto1054random integer fromto1increase ▾catched ▾bysetfloatrandomY ▾tosetfloatrandomX ▾toSpiel beendet!Gefangen:intcatched ▾create text withShow Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates10ValueShow Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates0Valuewait forever (end program)Print on displayClear DisplayInterval: Interval60000msifdoClear DisplayPrint on displaysetfloatMapY ▾tosetfloatMapX ▾tosetfloatrandomY ▾tosetfloatrandomX ▾toArduino 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 Sun Jun 29 2025 09:44:02 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 <BMX055.h>
float randomX;
float randomY;
float MapX;
float MapY;
const long intervalInterval = 60000;
long time_startInterval = 0;
long time_actualInterval = 0;
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
BMX055 bmx;
int mathRandomInt (int min, int max) {
<>
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="float" id="d7(eUDp8#DV`wxi#Rjo-">randomX</variable>
    <variable type="float" id="BM=[AY?BNE!OxOdfD{Hy">randomY</variable>
    <variable type="float" id="?8f#@xrcwoU?Oi,hb(y-">MapX</variable>
    <variable type="float" id="ED*j~CAq%At[M)7]ZV.J">MapY</variable>
    <variable type="int" id=")eo%cNkhn?:s2e]1ukDW">catched</variable>
  </variables>
  <block type="arduino_functions" id="5KebY,-ltvxB7K^El}1(" x="-129" y="-432">
    <statement name="SETUP_FUNC">
      <block type="sensebox_display_beginDisplay" id="0iM}3@}`(82BjkzM/(M6"></block>
    </statement>
    <statement name="LOOP_FUNC">
      <block type="variables_set_dynamic" id="$b|,qUH|~j9r~wRydoJw">
        <field name="VAR" id="d7(eUDp8#DV`wxi#Rjo-" variabletype="float">randomX</field>
        <value name="VALUE">
          <block type="math_random_int" id="GDX8QIYyB:pd3j-zW7:]">
            <value name="FROM">
              <block type="math_number" id="SNQl+FM+urC68/_4-z^L">
                <field name="NUM">10</field>
              </block>
            </value>
            <value name="TO">
              <block type="math_number" id="y0)QLx0L8MTv%w1+keLB">
                <field name="NUM">118</field>
              </block>
            </value>
          </block>
        </value>
        <next>
          <block type="variables_set_dynamic" id="UAl0F#?i~@!m#.%y4-yh">

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