Generated from the node registry — run npm run docs --workspace client after adding nodes.
ArduForge ships 149 nodes across 10 categories.
- Events — 5 nodes
- I/O — 10 nodes
- Control Flow — 14 nodes
- Math — 22 nodes
- Logic — 16 nodes
- Variables — 18 nodes
- Time — 5 nodes
- Serial — 10 nodes
- Components — 46 nodes
- Custom C++ — 3 nodes
Runs a function you defined with Define Function.
event.callFunction · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Name | myFunction |
| Arguments |
Defines a reusable function. Call it with the Call Function node.
event.function · kind: entry · execution outputs: body
| Setting | Default |
|---|---|
| Name | myFunction |
| Returns | void |
| Parameters |
Runs the moment a pin changes, interrupting whatever else is happening.
event.interrupt · kind: entry · execution outputs: then
| Setting | Default |
|---|---|
| Pin | 2 |
| Trigger on | RISING |
Runs over and over, forever, after setup finishes.
event.loop · kind: entry · execution outputs: then
Runs once when the board powers on or resets.
event.setup · kind: entry · execution outputs: then
Reads an analog pin as a number from 0 to 1023.
io.analogRead · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
A0 |
| Output | Type |
|---|---|
| Value | int |
Chooses the voltage that analog readings are measured against.
io.analogReference · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Reference | DEFAULT |
Writes a 0-255 PWM duty cycle. Only works on PWM-capable pins.
io.analogWrite · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
9 |
| Duty | int |
128 |
Reads whether a pin is HIGH or LOW.
io.digitalRead · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
2 |
| Output | Type |
|---|---|
| Is High | bool |
Drives a pin fully HIGH (5V) or LOW (0V).
io.digitalWrite · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
13 |
| Value | bool |
true |
Stops a tone that is playing on a pin.
io.noTone · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
8 |
Configures a pin as an input or an output.
io.pinMode · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
13 |
| Setting | Default |
|---|---|
| Mode | OUTPUT |
Measures how long a pulse lasts, in microseconds. Blocking.
io.pulseIn · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
7 |
| Level | bool |
true |
| Timeout µs | int |
1000000 |
| Output | Type |
|---|---|
| Length µs | int |
Clocks a byte out one bit at a time, for shift registers.
io.shiftOut · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Data pin | pin |
11 |
| Clock pin | pin |
12 |
| Byte | int |
0 |
| Setting | Default |
|---|---|
| Bit order | MSBFIRST |
Plays a square-wave tone on a pin. Good enough for a buzzer.
io.tone · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
8 |
| Hz | int |
440 |
| ms (0 = hold) | int |
0 |
Leaves the surrounding loop immediately.
control.break · kind: statement · has execution input
Skips to the next pass of the surrounding loop.
control.continue · kind: statement · has execution input
Passes a signal through only after it has been stable for a while.
control.debounce · kind: expression
| Input | Type | Default |
|---|---|---|
| Signal | bool |
false |
| Settle (ms) | int |
50 |
| Output | Type |
|---|---|
| Stable | bool |
Stops everything for a number of milliseconds. Blocking.
control.delay · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Milliseconds | int |
500 |
Stops everything for a number of microseconds. Blocking.
control.delayMicroseconds · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Microseconds | int |
100 |
Runs a chain once, then repeats it while a condition holds.
control.doWhile · kind: statement · has execution input · execution outputs: body, done
| Input | Type | Default |
|---|---|---|
| While | bool |
true |
Runs a chain on a repeating interval without blocking the rest of the program.
control.everyMs · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Interval | int |
500 |
Repeats a chain a fixed number of times.
control.for · kind: statement · has execution input · execution outputs: body, done
| Input | Type | Default |
|---|---|---|
| Count | int |
10 |
| Output | Type |
|---|---|
| Index | int |
Moves a state machine into a different state.
control.goToState · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Machine name | mode |
| State | Idle |
Runs one branch or the other depending on a condition.
control.if · kind: statement · has execution input · execution outputs: true, false
| Input | Type | Default |
|---|---|---|
| Condition | bool |
true |
Leaves the current function, optionally with a value.
control.return · kind: statement · has execution input
| Input | Type | Default |
|---|---|---|
| Value | string |
Runs several chains one after another, in order.
control.sequence · kind: statement · has execution input · execution outputs: 1, 2
| Setting | Default |
|---|---|
| Steps | 2 |
Runs one branch per state. Use Go To State to move between them.
control.stateMachine · kind: statement · has execution input · execution outputs: Idle, Running
| Setting | Default |
|---|---|
| Machine name | mode |
| States (comma separated) | Idle, Running |
Repeats a chain for as long as a condition stays true.
control.while · kind: statement · has execution input · execution outputs: body, done
| Input | Type | Default |
|---|---|---|
| While | bool |
true |
Drops the minus sign from a number.
math.abs · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Result | float |
Adds two numbers together.
math.add · kind: expression
| Input | Type | Default |
|---|---|---|
| A | float |
0 |
| B | float |
0 |
| Output | Type |
|---|---|
| Result | float |
Rounds up to a whole number.
math.ceil · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Result | int |
Clamps a number so it never leaves a range.
math.constrain · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Low | float |
0 |
| High | float |
255 |
| Output | Type |
|---|---|
| Clamped | float |
Cosine of an angle in radians.
math.cos · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Result | float |
A fixed number with a decimal point.
math.float · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Value | float |
Divides the first number by the second.
math.divide · kind: expression
| Input | Type | Default |
|---|---|---|
| A | float |
0 |
| B | float |
0 |
| Output | Type |
|---|---|
| Result | float |
Rounds down to a whole number.
math.floor · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Result | int |
Whichever of two numbers is larger.
math.max · kind: expression
| Input | Type | Default |
|---|---|---|
| A | float |
0 |
| B | float |
0 |
| Output | Type |
|---|---|
| Larger | float |
Rescales a number from one range to another. The workhorse for sensors.
math.map · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | int |
0 |
| From low | int |
0 |
| From high | int |
1023 |
| To low | int |
0 |
| To high | int |
255 |
| Output | Type |
|---|---|
| Mapped | int |
Multiplies two numbers.
math.multiply · kind: expression
| Input | Type | Default |
|---|---|---|
| A | float |
0 |
| B | float |
0 |
| Output | Type |
|---|---|
| Result | float |
A fixed whole number.
math.number · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | int |
0 |
| Output | Type |
|---|---|
| Value | int |
Raises a number to a power.
math.power · kind: expression
| Input | Type | Default |
|---|---|---|
| Base | float |
2 |
| Exponent | float |
2 |
| Output | Type |
|---|---|
| Result | float |
A random whole number from the low value up to (but not including) the high one.
math.random · kind: expression
| Input | Type | Default |
|---|---|---|
| Low | int |
0 |
| High | int |
100 |
| Output | Type |
|---|---|
| Value | int |
Seeds the random generator so runs differ. Read a floating analog pin for noise.
math.randomSeed · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Seed | int |
0 |
The remainder left after dividing one whole number by another.
math.modulo · kind: expression
| Input | Type | Default |
|---|---|---|
| A | int |
0 |
| B | int |
1 |
| Output | Type |
|---|---|
| Remainder | int |
Rounds to the nearest whole number.
math.round · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Result | int |
Sine of an angle in radians.
math.sin · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Result | float |
Whichever of two numbers is smaller.
math.min · kind: expression
| Input | Type | Default |
|---|---|---|
| A | float |
0 |
| B | float |
0 |
| Output | Type |
|---|---|
| Smaller | float |
The square root of a number.
math.sqrt · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Result | float |
Subtracts the second number from the first.
math.subtract · kind: expression
| Input | Type | Default |
|---|---|---|
| A | float |
0 |
| B | float |
0 |
| Output | Type |
|---|---|
| Result | float |
Tangent of an angle in radians.
math.tan · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Result | float |
True only when both inputs are true.
logic.and · kind: expression
| Input | Type | Default |
|---|---|---|
| A | bool |
false |
| B | bool |
false |
| Output | Type |
|---|---|
| Result | bool |
Turns one bit of a number off.
logic.bitClear · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | int |
0 |
| Bit | int |
0 |
| Output | Type |
|---|---|
| Result | int |
Reads one bit out of a number.
logic.bitRead · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | int |
0 |
| Bit | int |
0 |
| Output | Type |
|---|---|
| Bit | int |
Turns one bit of a number on.
logic.bitSet · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | int |
0 |
| Bit | int |
0 |
| Output | Type |
|---|---|
| Result | int |
Sets one bit of a number to a chosen value.
logic.bitWrite · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | int |
0 |
| Bit | int |
0 |
| On | bool |
false |
| Output | Type |
|---|---|
| Result | int |
Combines two numbers bit by bit with AND.
logic.bitAnd · kind: expression
| Input | Type | Default |
|---|---|---|
| A | int |
0 |
| B | int |
0 |
| Output | Type |
|---|---|
| Result | int |
Flips every bit of a number.
logic.bitNot · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | int |
0 |
| Output | Type |
|---|---|
| Result | int |
Combines two numbers bit by bit with OR.
logic.bitOr · kind: expression
| Input | Type | Default |
|---|---|---|
| A | int |
0 |
| B | int |
0 |
| Output | Type |
|---|---|
| Result | int |
Combines two numbers bit by bit with XOR.
logic.bitXor · kind: expression
| Input | Type | Default |
|---|---|---|
| A | int |
0 |
| B | int |
0 |
| Output | Type |
|---|---|
| Result | int |
A fixed true or false value.
logic.boolean · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | bool |
true |
| Output | Type |
|---|---|
| Value | bool |
Compares two numbers and returns true or false.
logic.compare · kind: expression
| Input | Type | Default |
|---|---|---|
| A | any |
0 |
| B | any |
0 |
| Output | Type |
|---|---|
| Result | bool |
| Setting | Default |
|---|---|
| Operator | == |
True when exactly one of the two inputs is true.
logic.xor · kind: expression
| Input | Type | Default |
|---|---|---|
| A | bool |
false |
| B | bool |
false |
| Output | Type |
|---|---|
| Result | bool |
Flips true to false and false to true.
logic.not · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | bool |
false |
| Output | Type |
|---|---|
| Result | bool |
True when either input is true.
logic.or · kind: expression
| Input | Type | Default |
|---|---|---|
| A | bool |
false |
| B | bool |
false |
| Output | Type |
|---|---|
| Result | bool |
Moves the bits of a number to the left.
logic.shiftLeft · kind: expression
| Input | Type | Default |
|---|---|---|
| A | int |
0 |
| B | int |
0 |
| Output | Type |
|---|---|
| Result | int |
Moves the bits of a number to the right.
logic.shiftRight · kind: expression
| Input | Type | Default |
|---|---|---|
| A | int |
0 |
| B | int |
0 |
| Output | Type |
|---|---|
| Result | int |
Reads one item out of an array.
var.arrayGet · kind: expression
| Input | Type | Default |
|---|---|---|
| Index | int |
0 |
| Output | Type |
|---|---|
| Value | int |
| Setting | Default |
|---|---|
| Name | values |
| Type | int |
How many slots an array has.
var.arrayLength · kind: expression
| Output | Type |
|---|---|
| Length | int |
| Setting | Default |
|---|---|
| Name | values |
Stores a value into one slot of an array.
var.arraySet · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Index | int |
0 |
| Value | int |
0 |
| Setting | Default |
|---|---|
| Name | values |
| Type | int |
Creates a fixed-size list of values.
var.arrayDeclare · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Name | values |
| Type | int |
| Size | 8 |
Creates a named value the whole program can read and change.
var.declare · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Name | myValue |
| Type | int |
| Starting value | 0 |
| Expose to Dashboard | false |
Subtracts from a variable in place.
var.decrement · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| By | float |
1 |
| Setting | Default |
|---|---|
| Name | myValue |
Where a piece of text appears inside another. -1 when it does not.
text.indexOf · kind: expression
| Input | Type | Default |
|---|---|---|
| Text | string |
|
| Look for | string |
| Output | Type |
|---|---|
| Position | int |
Reads the current value of a variable.
var.get · kind: expression
| Output | Type |
|---|---|
| Value | int |
| Setting | Default |
|---|---|
| Name | myValue |
| Type | int |
Adds to a variable in place.
var.increment · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| By | float |
1 |
| Setting | Default |
|---|---|
| Name | myValue |
Sticks two pieces of text together.
text.concat · kind: expression
| Input | Type | Default |
|---|---|---|
| First | string |
|
| Second | string |
| Output | Type |
|---|---|
| Text | string |
Turns a number into text so it can be printed or joined.
text.toString · kind: expression
| Input | Type | Default |
|---|---|---|
| Value | float |
0 |
| Output | Type |
|---|---|
| Text | string |
Takes a slice out of a piece of text.
text.substring · kind: expression
| Input | Type | Default |
|---|---|---|
| Text | string |
|
| From | int |
0 |
| To | int |
1 |
| Output | Type |
|---|---|
| Text | string |
Stores a new value into a variable.
var.set · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Value | int |
0 |
| Setting | Default |
|---|---|
| Name | myValue |
| Type | int |
A fixed piece of text.
text.string · kind: expression
| Input | Type | Default |
|---|---|---|
| Text | string |
hello |
| Output | Type |
|---|---|
| Text | string |
True when two pieces of text are exactly the same.
text.compare · kind: expression
| Input | Type | Default |
|---|---|---|
| First | string |
|
| Second | string |
| Output | Type |
|---|---|
| Same | bool |
How many characters a piece of text has.
text.length · kind: expression
| Input | Type | Default |
|---|---|---|
| Text | string |
| Output | Type |
|---|---|
| Length | int |
Reads a decimal number out of a piece of text.
text.toFloat · kind: expression
| Input | Type | Default |
|---|---|---|
| Text | string |
0 |
| Output | Type |
|---|---|
| Value | float |
Reads a whole number out of a piece of text.
text.toInt · kind: expression
| Input | Type | Default |
|---|---|---|
| Text | string |
0 |
| Output | Type |
|---|---|
| Value | int |
How long it has been since a recorded moment, in milliseconds.
time.elapsedSince · kind: expression
| Input | Type | Default |
|---|---|---|
| Timestamp | int |
0 |
| Output | Type |
|---|---|
| Elapsed | int |
How long the board has been running, in microseconds.
time.micros · kind: expression
| Output | Type |
|---|---|
| µs | int |
How long the board has been running, in milliseconds.
time.millis · kind: expression
| Output | Type |
|---|---|
| ms | int |
How many milliseconds a stopwatch has counted.
time.stopwatchRead · kind: expression
| Output | Type |
|---|---|
| Elapsed | int |
| Setting | Default |
|---|---|
| Name | timer |
Starts, stops, and reads a running timer.
time.stopwatch · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Action | start |
| Name | timer |
Prints "label: value", which is much easier to read in the monitor.
serial.printValue · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Label | string |
value |
| Value | string |
How many bytes have arrived and are waiting to be read.
serial.available · kind: expression
| Output | Type |
|---|---|
| Bytes | int |
Starts the serial link. Put this in setup, before any printing.
serial.begin · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Baud | 115200 |
Waits until everything queued has finished sending.
serial.flush · kind: statement · has execution input · execution outputs: then
Reads the next decimal number from the incoming text.
serial.parseFloat · kind: expression
| Output | Type |
|---|---|
| Value | float |
Reads the next whole number from the incoming text.
serial.parseInt · kind: expression
| Output | Type |
|---|---|
| Value | int |
Prints a value without moving to a new line.
serial.print · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Value | string |
Prints a value and moves to the next line.
serial.println · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Value | string |
hello |
Reads one waiting byte. Returns -1 when nothing is waiting.
serial.read · kind: expression
| Output | Type |
|---|---|
| Byte | int |
Reads incoming text up to a terminator character.
serial.readStringUntil · kind: expression
| Input | Type | Default |
|---|---|---|
| Ends with | string |
\n |
| Output | Type |
|---|---|
| Text | string |
True once a button has been held down for long enough.
button.isHeld · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
2 |
| Hold ms | int |
800 |
| Output | Type |
|---|---|
| Held | bool |
True while a button is held down. Wired with the internal pull-up.
button.isPressed · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
2 |
| Output | Type |
|---|---|
| Pressed | bool |
True for a single pass when a button goes down. Debounced internally.
button.onPress · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
2 |
| Debounce ms | int |
25 |
| Output | Type |
|---|---|
| Just pressed | bool |
True for a single pass when a button comes back up.
button.onRelease · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
2 |
| Debounce ms | int |
25 |
| Output | Type |
|---|---|
| Just released | bool |
Plays a short beep.
buzzer.beep · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
8 |
| Hz | int |
880 |
| Length ms | int |
120 |
Plays a named musical note.
buzzer.playNote · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
8 |
| Length ms | int |
200 |
| Setting | Default |
|---|---|
| Note | 440 |
Silences the buzzer.
buzzer.stop · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
8 |
Reads relative humidity as a percentage from a DHT11 or DHT22.
dht.readHumidity · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
4 |
| Output | Type |
|---|---|
| % | float |
| Setting | Default |
|---|---|
| Sensor | DHT22 |
Library: DHT sensor library
Reads temperature in Celsius from a DHT11 or DHT22.
dht.readTemperature · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
4 |
| Output | Type |
|---|---|
| °C | float |
| Setting | Default |
|---|---|
| Sensor | DHT22 |
Library: DHT sensor library
Reads a code from an infrared remote. 0 when nothing arrived.
ir.readCode · kind: expression
| Output | Type |
|---|---|
| Code | int |
| Setting | Default |
|---|---|
| Receiver pin | 2 |
Library: IRremote
Turns the display backlight on or off.
lcd.backlight · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| On | bool |
true |
Library: LiquidCrystal I2C
Wipes the display.
lcd.clear · kind: statement · has execution input · execution outputs: then
Library: LiquidCrystal I2C
Starts a 16x2 I2C character display. Put this in setup.
lcd.init · kind: statement · has execution input · execution outputs: then
Library: LiquidCrystal I2C
Prints text at a chosen row and column of the display.
lcd.printAt · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Column | int |
0 |
| Row | int |
0 |
| Text | string |
Hello |
Library: LiquidCrystal I2C
Sets an LED brightness from 0 to 255. Needs a PWM pin.
led.fadeTo · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
9 |
| Brightness | int |
128 |
Turns an LED off.
led.off · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
13 |
Turns an LED fully on.
led.on · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
13 |
Flips an LED between on and off.
led.toggle · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
13 |
Drives one channel of an L298N motor driver forward or backward.
motor.setSpeed · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Enable (PWM) | pin |
5 |
| IN1 | pin |
6 |
| IN2 | pin |
7 |
| Speed -255..255 | int |
200 |
Stops a motor, either coasting or braking.
motor.stop · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Enable (PWM) | pin |
5 |
| IN1 | pin |
6 |
| IN2 | pin |
7 |
| Setting | Default |
|---|---|
| Brake (short the motor) | false |
Sets overall strip brightness from 0 to 255.
neopixel.brightness · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Brightness | int |
64 |
Library: Adafruit NeoPixel
Starts an addressable LED strip. Put this in setup.
neopixel.init · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Pixel count | 8 |
| Data pin | 6 |
Library: Adafruit NeoPixel
Sets every pixel to the same colour.
neopixel.setAll · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Red | int |
255 |
| Green | int |
0 |
| Blue | int |
0 |
Library: Adafruit NeoPixel
Sets one pixel to a red/green/blue colour. Call Show to display it.
neopixel.setPixel · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pixel | int |
0 |
| Red | int |
255 |
| Green | int |
0 |
| Blue | int |
0 |
Library: Adafruit NeoPixel
Pushes the colours you set out to the strip.
neopixel.show · kind: statement · has execution input · execution outputs: then
Library: Adafruit NeoPixel
Reads a potentiometer and rescales it to a range you choose.
pot.readMapped · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
A0 |
| To low | int |
0 |
| To high | int |
180 |
| Output | Type |
|---|---|
| Value | int |
Reads a potentiometer as a number from 0 to 1023.
pot.readRaw · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
A0 |
| Output | Type |
|---|---|
| Value | int |
Reads a potentiometer through a smoothing filter, so the value stops jittering.
pot.readSmoothed · kind: expression
| Input | Type | Default |
|---|---|---|
| Pin | pin |
A0 |
| Smoothing | float |
0.2 |
| Output | Type |
|---|---|
| Value | int |
Switches a relay on or off.
relay.set · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
5 |
| On | bool |
true |
| Setting | Default |
|---|---|
| Active LOW module | true |
Reads the current date from a DS3231 clock as text.
rtc.readDate · kind: expression
| Output | Type |
|---|---|
| yyyy-mm-dd | string |
Library: RTClib
Reads the current time from a DS3231 clock as text.
rtc.readTime · kind: expression
| Output | Type |
|---|---|
| hh:mm:ss | string |
Library: RTClib
Starts an SD card module. Put this in setup.
sd.init · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Chip select | pin |
10 |
Library: SD
Appends a line of text to a file on the SD card.
sd.writeLine · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| File | string |
log.txt |
| Text | string |
Library: SD
Connects a servo to a pin. Put this in setup.
servo.attach · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pin | pin |
9 |
| Setting | Default |
|---|---|
| Servo name | servo |
Library: Servo
Releases a servo so it stops holding its position.
servo.detach · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| Servo name | servo |
Library: Servo
The angle a servo was last told to go to.
servo.read · kind: expression
| Output | Type |
|---|---|
| Angle | int |
| Setting | Default |
|---|---|
| Servo name | servo |
Library: Servo
Moves a servo to an angle between 0 and 180 degrees.
servo.write · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Angle | int |
90 |
| Setting | Default |
|---|---|
| Servo name | servo |
Library: Servo
Drives a servo with a raw pulse width, for finer control than degrees.
servo.writeMicroseconds · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Pulse µs | int |
1500 |
| Setting | Default |
|---|---|
| Servo name | servo |
Library: Servo
Writes eight outputs at once through a 74HC595.
shift595.writeByte · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Data (DS) | pin |
11 |
| Clock (SH) | pin |
12 |
| Latch (ST) | pin |
8 |
| Byte | int |
0 |
How many bytes are waiting on the software serial port.
softserial.available · kind: expression
| Output | Type |
|---|---|
| Bytes | int |
Library: SoftwareSerial
Starts a second serial port on ordinary pins.
softserial.begin · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| RX pin | 10 |
| TX pin | 11 |
| Baud | 9600 |
Library: SoftwareSerial
Sends text out of the software serial port.
softserial.print · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Text | string |
Library: SoftwareSerial
Reads one waiting byte from the software serial port.
softserial.read · kind: expression
| Output | Type |
|---|---|
| Byte | int |
Library: SoftwareSerial
Sets how fast a stepper turns, in revolutions per minute.
stepper.setSpeed · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| RPM | int |
60 |
| Setting | Default |
|---|---|
| Steps per revolution | 200 |
Library: Stepper
Turns a stepper by a number of steps. Negative goes the other way.
stepper.step · kind: statement · has execution input · execution outputs: then
| Input | Type | Default |
|---|---|---|
| Steps | int |
100 |
| Setting | Default |
|---|---|
| Steps per revolution | 200 |
Library: Stepper
Measures distance with an HC-SR04. No library needed.
ultrasonic.readDistance · kind: expression
| Input | Type | Default |
|---|---|---|
| Trigger pin | pin |
7 |
| Echo pin | pin |
6 |
| Output | Type |
|---|---|
| Distance | float |
| Setting | Default |
|---|---|
| Units | cm |
A C++ expression you write yourself, with a type you choose.
custom.expression · kind: expression
| Output | Type |
|---|---|
| Value | int |
| Setting | Default |
|---|---|
| C++ | 0 |
| Type | int |
Top-level C++: functions, structs, #defines. Emitted above setup().
custom.global · kind: entry
| Setting | Default |
|---|---|
| C++ | #define MY_CONSTANT 42 |
Inserts C++ statements exactly as written, inside the current chain.
custom.statement · kind: statement · has execution input · execution outputs: then
| Setting | Default |
|---|---|
| C++ | // your code here |