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

Jukebox With Redpower 2

Started by DarkNinja2462, 23 February 2012 - 12:42 AM
DarkNinja2462 #1
Posted 23 February 2012 - 01:42 AM
I made a jukebox with Redpower 2 and ComputerCraft.
It plays ALL VANILLA Minecraft music discs.

—–Installation——————————————————————————-
1. Download the zip and extract it
2. Put the file where you can access it in-game (preferably /rom/programs)
3. Watch video on how 2 build
4. Power it up with some BT Batteries
5. PROFIT
—————————————————————————————————
[media]http://www.youtube.com/watch?v=ZN1kf-zzXc8&feature=youtu.be[/media]
Casper7526 #2
Posted 23 February 2012 - 02:13 AM
This is a program, it goes in the program library.
DarkNinja2462 #3
Posted 23 February 2012 - 02:14 AM
I thought a peripheral was hardware?
Casper7526 #4
Posted 23 February 2012 - 02:19 AM
A peripheral is a mod that interacts with the computercraft API. It's not for programs/setups made in pure lua.
Tigerlife #5
Posted 17 March 2012 - 04:55 AM
easier way using only computercraft mod- put normal minecraft music disks in disk drive thentype in computer or turtle "dj"
Pigbear #6
Posted 18 March 2012 - 03:44 PM
Exactly.
Espen #7
Posted 18 March 2012 - 04:00 PM
easier way using only computercraft mod- put normal minecraft music disks in disk drive thentype in computer or turtle "dj"
Exactly.
Have you watched the video?
He created a system where you can choose a disk from a menu and then it will be automatically fetched from storage and put into the disk drive to be played.
So he didn't implement the already existing ability for disk drives to play music discs, but rather extended that with a system to change disks automatically.
mememan000 #8
Posted 19 March 2012 - 07:30 PM
~
Edited on 28 August 2015 - 01:39 AM
wooby_6 #9
Posted 26 March 2012 - 09:25 AM
I've created a similar system using buildcraft & logistics pipes

I'm having trouble with the damm code, logistics pipes uses a request pipe, the request pipe allows me to request a disc from a chest to load into the disk drive

now im trying to automate the play/ eject process using a buildcraft gate (the gate detects when a item is moving through a pipe & when it is not, & provides a redstone singal)

in my case the redstone is constantly on until a item moves through it in which case it turns off.

this is what i have so far:


function os.pullEvent()
local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
if event == "terminate" then
end
return event, p1, p2, p3, p4, p5
end
print("Wooby6 automated jukebox:")
--loop here
if rs.getInput("right") == false and disk.isPresent("top") then
disk.eject("top")
sleep(1)
disk.playAudio("top")
else
sleep(2)
disk.playAudio("top")
end
-- loop end here

but i cant get a loop to keep looking for the rs.getInput("right") == false
OmegaVest #10
Posted 26 March 2012 - 05:40 PM
but i cant get a loop to keep looking for the rs.getInput("right") == false


Sorry to piggyback on this thread, but I see a chance to help here.

Use while rs.getInput("right") do , or while true do os.pullEvent() and then interrupt the loop with a break once it has run.

Also, you might think about having the system pulse for ejection before the while loop hits.