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

Controlling Minecraft Lights With Cellphone [VIDEO]

Started by elfin8er, 21 April 2013 - 03:08 PM
elfin8er #1
Posted 21 April 2013 - 05:08 PM
That's right! After a couple of weeks of work, I finally figured out how to control my in-game minecraft lights from my phone, by calling a phone number.

[media]http://www.youtube.com/watch?v=PleesjT9Qe4[/media]

If I get some decent feedback on this, I may release a tutorial or something showing how to set it all up, and then maybe you guys can think of other ways to use this. Also, this may not be the best way to do this, but hey. It gets the job done. Let me know what you think of this so far.

http://www.youtube.com/watch?v=DEakr7BbAEA

Also, I'm running out of things to do with this idea. If you've got any suggestions, let me know!
Sammich Lord #2
Posted 21 April 2013 - 05:13 PM
You should be able to embed videos with the MEDIA tag or it should do it automatically if you paste the YouTube link with HTTP instead of HTTPS.
elfin8er #3
Posted 21 April 2013 - 05:26 PM
You should be able to embed videos with the MEDIA tag or it should do it automatically if you paste the YouTube link with HTTP instead of HTTPS.
Awesome! Thanks! I thought it used to be the [YouTube][/YouTube] tags. So many forum tags to keep track of.
Spongy141 #4
Posted 21 April 2013 - 07:35 PM
Holy crap, you mad genius, I never even thought of controlling anything in minecraft via cell phone. +1.
JJRcop #5
Posted 21 April 2013 - 07:51 PM
ComputerCraft is officially a medium between the real world now.
elfin8er #6
Posted 22 April 2013 - 05:03 AM
Thanks for the feedback!
SuicidalSTDz #7
Posted 22 April 2013 - 05:15 AM
Truly interesting..
Espen #8
Posted 22 April 2013 - 06:21 AM
ComputerCraft is officially a medium between the real world now.
Between the real world and … ?
But that aside, we've been able to do such things for a long time via peripherals and/or the HTTP API.

Not trying to rain on your parade, just pointing out that the capabilities for such things are all there and that people just have to seize the opportunity to try them out. ^_^/>
elfin8er #9
Posted 22 April 2013 - 12:30 PM
ComputerCraft is officially a medium between the real world now.
Between the real world and … ?
But that aside, we've been able to do such things for a long time via peripherals and/or the HTTP API.

Not trying to rain on your parade, just pointing out that the capabilities for such things are all there and that people just have to seize the opportunity to try them out. ^_^/>/>
Yeah, I agree but I haven't seen anyone use their phone with it like this.
Sammich Lord #10
Posted 22 April 2013 - 12:32 PM
ComputerCraft is officially a medium between the real world now.
Between the real world and … ?
But that aside, we've been able to do such things for a long time via peripherals and/or the HTTP API.

Not trying to rain on your parade, just pointing out that the capabilities for such things are all there and that people just have to seize the opportunity to try them out. ^_^/>/>
Yeah, I agree but I haven't seen anyone use their phone with it like this.
I've seen people able to control redstone via their web browser so they could easily open a web browser on their phone and open it the control website.
elfin8er #11
Posted 22 April 2013 - 12:34 PM
ComputerCraft is officially a medium between the real world now.
Between the real world and … ?
But that aside, we've been able to do such things for a long time via peripherals and/or the HTTP API.

