User Tools

Site Tools


wio:wio-ioscript-en

Deutsche VersionEnglish VersionFrench Version

IOScript

Description

IOScript can be used to control up to 32 Outputs and/or NeoPixels.

Rocrail version 2.1.2074+
WIO version 470+


Format

Filename

The filename must be formatted like this:

<freetext><NodeID>_<Nr>_<Value>.io
Part Range Description
NodeID 000…255 For future extensions, for local use it should be 000
Nr 00…99 Macro number; Output address
Value 000…255 Value of the activated output macro; Usually 000(off) or 001(on)

Example: NodeID=000, Macro=00, Value=001
Maximum number of characters including suffix is ​​31.

co1_on_000_00_001.io

The Macro number is zero based: Output address 1 is 00.
*000_00_001.io, cannot be addressed.


Command line

  • Up to 32 commands can be defined in the IOScript file. All lines must end with a linefeed. (0x0A)
  • Comment lines are prefixed with the '#' sign, and are restricted to 64 characters incl. linefeed.
  • Only linefeeds are allowed without extra carriage return. (Unix format)

Format

Only Unix linefeeds are allowed.

All columns are fixed width.

<port> <onoff> [<type> <slave> <bri> <blink> <delay> <red> <green> <blue>]

The part between […] is optional.

Part Range Description Remark
port 00…63 Number as arranged in the Pins.cpp or I2C ID
onoff 0…1 0=off 1=on
type O,P,L,S,A O=output(default) P=pixel L=LED1) S=Servo A=Pause
slave 000…255 I2C Slave ID
bri 000…255 The brightnes in case of pixel(P), position in case of servo(S), pause in 10ms incase of pause(A)
blink 0…1 Activate Pixel blinking The blink frequency depends of brightness and delay.
Slowest: bri=255 delay=1.
delay 00…15 Dim/movement delay
red,green,blue 000…255 The RGB values in case of pixel

ioscript.jpg

Example:

00 1
01 0
01 1 P 000 120 0 00 150 200 050
00 0 S 000 050 0 01
00 0 A 000 200
  • Line 1: Port 1 ON
  • Line 2: Port 2 OFF
  • Line 3: Pixel 2 ON with RGB(150,200,50) and brightness 120
  • Line 4: Servo 1 50° speed 1
  • Line 5: Pause 2000 ms


If no color values ​​are specified in the script, the values ​​stored in the object are used.

Output Setup

macro-output-en.jpg

Upload

Uploading IOScript files can be done with a WEB Browser as explained here:
Upload by WEB Browser


1)
Only for WIOpi with Pi08.
wio/wio-ioscript-en.txt · Last modified: 2024/04/01 10:09 by rjversluis