Jump to content




Wireless control


  • You cannot reply to this topic
6 replies to this topic

#1 Sindre2905

  • Members
  • 3 posts

Posted 10 February 2015 - 11:07 PM

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!

#2 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

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 :)

#3 Sindre2905

  • Members
  • 3 posts

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)

#4 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 11 February 2015 - 01:55 AM

Don't forget read for typing in your commands (in case you weren't already aware)

EDIT: corrected a mistake

Edited by Dog, 17 February 2015 - 05:41 AM.


#5 Sindre2905

  • Members
  • 3 posts

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!

#6 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

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)

Edited by Dog, 11 February 2015 - 03:00 AM.


#7 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 11 February 2015 - 03:50 AM

View PostSindre2905, 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 right

You 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)





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users