Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
-- Tank Data Gathering Program -- -- pastebin get ZcmLW62N startup -- config-- local chn = 100 -- channel to broadcast on, using 100s for refinery local mside = "bottom" -- change to what side modem is on local tside = "top" -- change to what side tanks are on -- peripherals and variables -- tank = peripheral.wrap(tside) modem = peripheral.wrap(mside) -- functions -- function cl() term.clear() term.setCursorPos(1,1) end function measure() cl() data = tank.getMetadata() print("Measuring fluid levels...") sleep(1) modem.transmit(chn, 999, data) cl() print("Transmitting data on channel " .. chn .. "...") sleep(1) end -- rednet -- modem.open(chn) if open == false then cl() print("Opening modem...") rednet.open(Mside) sleep(0.5) end -- Main Code -- while true do measure() end
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)