CC_snippets/oscilloscope
Finn Dane 0bcfedb77a adds oscilloscope 2023-09-09 21:15:03 +02:00
..
oscilloscope.lua adds oscilloscope 2023-09-09 21:15:03 +02:00
readme.md adds oscilloscope 2023-09-09 21:15:03 +02:00

readme.md

Oscilloscope

Oscilloscope with customizable trigger and polling rate.

Setup

  1. Open the script in the editor
  2. Set the side wich the redstone signal will be read from
  3. Set the interval at which the signal will be polled (setting it below 0.05 will not give more resolution as this is the tickspeed)
  4. (Optional) Customize the trigger function to trigger when you want it to (see examples below).

Example triggers

Trigger when receiving full signal:

local trigger = function(previous, current)
    return current == 15
end

Triggers when the difference in the measured signals is more than positive 7:

local trigger = function(previous, current)
    return (current - previous) > 7
end