Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

All Activity

This stream auto-updates     

  1. Today
  2. This hasn't been supported since Minecraft 1.6.4 and OpenComputers 1.2. It was originally posted in 2014, no this isn't on curse and will not be.
  3. That’s a very interesting premise might check it out if it’s still online
  4. lukeh990

    Blorcart Server

    I would of loved to join but I have no Spanish knowledge and couldn’t navigate that easily and I’m a bit noob at OC maybe I’ll try again later with a translation app
  5. Is this on curse yet? I saw something Sinaloa’s while browsing on the twitch launcher
  6. Yesterday
  7. I've just tried running exactly the same code you have, and it worked. Although the µC turned off right after that, as the its program doesn't have any kind of loop to keep the µC busy. This may be the reason you don't notice that it actually turns on.
  8. This is from the OC Wiki: Idk if they forgot to list microcontrollers or they left them away intentionally because they aren't supported. But since drones work I don't really see why microcontrollers shouldn't.
  9. The problem is that the robot has set the hard drive as the default boot address. The only way to change this is to either, remove the hard drive (which you can't do since this is a robot and not a computer) or to use computer.setBootAddress([address:string]) (which you have to actually be able to start the robot in order to do). I'd say your best bet for ever recovering that robot is to just put it in a disassembler and hope that you don't lose any of the important components. Then you can fix the hard drive using a normal computer or just replace it before assembling the robot again.
  10. Last week
  11. Yes, and I have gotten it to work with normal computers just not with microcontrollers
  12. What exactly do you need help with? The sending and executing commands? BTW, Payonel has created a great program called psh, that does exactly that. So you can have a look there, you might get some inspiration on how to tackle some of your problems.
  13. Is the wireless signal strenght enough to reach the second microcontroller?
  14. I am currently working on a project using microcontrollers and need to be able to turn them on remotely using the setWakeMessage function though i seem to be doing something wrong. Microcontroller1: local modem = component.proxy(component.list("modem")()) modem.broadcast(1,"start") Microcontroller2: local modem = component.proxy(component.list("modem")()) modem.open(1) modem.setWakeMessage("start") Both of the microcontrollers have a tier 2 wireless network card and the one that is supposed to turn on (Microcontroller2) has of course been turned on previously so the port and the wake message should be set but it still doesn't turn on.
  15. Okay i thank you very much CptMercury it works completly^^.
  16. Thank you for reply I used the the adress from the receiving computer. You can see the adresses from the receiving computer in the second picture above. and how i used it in the sending computer in the first picture. I it didn´t worked. Can you maybe sendme the component.modem.send() function how you would write it for the channel "123" and the data "Hallo World" (I forget the quote so i send it again.)
  17. Thank you for reply I used the the adress from the receiving computer. You can see the adresses from the receiving computer in the second picture above. and how i used it in the sending computer in the first picture. I it didn´t worked. Can you maybe sendme the component.modem.send() function how you would write it for the channel "123" and the data "Hallo World"
  18. The first parameter for the send() function should be the modem that you want to receive the message, not the one you're sending from
  19. Thank you for respons, I tried it with the full adress and that also didn´t worked. So how do i have to use the adress exactly?
  20. @pierrecastor I don't know for sure but the issue appeared very early on in 1.7.4 and was only resolved with 1.7.5 so I'd assume yes.
  21. You need to use the full address with modem.send()
  22. Dear OpenComputer Forum Users, I tried to send a message with: component.modem.send("2ef", 123, "hallo") and the other Computer didn´t receive a modem_message. How I tried it: -Receiving Computer in the lua interface: component.modem.open(123) =event.pull("modem_message") -Sending Computer in the lua interface: component.modem.open(123) component.modem.send("2ef", 123, "hallo") -Then is saw the switch blinking, but on the of the Receiving Computer didn´t appear a modem_message. For the backround: I tried it with networkcards and Wireless networkcards and it didn´t work. It worked with: component.modem.broadcast(123, "hallo") and it also worked with linked cards to send, but there is no adress required. So i think it has something to do with the Adress. So I tried it with the adress of the receiving Computer´s Network card, the network card of the sending computer and the adress of the computer. Even the full adress of the receiving network card didn´t work ( "2efdd118-8039-4bcc-a86f-12e80010a1b7") So my question is what do i wrong? What could i try else? Or what do i else have to put in the adress slot for sending? Setup: Thank you for any help!
  23. BRGC uses as much steam as the blades in your turbine support. Your turbine needs to have enough drag (aka coils) so that it doesn't go overspeed. You either don't have enough coils or you have too many blades.
  24. When calibrating my turbine the program keeps increasing the speed of the turbine till it errors, anyone know what is happening?
  25. Let me try to explain what's happening here. First, create a file called t.lua: print(xyz) xyz = 12345 If you run the script once, it will print: nil Then, you run it again it and it will print: 12345 So, why is that? The answer is global variables. With the statement xyz = 12345 you declare a global variable, and these variables live longer than the script. In fact, in OC they live until the computer shuts down. In the entire script you posted does not define the following variables. FR1, FR2, FR3, FR4 FR1D, FR2D, FR3D, FR4D FR1MD, FR2MD, FR3MD, FR4MD FR1C, FR2C, FR3C, FR4C And since you did not declare those, your script looks them up in the global table. There Lua finds some of them, because some code you ran before declared them as global variables, and they still there. So, always define the variables that you use inside your script; and declare them as locals WHEREVER possible. Because when you leave the the script (or each enclosing block) the locals are deleted and don't pollute the global environment. This part here looks like you try to change or declare variables by putting them into a function. But that does not work. When you declare a variable like this: var1 = some_value -- or as local local var1 = some_value you push some_value into the variable. If you then take a function: local function test(a, b) -- do something end and call it like local var2 = some_other_value test(var1, var2) you DO NOT give that variable to the function so the function can modify that variable. Instead, the value that is stored in the variables are copied and passed to the function as arguments. That means, if you put a new value into the argument within the function, it is only changed inside that function, the outer variable will still contain the old value. Therefore, if you want to change some value using a function, there are two possibilities. -- #1 functions to perform a specific task -- in this case, changing a variable declared before local x = 5 -- x is 5 local function square() x = x^2 end -- x is still 5 -- calling the function now then changes the value square() -- x is now 25 --*********************************************************+-- -- #2 function to compute a value and return it local function square1(n) return n^2 end local y = square1(5) -- y is 25 For your use, the second method is more suitable. Here is an implementation of your function above. local function getDur(slot) local fuel_rod = ic.getStackInSlot(SIDE, slot ) local color -- you dont need to initialize it with a value local dmg = fuel_rod.damage local maxdmg = fuel_rod.maxDamage if dmg == 0 then color = "0x008421" elseif dmg > 0 and frdmg < 2500 then color = "0x00FF00" elseif dmg >= 2500 and frdmg < 5000 then color = "0xFFFF00" elseif dmg >= 5000 and frdmg < 7500 then color = "0xFFA800" elseif dmg >= 7500 and frdmg < 10000 then color = "0xFF6D00" elseif dmg >= 10000 and frdmg < 12500 then color = "0xFF3A00" elseif dmg >= 12500 and frdmg < 15000 then color = "0xFF2B00" elseif dmg >= 15000 and frdmg < 17500 then color = "0xFF0000" elseif dmg >= 17500 and frdmg < 20000 then color = "0x970000" end -- you only need to return what you really need return fuel_rod, slot, dmg, maxdmg, color end local FR1, slot1, FR1D, FR1MD, FR1C = getDur(21) local FR2, slot2, FR2D, FR2MD, FR2C = getDur(25) local FR3, slot3, FR3D, FR3MD, FR3C = getDur(30) local FR3, slot3, FR3D, FR3MD, FR3C = getDur(34) print(FR1D, FR1MD, FR1C) print(FR2D, FR2MD, FR2C) print(FR3D, FR3MD, FR3C) print(FR4D, FR4MD, FR4C) Hope that helps.
  26. Try this: local component = require("component") local computer = require("computer") local term = require("term") local aw = require("adWrite") local ic = component.inventory_controller local gp = component.gpu local rc = component.reactor_chamber --local tr = component.proxy(component.get("7621f0f8")) --local rslamps = component.proxy(component.get("61d91131")) --local rsreactor = component.proxy(component.get("a0a9b4d3")) local colors = { green = 0x00FF00, yellow = 0xFFFF00, orange = 0xFFA800, black = 0x000000, white = 0xFFFFFF, red = 0xFF0000, blue = 0x0000FF, cyan = 0x00FFFF } --function write(zeile, spalte, str) -- term.setCursor(spalte, zeile) -- aw.write(str) --end function centerF(row, str) local w = gp.getResolution() term.setCursor((w - #str)/2, row) term.write(str) end gp.setResolution(85, 27) term.clear() term.setCursor(1, 1) local INVENTORY_SIDE for i = 0, 5 do if ic.getInventorySize(i) then INVENTORY_SIDE = i break end end local anzahl_slots = ic.getInventorySize(INVENTORY_SIDE) local reaktor_symbole = { ["ic2:overclocked_heat_vent"] = "X", ["ic2:component_heat_vent"] = "O", ["ic2:quad_uranium_fuel_rod"] = "U", ["ic2:component_heat_exchanger"] = "W" } local dmg_colors = {[0] = "0x008421", "0x00FF00", "0xFFFF00", "0xFFA800", "0xFF6D00", "0xFF3A00", "0xFF2B00", "0xFF2B00", "0xFF0000" } local rc_status_text = {[0] = "<color fg=" .. dmg_colors[1] .. ">Alles OK </color>", "<color fg=" .. dmg_colors[2] .. ">Warm </color>", "<color fg=" .. dmg_colors[3] .. ">Sehr Warm </color>", "<color fg=" .. dmg_colors[5] .. ">Sehr Heiß </color>", "<color fg=" .. dmg_colors[8] .. ">ACHTUNG KERNSCHMELZE STEHT BEVOR!</color>" } local function getDuri(slot) local item = ic.getStackInSlot(INVENTORY_SIDE, slot) if not item then return {nil} end local dmg = item.damage local maxdmg = item.maxDamage local name = item.name local prozent = math.ceil(dmg / maxdmg * 8) local dmgColor = dmg_colors[prozent] or dmg_colors[0] return {item, dmg, maxdmg, dmgColor, name} end local function makepadding(text, max) return string.rep(" ", max - #tostring(text)) end gp.setBackground(colors.black) local line = string.rep("-", 51) gp.setForeground(colors.orange) centerF(2, line) centerF(3, "----- Atomreaktor -----") centerF(4, line) gp.setForeground(colors.green) centerF(6, "Brennstäbe") term.setCursor(2, 8) gp.setForeground(colors.cyan) centerF(9, "Komponenten") gp.setForeground(colors.white) term.setCursor(1, 16) gp.setForeground(colors.yellow) centerF(17, "Legende") term.setCursor(1, 18) gp.setForeground(colors.white) term.setCursor(20, 18) aw.write("X = Übertakter Hitzeabzug") term.setCursor(20, 19) aw.write("O = Komponenten-Hitzeabzug") term.setCursor(20, 20) aw.write("U = Vierfach-Brennstab (Uran)") term.setCursor(20, 21) aw.write("W = Komponenten-Wärmetauscher") while true do local rcHeat = rc.getHeat() local rcMaxHeat = rc.getMaxHeat() local rcProzent = math.ceil(rcHeat / rcMaxHeat * 4) local rcStatus = rc_status_text[rcProzent] term.setCursor(30, 23) aw.write("Reaktor Status: " ..rcStatus) local rcOnline = rc.producesEnergy() if rcOnline then term.setCursor(1, 24) gp.setForeground(colors.green) centerF(24, "Online ") else term.setCursor(1, 24) gp.setForeground(colors.red) centerF(24, "Offline") end local x = 38 local y = 10 local uran_zahl = 1 local ausgabe_uran = "" for slot = 1, anzahl_slots do -- Reaktor Komponenten anzeigen local item = getDuri(slot) if item[1] then gp.setForeground(tonumber(item[4])) gp.set(x, y, reaktor_symbole[item[5]]) if item[5] == "ic2:quad_uranium_fuel_rod" then -- Brennstäbe Ausgabe erstellen if ausgabe_uran ~= "" and uran_zahl ~= 5 then ausgabe_uran = ausgabe_uran .. " | " elseif uran_zahl == 5 then ausgabe_uran = ausgabe_uran .. "\n " end ausgabe_uran = string.format("%s%s: <color fg=%s>%s%d</color>/%d", ausgabe_uran, uran_zahl, item[4], makepadding(item[2], 5), item[2], item[3]) uran_zahl = uran_zahl + 1 end else gp.set(x, y, " ") end x = x + 1 if x > 46 then -- nächste Zeile x = 38 y = y + 1 end end term.setCursor(9, 7) gp.setForeground(colors.white) aw.write(ausgabe_uran) os.sleep(1) end
  27. Found the bug in the draw_fuel_rods function. Simply replace the old with: local function draw_fuel_rods(component_list) local fuel_rods = {} for _, item in ipairs(component_list) do if item.name == "Quad Fuel Rod (Uranium)" then local str = string.format( "%d:%s<color fg=0x%x>%d</color>/%d", #fuel_rods + 1, spacings[math.floor(math.log(item.damage, 10))], item.color, item.damage, item.max_damage ) table.insert(fuel_rods, str) end end fuel_rods = table.concat(fuel_rods, " | ") gp.setForeground(colors.green) centerF(6, string.format("Brennstäbe")) local len = #fuel_rods:gsub('<color.->(.-)</color>', function (a) return a end) term.setCursor((gp.getResolution() - len)/2, 7) gp.setForeground(colors.white) aw.write(fuel_rods) end Also, add term.clear() above the main loop
  1. Load more activity
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.