Not trying to rain on your parade, just pointing out that the capabilities for such things are all there and that people just have to seize the opportunity to try them out. ^_^/>/>/>/>
Yeah, I agree but I haven't seen anyone use their phone with it like this.
I've seen people able to control redstone via their web browser so they could easily open a web browser on their phone and open it the control website.
Very true, unless you don't have Internet access :P/> plus, you could get notifications this way via SMS.
SuicidalSTDz #12
Posted 22 April 2013 - 12:55 PM
Very true, unless you don't have Internet access
If you don't have internet access, then you wouldn't have ComputerCraft nor Minecraft.
elfin8er #13
Posted 22 April 2013 - 01:05 PM
Very true, unless you don't have Internet access
If you don't have internet access, then you wouldn't have ComputerCraft nor Minecraft.
I'm saying if you're away from home. You'd be able to monitor your machines while away.
SuicidalSTDz #14
Posted 22 April 2013 - 01:10 PM
Ah, ok. Gotta be specific with me ^_^/>
elfin8er #15
Posted 22 April 2013 - 01:44 PM
Ah, ok. Gotta be specific with me ^_^/>
Haha.
lieudusty #16
Posted 22 April 2013 - 02:08 PM
Thats awesome!
elfin8er #17
Posted 22 April 2013 - 02:15 PM
Thats awesome!
Thanks a lot!

Keep your eyes out for another video showing off a cell phone controlled temperature gauge! Just working on adding a couple more features, then I'll release it.
iownall555 #18
Posted 22 April 2013 - 03:15 PM
That is quite possibly the most creative thing I've seen. Please create more videos. :D/>
I have an arduino with a gsm shield somewhere so I might have to test something like this.
elfin8er #19
Posted 22 April 2013 - 03:20 PM
That is quite possibly the most creative thing I've seen. Please create more videos. :D/>
I have an arduino with a gsm shield somewhere so I might have to test something like this.
Thanks man! If you're looking forward to more videos, you should subscribe so you're notified when I release more!
oeed #20
Posted 22 April 2013 - 04:23 PM
How did you get the communication between your phone and the server? Or what every interface between the phone and the computer.
elfin8er #21
Posted 22 April 2013 - 04:56 PM
How did you get the communication between your phone and the server? Or what every interface between the phone and the computer.
I'll reveal that if/when I create a tutorial for it.
elfin8er #22
Posted 22 April 2013 - 05:35 PM
EDIT: So I wrote some working scripts that would relay the temperature of an engine to my phone, but the program crashes too often, or displays blank data. I'm looking into it. It's possible I can fix it, but it's not looking good. If anyone wants to help me with some CC sensors code, let me know!
oedze #23
Posted 23 April 2013 - 05:20 AM
interesting
remiX #24
Posted 23 April 2013 - 07:29 AM
Wow from your phone?
Really curious as to how this works :P/>
elfin8er #25
Posted 23 April 2013 - 07:38 AM
Wow from your phone?
Really curious as to how this works :P/>
Yup, I'll probably reveal how it works sometime. The only reason I may not is because in every script (including PHP), there's either my password, or my ip address. Since I spent days setting it up, I don't want to have to redo everything.
Jarle212 #26
Posted 23 April 2013 - 07:45 AM
How did you get the communication between your phone and the server? Or what every interface between the phone and the computer.

I think you can connect your computer to a phone line and then make a program that read information from the phoneline and place it in a database. The you could use the http api to get access to the database or something like that(not shure if that is how it is done, or how it works)
elfin8er #27
Posted 23 April 2013 - 07:48 AM
How did you get the communication between your phone and the server? Or what every interface between the phone and the computer.

I think you can connect your computer to a phone line and then make a program that read information from the phoneline and place it in a database. The you could use the http api to get access to the database or something like that(not shure if that is how it is done, or how it works)
Hmm…
Jarle212 #28
Posted 23 April 2013 - 07:49 AM
How did you get the communication between your phone and the server? Or what every interface between the phone and the computer.

I think you can connect your computer to a phone line and then make a program that read information from the phoneline and place it in a database. The you could use the http api to get access to the database or something like that(not shure if that is how it is done, or how it works)
Hmm…

What are you thinking about?
elfin8er #29
Posted 23 April 2013 - 08:02 AM
How did you get the communication between your phone and the server? Or what every interface between the phone and the computer.

I think you can connect your computer to a phone line and then make a program that read information from the phoneline and place it in a database. The you could use the http api to get access to the database or something like that(not shure if that is how it is done, or how it works)
Hmm…

