This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Blocker226's profile picture

Using OpenCCSensors to detect weather

Started by Blocker226, 20 March 2013 - 12:49 AM
Blocker226 #1
Posted 20 March 2013 - 01:49 AM
Title: Using OpenCCSensors to detect weather

Hello, I've been a avid user of Computercraft, but for the life of me I am unable to get weather information from a sensor, specifically whether it is raining.
Here's the code:


I just need it to detect rain, then send out the result via rednet to an indoor computer inside my house. I can't even get it to print out the result though. I think I can handle the rednet part just fine, I just need to know how to detect weather and other specifc things that the world sensor detects.
Lyqyd #2
Posted 20 March 2013 - 05:41 AM
Split into new topic.

You're very close! Use `sensor.wrap()` instead of `peripheral.wrap()`. Don't forget that "CURRENT" is a string and needs to be in quotes, just like "top".