- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Gorzoid
-
Content Count
111 -
Joined
-
Last visited
-
Days Won
22
Posts posted by Gorzoid
-
-
how r00de of u to ignore my follow script xD jk lol it is so outdated I bet it is much easier to do now
-
Pretty good idea, and ye something like a small base for the robot, something like the size of a lever. And then you create your shell over it, that would be pretty cool.
-
I am not a OpenComputers programmer i just like to play around with open computers and opencomputers programs so can you please tell me how i can get this working?
Ehh this is quite old, not sure if it works, but I think you need to download the file at https://gist.github.com/fnuecke/6bcbd66910b946b54ec7 and use the flash command to flash that file onto an eeprom (you can see how on the drones tutorial here https://www.youtube.com/watch?v=W5JTRKdup7s) then download this and save to client.lua
make sure a wireless card is on the drone and the computer and u also need a motion sensor on the computer.
once you have done that you should be able to turn on the drone and then run the program, be sure to edit the client.lua to set the positions of the motion sensor and drone otherwise it will not move to u properly
-
Nick: Gorzoid
Age: 15
IGN: PG_Gorzoid
-
I am already playing on a survival minecraft server with Open Computers, but I am wondering if anyone is hosting a creative server for people who just want to make cool creations with OC. If there is post here please, or if it's private tell me how I could join.
-
Changed it up, it now uses navigation upgrade instead of motion sensor so you can now walk anywhere and drone will follow as long as you are close enough to both it and a labled waypoint. Sadly though it is alot laggier because of the delay in navigation.findWaypoints() I could implement code to use it less frequently by translating positions of waypoints after moving but for now this is fine.
Code:
EEPROM:
--Follow Script EEPROM local PORT_FOLLOW = 0xbf01 local MAX_DIST = 100 local drone = component.proxy(component.list("drone")()) local modem = component.proxy(component.list("modem")()) local nav = component.proxy(component.list("navigation")()) modem.open(PORT_FOLLOW) local function findClient() while true do local evt,_,sender,port,dist,msg = computer.pullSignal() if evt == "modem_message" and port == PORT_FOLLOW and dist < MAX_DIST and msg == "FOLLOW_REQUEST_LINK" then drone.setStatusText("Linked: "..sender:sub(1,3)) modem.send(sender,port,"FOLLOW_LINK") return sender end end end local function getNearbyNodes(justLabels) local waypoints = nav.findWaypoints(MAX_DIST) local nodes = {} for i = 1,waypoints.n do if justLabels then nodes[i] = waypoints[i].label else local wp = waypoints[i] nodes[wp.label] = wp.position end end return nodes end local client,nodes,noResponse = findClient(),getNearbyNodes() local timeout = computer.uptime() + 10 while true do local evt,_,sender,port,dist,msg,label,ox,oy,oz = computer.pullSignal(timeout - computer.uptime()) if moving and drone.getOffset() < 0.5 then moving = false nodes = getNearbyNodes() end if not evt then if noResponse then return end noResponse = true; modem.send(client,PORT_FOLLOW,"HEARTBEAT_REQUEST") timeout = timeout + 1 elseif evt == "modem_message" and sender == client and port == PORT_FOLLOW and dist < MAX_DIST then if msg == "HEARTBEAT_RESPONSE" then noResponse = false elseif msg == "HEARTBEAT_REQUEST" then modem.send(sender,port,"HEARTBEAT_RESPONSE") elseif msg == "POS_UPDATE" and not moving then local node = nodes[label] if not node then modem.send(sender,port,"UPDATE_NODES",label,table.unpack(getNearbyNodes(true))) else drone.move(node[1] - ox, node[2] - oy, node[3] - oz) moving = true modem.send(sender,port,"OK") end end timeout = computer.uptime() + 10 end end
Client
--Follow Script Client local PORT_FOLLOW = 0xbf01 local component = require("component") local event = require("event") local os = require("os") local modem = component.modem local nav = component.navigation modem.open(PORT_FOLLOW) local function findDrone() modem.broadcast(PORT_FOLLOW,"FOLLOW_REQUEST_LINK") local _,_,sender,port,_,msg = event.pull("modem_message",nil,nil,PORT_FOLLOW,nil,"FOLLOW_LINK") return sender end local drone = findDrone() local function heartbeatHook(_,_,sender,port,_,msg) if sender == drone and port == PORT_FOLLOW and msg == "HEARTBEAT_REQUEST" then modem.send(sender,port,"HEARTBEAT_RESPONSE") end end event.listen("modem_message",heartbeatHook) modem.send(drone,PORT_FOLLOW,"POS_UPDATE") local nodes = {select(7,event.pull("modem_message",nil,drone,PORT_FOLLOW,nil,"UPDATE_NODES"))} local function getNode() local tbl = nav.findWaypoints(100) for i=1,tbl.n do local label = tbl[i].label for i2=1,#nodes do if label == nodes[i2] then return label,table.unpack(tbl[i].position) end end end end while true do local label,x,y,z = getNode() print(label,x,y,z) modem.send(drone,PORT_FOLLOW,"POS_UPDATE",label,x,y,z) local args = {select(6,event.pull("modem_message",nil,drone,PORT_FOLLOW,nil))} if table.remove(args,1) == "UPDATE_NODES" then nodes = args end os.sleep(0.1) end
Instructions for install:
- Insert an empty eeprom into your computer
- edit /dev/eeprom
- Paste the eeprom code and save.
- Paste the client code into either /usr/ or your mounted disk drive if you are using floppy disk of openos.
- Create a drone with navigation upgrade and wireless network card and the eeprom you made. (If you already have drone put it in crafting grid with your eeprom)
Instructions for use:
- Start drone first
- Then open client
- Done. (You gotta use Ctrl+Alt+C to escape because I am lazy)
Tell me what you guys would prefer?
- Motion sensors with limited range and portability but good accuracy and good speed.
- Navigation getPosition with very good range, medium portability and good speed.
- Navigation waypoints with good range, very high portability, and bad speed.
-
ye i was about to say this aswell, was really confused the only stuff i mark as spam is facebook
Website tagged on webfilter
in Lounge
Posted
So my school has a webfilter to stop people beating the snake during class(cus that always happens), I decided to look at what was on the forums when this popped up in my face...
does this website some history that I don't know about?