senseBox Blockly
senseBox-Logo
  1. ›
  2. Galerie

  3. ›
  4. RGB-LED Fader

RGB-LED Fader

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
125510255inti â–¾- â–¾inti â–¾intj â–¾colour with redgreenblue10waitmillisecondsSet RGB-LED atPort:A â–¾PositionColor125510inti â–¾255intj â–¾- â–¾intj â–¾colour with redgreenblue10waitmillisecondsSet RGB-LED atPort:A â–¾PositionColor125510intk â–¾intj â–¾255intk â–¾- â–¾colour with redgreenblue10waitmillisecondsSet RGB-LED atPort:A â–¾PositionColorcount withk â–¾fromtobydocount withj â–¾fromtobydocount withi â–¾fromtobydoArduino run first:Arduino loop forever:inti â–¾
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
// Code generated by senseBox Blockly on Sat Jun 28 2025 03:09:45 GMT+0000 (Coordinated Universal Time)
void setup() {
}
void loop() {
  for (int i = 1; i <= 255; i += 1) {
    rgb_led_1.setPixelColor(0,rgb_led_1.Color((255 - i), i, j));
    rgb_led_1.show();
    delay(10);
  }
  for (int j = 1; j <= 255; j += 1) {
    rgb_led_1.setPixelColor(0,rgb_led_1.Color(i, (255 - j), j));
    rgb_led_1.show();
    delay(10);
  }
  for (int k = 1; k <= 255; k += 1) {
    rgb_led_1.setPixelColor(0,rgb_led_1.Color(k, j, (255 - k)));
    rgb_led_1.show();
    delay(10);
  }
}
<>
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="?mav/-Ny)@;!]HJ[mvG)">i</variable>
    <variable type="int" id="vRd~mmOW].IhY4s[2fbe">j</variable>
    <variable type="int" id="pATB8NhC;Ya%P@f8*Hlg">k</variable>
  </variables>
  <block type="arduino_functions" id="QWW|$jB8+*EL;}|#uA" deletable="false" x="31" y="83">
    <statement name="LOOP_FUNC">
      <block type="controls_for" id=":@q*:0#Vb-_t-3Ti]j*b">
        <field name="VAR" id="?mav/-Ny)@;!]HJ[mvG)" variabletype="int">i</field>
        <value name="FROM">
          <block type="math_number" id="He^k~S:2:^3`zC}iiJ=d">
            <field name="NUM">1</field>
          </block>
        </value>
        <value name="TO">
          <block type="math_number" id="+LM6~oaiTMV:](#H,R*U">
            <field name="NUM">255</field>
          </block>
        </value>
        <value name="BY">
          <block type="math_number" id="-;Z=6.1e:ng+-VVe`;K1">
            <field name="NUM">1</field>
          </block>
        </value>
        <statement name="DO">
          <block type="sensebox_ws2818_led" id="rF)?oO:h[stCym@r6/aA">
            <field name="Port">1</field>
            <value name="POSITION">
              <block type="math_number" id="rJdcj0,!M6L8n8hp=qSS">
                <field name="NUM">0</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