What are you thinking about?
Oh nothing :rolleyes:/>
Jarle212 #30
Posted 23 April 2013 - 08:03 AM
:P/>
LordIkol #31
Posted 23 April 2013 - 08:05 AM
I hope you have done this with some sort of Arduino or other microcontroller.
Like someone mentioned before u could use a Arduino with a GSM Shield for getting the data,
Im not sure how you got the "ivr" working that tells you press 1 or 2 etc..

Really awesome thing im looking forward too see how you have done it

Greets Loki
remiX #32
Posted 23 April 2013 - 08:10 AM
Does this SMS'ing work in all Countries?
elfin8er #33
Posted 23 April 2013 - 08:11 AM
I hope you have done this with some sort of Arduino or other microcontroller.
Like someone mentioned before u could use a Arduino with a GSM Shield for getting the data,
Im not sure how you got the "ivr" working that tells you press 1 or 2 etc..

No clue what the heck you just said.

Does this SMS'ing work in all Countries?
As far as I know, it only works in Canada and the US.
Jarle212 #34
Posted 23 April 2013 - 08:18 AM
I hope you have done this with some sort of Arduino or other microcontroller.
Like someone mentioned before u could use a Arduino with a GSM Shield for getting the data,
Im not sure how you got the "ivr" working that tells you press 1 or 2 etc..

Really awesome thing im looking forward too see how you have done it

Greets Loki
How easy is it to program a Arduino?
elfin8er #35
Posted 23 April 2013 - 08:20 AM
For anyone wondering, the calling/texting servers aren't mine.

Got everything fully working (For the most part). Making a video right now.
elfin8er #36
Posted 23 April 2013 - 08:59 AM
Anyone want the lua code for the redstone engine temperature controller? I could use some help improving it.
Jarle212 #37
Posted 23 April 2013 - 09:06 AM
Anyone want the lua code for the redstone engine temperature controller? I could use some help improving it.

Yes that would be cool :)/>
elfin8er #38
Posted 23 April 2013 - 09:13 AM
Here's the code for the heat detector for the Stirling engine. It requires Open CC Sensors to work. The biggest problem I'm having, is that it's not putting a decimal point when it prints the heat. So instead of print out 100.5 degrees, it'll print out 1005. Anyone have any ideas for adding that little decimal in the correct spot?

Here's the code. I took out all of the website addresses for security.

timer = 0
os.loadAPI("ocs/apis/sensor")
prox = sensor.wrap("left")
local targets = prox.getTargets()
function funcheat()
while true do
  for entity, basicDetails in pairs(targets) do
  local moreDetails = prox.getTargetDetails(entity)
  heat = moreDetails.Heat
	if heat ~= nil then
	  term.clear()
	  term.setCursorPos(1,1)
	  overheat()
	  print(heat)
	  http.request(""..heat)
	  sleep(1)
	  timer = timer + 1
	end
  end
end
end
function overheat()
if timer >= 30 then
  if heat ~= nil then
	if heat >= 1000 then
		  http.request("")
		  timer = 0
		end
	end
  end
end

funcheat()
Jarle212 #39
Posted 23 April 2013 - 09:20 AM
Here's the code for the heat detector for the Stirling engine. It requires Open CC Sensors to work. The biggest problem I'm having, is that it's not putting a decimal point when it prints the heat. So instead of print out 100.5 degrees, it'll print out 1005. Anyone have any ideas for adding that little decimal in the correct spot?

Here's the code. I took out all of the website addresses for security.

timer = 0
os.loadAPI("ocs/apis/sensor")
prox = sensor.wrap("left")
local targets = prox.getTargets()
function funcheat()
while true do
  for entity, basicDetails in pairs(targets) do
  local moreDetails = prox.getTargetDetails(entity)
  heat = moreDetails.Heat
	if heat ~= nil then
	  term.clear()
	  term.setCursorPos(1,1)
	  overheat()
	  print(heat)
	  http.request(""..heat)
	  sleep(1)
	  timer = timer + 1
	end
  end
end
end
function overheat()
if timer >= 30 then
  if heat ~= nil then
	if heat >= 1000 then
		  http.request("")
		  timer = 0
		end
	end
  end
