XOD is a flow-based-programming tool for programming arduino. See https://xod.io && https://github.com/xodio/xod .
This (https://github.com/awgrover/xod_lib) is a library of nodes for it. Some may be useful. Some may be ill conceived.
- Browse (https://xod.io/libs/) for "published" libraries, mine start with "awgrover"
- File menu, Add Library, type the name, like "awgrover/utils".
- should install.
This requires FortySevenEffects/arduino_midi_library. A bit of a pain to install:
- run arduino-ide
- sketch:include library:manage-libraries...
- search for "MIDI", find "MIDI Library by Forty Seven Effects"
- latest version (has worked with 4.3.1, report problems please)
- "install"
- done with arduion-ide, you can close it
- Find your "Arduino/libraries" folder.
- It's "~/Arduino/libraries" on linux. Please send info on OS's not listed here.
- Find your "XOD IDE/resources" directory. On my debian linux, it's '/opt/XOD IDE/resources/arduino-libraries'
- You have to create a link (shortcut) from the arduino-library to the xod-arduino-lib. On linux it's: sudo ln -s ~/Arduino/libraries/MIDI_Library '/opt/XOD IDE/resources/arduino-libraries'
- "Reload" in XOD
- Should be ready to go
I haven't "published" all of these yet, until then you have to put the 'awgrover' directory into the xod workspace lib manually.
- From this github repository https://github.com/awgrover/xod_lib
- Click "clone or download", click "Download zip"
- Open the downloaded zip, or let your OS just open it as it downloads.
- Navigate into the zip, inside 'lib'. So you can see the 'awgrover' directory.
- Find your xod workspace: run xod, choose File:Select Workspace. Note the "Current workspace directory". You can probabably select and copy it.
- Open your file-explorer, and navigate to the xod workspace.
- Make a directory "__lib__"
- Drag 'awgrover' from the zip to '__lib__' in the workspace.
- It's installed.
- Do a "reload" in XOD.
- My libs should be visible and usable.
More detailed documentation at NODES.md
constructor https://github.com/adafruit/Adafruit_NeoPixel Arduino: Adafruit_NeoPixel XOD: awgrover/adafruit-neopixel-ll/input-adafruitneopixel cpp postfix: adafruitneopixel
constructor https://github.com/adafruit/Adafruit_NeoPixel Arduino: Adafruit_NeoPixel XOD: awgrover/adafruit-neopixel-ll/input-adafruitneopixel cpp postfix: adafruitneopixel
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
Outputs true if IN1
= IN2
, and false otherwise
Light up the first 3 pixels in Red, Green, Blue order. Nearest the Arduino should be Red, then Green, then Blue. This should help you decode the right RGB code to use (e.g. GRB, etc).
Light up the first pixel in order: OFF, Red, Green, Blue. Like the 3 pixel revelation, but this only requires 1 pixel. This should help you decode the right RGB code to use (e.g. GRB, etc).
Turn all pixels light green, one by one. Repeat. Based on the Adafruit Neopixel example "simple",
Allows values to pass through only if EN pin is set to true
Outputs either input value depending on condition
Convert anything into a pulse
Convert (each) true into a pulse. Compare with cast-boolean-to-pulse
From START to LIMIT by STEP each INC. Then reset to START. Either up or down. aka Sawtooth.
Count up/down on each INC pulse. Will not exceed MAX or go-below MIN. I.e. Count up to MAX. Won't output if nothing changes (e.g. RST when already MIN, or just changing STEP)
Simplified count: 0 to 1 by INC. Then repeat. Default is 256 steps suitable for LEDs etc. aka sawtooth.
counts from 0 to LIMIT in N steps. e.g. 0..1000 in 255 steps. sawtooth.
This button signals up & down. The signal is immediate (debounce inhibits signals for 20msec). Assumes normally-open switch. Does input-pullup.
Reads digital signal value from board port. Can set input-pullup.
Outputs either input value depending on condition
Compares 2 strings, giving <, =, or > boolean output.
Bank-Select and Program-Change
Set the inputs, send the control change on pulse ("send").
For this to work, it must fire first. Putting in the top-left helps. Sets baud to 115200 for debugging
Real simple examples
Start/stop a note.
A button starts the note (push) and stops on release. Uses xod/common-hardware/button
Set the inputs, send on pulse ("send")
Produce n ticks/sec. aka Hz
Output the DATA on the console-log, possibly followed by a space. End-of-line is optional. So you can output more than 1 thing per line.
output "[time] prefix data". So you can see when it happened, what it's for (prefix). Unlike console-log, this outputs on prefix, or data. Of course, also on trig.
On pulse or boolean, copy the boolean out. Set always=false to only copy if the boolean has changed. Acts like casting pulse to boolean
On pulse or number, copy the number out. Set always=false to only copy if the number has changed. Acts like casting pulse to number
On pulse or text, copy the text out. Set always=false to only copy if the text has changed. Acts like casting pulse to text
Bank-Select and Program-Change
Set the inputs, send the control change on pulse ("send").
For this to work, it must fire first. Putting in the top-left helps. Sets baud to 115200 for debugging
Real simple examples
Start/stop a note.
A button starts the note (push) and stops on release. Uses xod/common-hardware/button
Set the inputs, send on pulse ("send")