MCSH 0 Posted March 1, 2019 Share Posted March 1, 2019 Hi guys, I started playing with OCC again and putting the videos on YouTube. I'd love to get some feedback from you guys and some pointers on what to do next. Check it out here: Quote Link to post Share on other sites
Molinko 43 Posted March 1, 2019 Share Posted March 1, 2019 I love that you're posting OC videos on youtube! Definitely not enough content out there to enjoy . I would suggest a perhaps more simple handler for the list of movements though. -- # The almighty lookup table local actions = { f = robot.forward, b = robot.back, u = robot.up, d = robot.down, tl = robot.turnLeft, tr = robot.turnRight, ta = function() -- # turn around local status, reason for i = 1, 2 do status, reason = robot.turnLeft() if not status then break end end return status, reason end, s = robot.swing, su = robot.swingUp, sd = robot.swingDown, ... } function move.act(act) if not actions[act] then return false, "Undefined act" end return actions[act]() end Quote Link to post Share on other sites
MCSH 0 Posted March 1, 2019 Author Share Posted March 1, 2019 Thanks! That looks so much better, I think as of the 3rd episode I have something like this: actions['f'] = robot.forward .... Any idea on projects to work on? Other than creating an army remotely controlled robot which I'll definitely do sooner or later. Quote Link to post Share on other sites
Molinko 43 Posted March 1, 2019 Share Posted March 1, 2019 I think some form of navigation library and server would be great. Imagine a robot or drone wants to go somewhere in your base. You could write a server that calculates a path from point 'A' to point 'B' and serves a path string (like the one your library uses) back to the robot/drone. Maybe have the server update knowledge of the base layout with a robot / drone using a geolyzer so it can give clear paths to clients. It's a mouthful but could keep other programs very simple and would be very reusable. Quote Link to post Share on other sites
selli69 0 Posted May 11, 2019 Share Posted May 11, 2019 Hey! Thanks for the tutorial. I learned a lot from it! Unfortunately I had problems to access the library functions from the main program. This was because the name "move" for the lib doesn't work. I changed the libs name to "movebot" and now everything works fine. My OC version is 1.7.4.153 Maybe this information helps others with the same problem. gl&hf Quote Link to post Share on other sites