end

funcheat()

Hmm, not shure. Might work if you devide the heat by 10
elfin8er #40
Posted 23 April 2013 - 09:30 AM
Here's the code for the heat detector for the Stirling engine. It requires Open CC Sensors to work. The biggest problem I'm having, is that it's not putting a decimal point when it prints the heat. So instead of print out 100.5 degrees, it'll print out 1005. Anyone have any ideas for adding that little decimal in the correct spot?

Here's the code. I took out all of the website addresses for security.

timer = 0
os.loadAPI("ocs/apis/sensor")
prox = sensor.wrap("left")
local targets = prox.getTargets()
function funcheat()
while true do
  for entity, basicDetails in pairs(targets) do
  local moreDetails = prox.getTargetDetails(entity)
  heat = moreDetails.Heat
	if heat ~= nil then
	  term.clear()
	  term.setCursorPos(1,1)
	  overheat()
	  print(heat)
	  http.request(""..heat)
	  sleep(1)
	  timer = timer + 1
	end
  end
end
end
function overheat()
if timer >= 30 then
  if heat ~= nil then
	if heat >= 1000 then
		  http.request("")
		  timer = 0
		end
	end
  end
end

funcheat()

Hmm, not shure. Might work if you devide the heat by 10
That was easy. I suck at programming. Thanks so much!

The new video is uploading right now. It shows that I made everything SMS based, and I added engine heat control.
Jarle212 #41
Posted 23 April 2013 - 09:34 AM
No problem :D/>
elfin8er #42
Posted 23 April 2013 - 09:43 AM
So I'm running out of things to use this for already. What would you guys use it for?
elfin8er #43
Posted 23 April 2013 - 09:52 AM
Here's the update video. Don't forget to watch in HD.

[media]http://www.youtube.com/watch?v=DEakr7BbAEA[/media]
ironwiccan #44
Posted 23 April 2013 - 10:38 AM
That's awsome dude! Cant wait for the tutorial!
Jarle212 #45
Posted 23 April 2013 - 11:01 AM
:D/>
iownall555 #46
Posted 23 April 2013 - 11:49 AM
I hope you have done this with some sort of Arduino or other microcontroller.
Like someone mentioned before u could use a Arduino with a GSM Shield for getting the data,
Im not sure how you got the "ivr" working that tells you press 1 or 2 etc..

Really awesome thing im looking forward too see how you have done it

Greets Loki
How easy is it to program a Arduino?

It wouldn't be too difficult to program an Arduino for this purpose, the voice prompts however may be a problem. The only hard part would be making a program to read the data from GSM modem and use it to control something.

I'm going to try this since I have one.

elfin8er, is it alright if I post a couple of screenshots here if I get something working?

Also, awesome vid. I'm looking forward to the next one.
elfin8er #47
Posted 23 April 2013 - 11:50 AM
I hope you have done this with some sort of Arduino or other microcontroller.
Like someone mentioned before u could use a Arduino with a GSM Shield for getting the data,
Im not sure how you got the "ivr" working that tells you press 1 or 2 etc..

Really awesome thing im looking forward too see how you have done it

Greets Loki
How easy is it to program a Arduino?

It wouldn't be too difficult to program an Arduino for this purpose, the voice prompts however may be a problem. The only hard part would be making a program to read the data from GSM modem and use it to control something.

I'm going to try this since I have one.

elfin8er, is it alright if I post a couple of screenshots here if I get something working?
Go for it! This sounds really interesting!
Smiley43210 #48
Posted 23 April 2013 - 12:17 PM
I wish I could see the videos from here at school, but it really sounds neat! Never really thought anyone would be able to do this.
elfin8er #49
Posted 23 April 2013 - 01:54 PM
I wish I could see the videos from here at school, but it really sounds neat! Never really thought anyone would be able to do this.
I have mad the impossible, possible. Mawhahaha!
elfin8er #50
Posted 23 April 2013 - 06:10 PM
I'm thinking of moving this to a new topic I want to create called something like "Connecting Computercraft To The Real World". I'm going to probably be buying a raspberry pi in the future, and would imagine it would be possible to do some things with computercraft and it.
elfin8er #51
Posted 24 April 2013 - 08:25 AM
It's possible I'd be able to play music with computercraft. It'd obviously have to use some other programs too, but I'm looking into it now. If I can figure it out, I'm going to make another topic about connecting the real world to computercraft.

