senseBox Blockly
senseBox-Logo
  1. ›
  2. Galerie

  3. ›
  4. famed-parrot

famed-parrot

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
1001Initialize DisplayInitialise RGB LED (WS2818)Port:A ▾BrightnessNumberTeamnameCO2-Gehaltintco2 ▾ppmcreate text withShow Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates16ValueShow Text/NumberFont colorWhite ▾Fontsize1x-Coordinates0y-Coordinates0ValueCO2 Sensor (Sensirion SCD30)Value:CO2 in ppm ▾intco2 ▾0.25× ▾0- ▾0255constrainlowhighintco2 ▾0.25× ▾505+ ▾0255constrainlowhigh0intanteil_rot ▾intanteil_gruen ▾0colour with redgreenblueSet RGB-LED atPort:A ▾PositionColorsetintanteil_gruen ▾tosetintanteil_rot ▾tosetintco2 ▾toClear DisplayInterval: Interval2000msPrint 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 17:13:46 GMT+0000 (Coordinated Universal Time)
#include <Adafruit_NeoPixel.h>
#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 <SparkFun_SCD30_Arduino_Library.h> // http://librarymanager/All#SparkFun_SCD30_Arduino_Library
const long intervalInterval = 2000;
long time_startInterval = 0;
long time_actualInterval = 0;
int co2;
int anteil_rot;
int anteil_gruen;
Adafruit_NeoPixel rgb_led_1= Adafruit_NeoPixel(1, 1,NEO_GRB + NEO_KHZ800);
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
SCD30 airSensor;
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="rZ}Ml`RI=i3|G`D:gl^:">co2</variable>
    <variable type="int" id="QsCw@K-/2Oe=|aaQl+~/">anteil_rot</variable>
    <variable type="int" id="Wm]wO%rCu:|[QIz{(3@W">anteil_gruen</variable>
  </variables>
  <block type="arduino_functions" id="QWW|$jB8+*EL;}|#uA" deletable="false" x="281" y="58">
    <data>mini</data>
    <statement name="SETUP_FUNC">
      <block type="sensebox_ws2818_led_init" id="G57:$5JZKzfqHjjT7b~{">
        <field name="Port">1</field>
        <value name="BRIGHTNESS">
          <block type="math_number" id="]Ib7vCP,*Q]n3y}h1IAf">
            <field name="NUM">100</field>
          </block>
        </value>
        <value name="NUMBER">
          <block type="math_number" id="z(yE0$kK7d0l$2;FC.R3">
            <field name="NUM">1</field>
          </block>
        </value>
        <next>
          <block type="sensebox_display_beginDisplay" id="rpN^B+IV@S,L9B6A8~?O"></block>
        </next>
      </block>
    </statement>
    <statement name="LOOP_FUNC">
      <block type="sensebox_display_show" id="kOWgn:-h9zd4QS/waG7K">
        <statement name="SHOW">
          <block type="sensebox_display_printDisplay" id="9{m]m)|[d9QybElMI_+a">
            <field name="COLOR">WHITE,BLACK</field>

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