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

Webcam

Started by FoxData, 26 February 2016 - 11:55 AM
FoxData #1
Posted 26 February 2016 - 12:55 PM
Hi everyone. I just had the idea of a rednet compatible webcam with its own API.

API Examples:

This one is for a livestream:
Rednet.Broadcast(Webcam.Output)

You can also use the API to check for a certain color pixel/block

If Webcam.Output == Colors.Orange Then Rednet.Broadcast(1,1"Fire Fire Fire!!") 

It can also detect if a pixel changes over a long time (Motion detection)

If Webcam.Pixel1 == Colors.Grey and Webcam.Pixel2 == Colors.Red Then Print("Motion Detected")

You can also manipulate the pixels making for an even easier way of making graphics


Webcam.Pixel1 = Colors.Grey 
Webcam.Pixel2 = Colors.Red

So guys what do you think of this?
Creator #2
Posted 26 February 2016 - 05:11 PM
For a stream you would need to constantly send rednet messages. Also, you would need to know which block you are checking. Not a good idea in my opinion, too OP.
Waitdev_ #3
Posted 26 February 2016 - 09:29 PM
i like it, but as creator said the broadcast isn't really good
wilcomega #4
Posted 26 February 2016 - 10:21 PM
there is a Camera Peripheral availible and rednet / modem have all the tools you need to make this happen, they even fit on turtles
manu_03 #5
Posted 06 March 2016 - 11:21 AM
Not a bad idea. Otherwise you need to use turtles that lag at moving or use more than one, that lags because of having then on.