Edit: YES! Got playing a pausing to work! I'm just gonna work on a simple song select, and maybe volume and what not.

Edit: Whew! This is way too hard. Maybe some other time…

Edit: Nevermind. I think I'm onto something here! It may be possible after all. I'm going to try a little bit of testing. This will probably require one extra program to run, and a php script.
iownall555 #52
Posted 24 April 2013 - 01:34 PM
Ok starting on my attempt at this now. I was going to start yesterday but I'm lazy. :P/>
elfin8er #53
Posted 30 April 2013 - 08:41 PM
Ok, kind of confused. Was the other topic deleted, and this one re-opened?
MudkipTheEpic #54
Posted 30 April 2013 - 09:07 PM
This happened.
elfin8er #55
Posted 30 April 2013 - 09:21 PM
Snap. I just lost three days worth of code/tutorials.
Jeroen Mathon #56
Posted 09 May 2013 - 07:40 PM
I have an decent knowledge of programming but im curious how you interact with the engines also what mod pack are oyu using?
LordIkol #57
Posted 10 May 2013 - 06:32 AM
I have an decent knowledge of programming but im curious how you interact with the engines also what mod pack are oyu using?

Its not that hard to manage

Lets see what we have within Computercraft:

1. We can Access the Internet and interact with a PHP Script
2. We can Run Code based on Readings from PHP

What we Need:

1. Sth. that can handle Phone Calls and/or SMS and Communicate with a database or PHP
2. A PHP Script.

so i would go for arduino and for everyone who wants to build sth like this i would go through this things

1. Send Data from Arduino to PHP: http://blog.thiseldo.co.uk/?p=418
2. Handle SMS and Phone Calls with Arduino: http://tronixstuff.wordpress.com/2011/01/31/tutorial-arduino-and-gsm-cellular-%E2%80%93-part-two/

With a decent knowledge of Programming an arduino + Wifi Shield and GSM Shield or Only GSM shield if u use Mobile Internet you get it done fairly easy.

For Reading the Engine Status you would also need a mod like OpenCCSensors but the process is the same

Greets
Loki
elfin8er #58
Posted 12 May 2013 - 06:54 PM
I have an decent knowledge of programming but im curious how you interact with the engines also what mod pack are oyu using?

Its not that hard to manage

Lets see what we have within Computercraft:

1. We can Access the Internet and interact with a PHP Script
2. We can Run Code based on Readings from PHP

What we Need:

1. Sth. that can handle Phone Calls and/or SMS and Communicate with a database or PHP
2. A PHP Script.

so i would go for arduino and for everyone who wants to build sth like this i would go through this things

1. Send Data from Arduino to PHP: http://blog.thiseldo.co.uk/?p=418
2. Handle SMS and Phone Calls with Arduino: http://tronixstuff.w...80%93-part-two/

With a decent knowledge of Programming an arduino + Wifi Shield and GSM Shield or Only GSM shield if u use Mobile Internet you get it done fairly easy.

For Reading the Engine Status you would also need a mod like OpenCCSensors but the process is the same

Greets
Loki
Pretty much how it works, but the hardware isn't on my side. Only the PHP scripting.
Symmetryc #59
Posted 12 May 2013 - 08:16 PM
Snap. I just lost three days worth of code/tutorials.
QuantumGrav found a method of recovery, he helped oeed recover some stuff, you might want to talk to him.
elfin8er #60
Posted 23 May 2013 - 11:04 PM
Snap. I just lost three days worth of code/tutorials.
QuantumGrav found a method of recovery, he helped oeed recover some stuff, you might want to talk to him.
idk, I haven't really been doing anything with it anyways.