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

Is there any cool way to use a Raspberry Pi with ComputerCraft?

Started by RubiksJr, 31 January 2015 - 02:22 AM
RubiksJr #1
Posted 31 January 2015 - 03:22 AM
Something like connecting to my raspi remotely, like a CC PuTTY. Or anything cool for that matter.

I was thinking putting some files on my pi, and using CC to access and download it to the CC terminal in Minecraft. Any ideas on how I can do this? PS, I am looking for help on the CC side, not the raspi side.
Lyqyd #2
Posted 31 January 2015 - 04:03 AM
However you'd get to the files via your web browser.

You'd just use the http API to request the desired URL, then write the contents into a file.

As for the first line (which I merged from another topic you created), that is likely impossible without additional mods installed, and would be tricky even with other mods, unless designed specifically for that purpose.
RubiksJr #3
Posted 31 January 2015 - 12:01 PM
Thanks
kornichen #4
Posted 31 January 2015 - 03:09 PM
That might be possible using PHP scripts and a lua, python, bash script or whatever on your Raspi.
Just take yourself a web server with MySQL and PHP. Then, write a script on the Raspi that is sending a request with a folder list each time the folder content changes (A Cron Job would be useful to check that). You can now use another PHP script to get the folder content from the database to your CC computer. Do just the same to transfer files.
Attention: Do not ask for new files to often because your database may be overloaded if you do a database request every second. I think five to ten seconds would be fine.
CreeperWiz #5
Posted 02 February 2015 - 07:03 PM
Something like connecting to my raspi remotely, like a CC PuTTY. Or anything cool for that matter.

I was thinking putting some files on my pi, and using CC to access and download it to the CC terminal in Minecraft. Any ideas on how I can do this? PS, I am looking for help on the CC side, not the raspi side.
If you can contact me if you get something to work because I was thinking of this a couple days ago! :)/>