senseBox Blockly
senseBox-Logo
  1. ›
  2. Galerie

  3. ›
  4. Intelligente Straßenbeleuchtung

Intelligente Straßenbeleuchtung

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
301Initialise RGB LED (WS2818)Port:A ▾BrightnessNumberInitialize DisplayBeleuchtungsstärke:  Light Visible + UVValue:Illuminance in Lux ▾LuxDistanzToF Distance ImagerValue:Closest distance in cm ▾cmShow MeasurementsTitleValueUnitTitleValueUnitLight Visible + UVValue:Illuminance in Lux ▾10< ▾ToF Distance ImagerValue:Closest distance in cm ▾200< ▾and ▾0Set RGB-LED atPort:A ▾PositionColor0Set RGB-LED atPort:A ▾PositionColorifdoelseClear DisplayPrint on displayArduino 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 Thu May 29 2025 06:16:29 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 <Adafruit_NeoPixel.h>
#include <LTR329.h>
#include <vl53l8cx.h>
VL53L8CX sensor_vl53l8cx(&Wire, -1, -1);
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
Adafruit_NeoPixel rgb_led_1= Adafruit_NeoPixel(1, 1,NEO_GRB + NEO_KHZ800);
bool lightsensortype = 0; //0 for tsl - 1 for ltr
//settings for LTR sensor
LTR329 LTR;
unsigned char gain = 1;
unsigned char integrationTime = 0;
unsigned char measurementRate = 3;
int read_reg(byte address, uint8_t reg)
{
<>
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">
  <block type="arduino_functions" id="QWW|$jB8+*EL;}|#uA" deletable="false" x="-53" y="-390">
    <data>esp32</data>
    <statement name="SETUP_FUNC">
      <block type="sensebox_display_beginDisplay" id="=g/S4:/Ks^ZL[7Ebv~?G">
        <next>
          <block type="sensebox_ws2818_led_init" id="I$5$l0jTW*{qX;:Uk)af">
            <field name="Port">1</field>
            <value name="BRIGHTNESS">
              <block type="math_number" id="Vq:SJK)#5b;3?_UVsZ7h">
                <field name="NUM">30</field>
              </block>
            </value>
            <value name="NUMBER">
              <block type="math_number" id=")G-8v5ES=h]JcqfaGtEW">
                <field name="NUM">1</field>
              </block>
            </value>
          </block>
        </next>
      </block>
    </statement>
    <statement name="LOOP_FUNC">
      <block type="sensebox_display_show" id="D(h;%Y?,:|qyrmujnUxg">
        <statement name="SHOW">
          <block type="sensebox_display_fastPrint" id="16nmTr#w}xB@UHYyPcY!">
            <value name="Title1">
              <block type="text" id="an1QU6LbXZ0{oP0[e|uY">
                <field name="TEXT">Beleuchtungsstärke:  </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