senseBox Blockly
senseBox-Logo
  1. ›
  2. Galerie

  3. ›
  4. Personenzähler

Sensors
LED
RGB LED
LED Matrix
Display
Data transmission
WIFI
openSenseMap
LoRa
Aktivierung
Lora Message
TTN Mapper
Bluetooth
Phyphox
ESPNOW
SD
Text
Logic
Loops
Time
Time control
RTC
NTP
Math
Variables
Custom Functions
QOOOL
Advanced
Serial
Input/Output
Motors
Watchdog
Webserver
MQTT
Ethernet
Audio
Initialize DisplayUltrasonic distance sensor at PortA â–¾TriggerA1 â–¾EchoA2 â–¾Max distance250cmintdistanz â–¾intpersonen â–¾Show Text/NumberFont colorWhite â–¾Fontsize1x-Coordinates0y-Coordinates10ValueShow Text/NumberFont colorWhite â–¾Fontsize1x-Coordinates0y-Coordinates0Valueintdistanz â–¾40< â–¾booleangesperrt â–¾false â–¾= â–¾and â–¾1true â–¾setbooleangesperrt â–¾toincrease â–¾personen â–¾byintdistanz â–¾40> â–¾booleangesperrt â–¾true â–¾= â–¾and â–¾false â–¾setbooleangesperrt â–¾toifdoifdoPrint on displaysetintdistanz â–¾toSetup()Loop()
1113000100500100500100TitleUnitTitleUnit01505050150000000latitudelongitudealtitudepDOPfixTypeDataDataDataDateiname1011011000100000000010119701110011003010090220
{ }

Arduino Source Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Code generated by senseBox Blockly on Thu Mar 05 2026 19:19:44 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 <NewPing.h> // http://librarymanager/All#NewPing
#define TRIGGER_PIN_IO1_2 1
#define ECHO_PIN_IO1_2 2
#define MAX_DISTANCE_IO1_2 250
int distanz;
boolean gesperrt;
<>

XML Blocks

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<xml xmlns="https://developers.google.com/blockly/xml" board="null">
  <variables>
    <variable type="int" id=";]ot-#[]LRp):y0u|T{/">distanz</variable>
    <variable type="int" id="SG[@p[S263maX)D)~;}H">personen</variable>
    <variable type="boolean" id="9lWlN7$Z?$?okz=d8Z4d">gesperrt</variable>
  </variables>
  <block type="arduino_functions" id="QWW|$jB8+*EL;}|#uA" deletable="false" x="27" y="16">
    <statement name="SETUP_FUNC">
      <block type="sensebox_display_beginDisplay" id="fg!ZevH4#`OjwKrJf;Cf"></block>
    </statement>
    <statement name="LOOP_FUNC">
      <block type="variables_set_dynamic" id="-=YI@{~P)QG[n(HY$PJI">
        <field name="VAR" id=";]ot-#[]LRp):y0u|T{/" variabletype="int">distanz</field>
        <value name="VALUE">
          <block type="sensebox_sensor_ultrasonic_ranger" id="~NyjjEU35tBdsVI(*L0C">
            <mutation xmlns="http://www.w3.org/1999/xhtml" port="IO1_2"></mutation>
            <field name="port">IO1_2</field>

Information about the Block

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