I am a complete noob to this and i have miraculously managed to string toghether a program, but now i am wondering, is there any way to start a program on a computer from a pocket computer? like i type into the pocket computer "Run program ("base")" and it runs on my computer? if so how? all help is appreciated!
Wireless control
Started by Sindre2905, Feb 10 2015 11:07 PM
6 replies to this topic
#1
Posted 10 February 2015 - 11:07 PM
#2
Posted 11 February 2015 - 01:05 AM
You probably need to use modems for this.
The pocket computer could send a message through the modems, and the other computer would run the program when it got the message.
The receiving computer needs to be running a program that listens for messages.
Here is the Modem API: http://computercraft...Modem_%28API%29
Or the Rednet API: http://computercraft...ednet_%28API%29
You can use either, but I personally prefer interfacing with modems directly (with the Modem API)
Just ask if you have any questions
The pocket computer could send a message through the modems, and the other computer would run the program when it got the message.
The receiving computer needs to be running a program that listens for messages.
Here is the Modem API: http://computercraft...Modem_%28API%29
Or the Rednet API: http://computercraft...ednet_%28API%29
You can use either, but I personally prefer interfacing with modems directly (with the Modem API)
Just ask if you have any questions
#3
Posted 11 February 2015 - 01:41 AM
Thanks a lot, i am now trying to figure out how to use the rednetAPI but whenever i try to use it i get an attempt to call nil. How do i actually use the API's? do i have to get them off pastebin and use the os.loadAPI? if so where can i find the pastebin? (i might be way off on that last part)
#5
Posted 11 February 2015 - 01:56 AM
Good job Dog, answered my question before it was approved!
Oh wait no you didnt, still, thanks Dog!
Oh wait no you didnt, still, thanks Dog!
#6
Posted 11 February 2015 - 02:59 AM
You're welcome 
Please post your code - that'll help us help you a lot easier and faster.
In answer to using the APIs - no, you don't need to download them and use os.loadAPI - they're 'built-in' to CC's Lua
EDIT: Don't forget to use code tags for your code
[.CODE]
code here
[./CODE]
(use the above tags, but without the dots)
Please post your code - that'll help us help you a lot easier and faster.
In answer to using the APIs - no, you don't need to download them and use os.loadAPI - they're 'built-in' to CC's Lua
EDIT: Don't forget to use code tags for your code
[.CODE]
code here
[./CODE]
(use the above tags, but without the dots)
Edited by Dog, 11 February 2015 - 03:00 AM.
#7
Posted 11 February 2015 - 03:50 AM
Sindre2905, on 11 February 2015 - 01:41 AM, said:
Thanks a lot, i am now trying to figure out how to use the rednetAPI but whenever i try to use it i get an attempt to call nil. How do i actually use the API's? do i have to get them off pastebin and use the os.loadAPI? if so where can i find the pastebin? (i might be way off on that last part)
Like Dog said all CC APIs are built in.
For example, with rednet:
rednet.open("right")
would open the modem on the rightYou can always type 'help rednet' (replacing rednet with your API or program) in a CC terminal.
That might help give you some info In-game (and lets you know if your spelling is correct)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











