ping-pong bot

Post your tips & tricks for getting more out of your Robotic farm hands.

ping-pong bot

Postby Denis » Wed Jul 29, 2015 9:44 pm

Anyone can help me on how to wire the ping-pong bot effectively? The tutorial is nice and all, but it dates back to angled thrusters and bumpers all neatly aligned with the walls and the grid. Now that thrusters are going in diagonal to the grid, it's much more costly to do a ping-pong wiring, especially with the changes to the bumpers.

Anyways, I don't see how to make something like that, nor the modified ping-pong that "move down a row when he bounces left/right" as the "Collect 80 clay" mission suggests.
Denis
 
Posts: 138
Joined: Wed Jul 01, 2015 12:17 pm

Re: ping-pong bot

Postby worfc » Wed Jul 29, 2015 10:06 pm

Here's the guy I've been using to do diagonal rows with only the starter-logic gates.

The basic wiring you see just bounces NW/SE along a row. Some things you can do with just a couple of solders/trace-cuts:

* Make him only go one direction (so he doesn't keep turning around when sawing).
* Adjust to scoot over a row. (Pause at one end, reverse left/right while keeping up/down, walk 1-2 steps, revert wiring to image to ping-pong in the new row.)
* Without adjustment, you can swap tools, so he can hoe, then plant. Then the 1st change (above) so he can harvest, all without pausing (I make the changes while the tool is operating.)

Very soon, I'll be building additional gates, so I can fancy him up a bit to not require these manual changes.

NOTE: I didn't plan that these gates would create this robot. In very-early versions, you had 5 of every kind of gate, for testing. Over time, I reduced that to the current set, trying to leave something useful, but with room to grow. Turns out this particular wiring-job is pretty useful.

Also note: Without the nodes, you could ping-pong N/S or E/W, but y'all have convinced me that diagonal farming on the near wall is the way to go (better visibility.)

Also-also: "soon!", I'm going to make a user pref so the bumpers/thrusters can be "square" or "diagonal." Default will be square (like now), but I bet I end-up running diagonal most of the time. Depending on my mood, I might make the change programmable, to allow for some fancy robo-automation. :)

Image
Posted by WORFC, board admin, moderator, game author.

Please LIKE us on Facebook
You can also follow us on twitter: @roboFarmCraft
Check out the development blog (short updates 1-3x/week.)
User avatar
worfc
Site Admin
 
Posts: 226
Joined: Wed Apr 15, 2015 5:08 pm

Re: ping-pong bot

Postby worfc » Wed Jul 29, 2015 10:09 pm

Oop! I just noticed that the image I posted HAS one of the traces cut, so he doesn't ping pong. For proper pong-ing, connect the other input on the bottom of the latch to the North/Up bumper.

However, that's the cut you would make to prevent him from bouncing, as when sawing toward the NW. Cutting the other side keeps him going SE-only.
Posted by WORFC, board admin, moderator, game author.

Please LIKE us on Facebook
You can also follow us on twitter: @roboFarmCraft
Check out the development blog (short updates 1-3x/week.)
User avatar
worfc
Site Admin
 
Posts: 226
Joined: Wed Apr 15, 2015 5:08 pm

Re: ping-pong bot

Postby Denis » Wed Jul 29, 2015 10:31 pm

worfc wrote:Some things you can do with just a couple of solders/trace-cuts:
* Make him only go one direction (so he doesn't keep turning around when sawing).
* Adjust to scoot over a row. (Pause at one end, reverse left/right while keeping up/down, walk 1-2 steps, revert wiring to image to ping-pong in the new row.)
* Without adjustment, you can swap tools, so he can hoe, then plant. Then the 1st change (above) so he can harvest, all without pausing (I make the changes while the tool is operating.)


See it's the power-through-latch that threw me off. I kept wiring the nodes to the battery to power everything up instead of using the 'internal' power. Not surprising you progress faster than I do.

So that works for ping-pong. Is your quote above an indication that you can do all those things with the same amount of gates, just by re-wiring the same set without adding any gates (i.e., "with just a couple of solders/trace-cuts")? Can you enlighten me?
Denis
 
Posts: 138
Joined: Wed Jul 01, 2015 12:17 pm

Re: ping-pong bot

Postby worfc » Thu Jul 30, 2015 7:22 am

Denis wrote:(i.e., "with just a couple of solders/trace-cuts")? Can you enlighten me?


* If you add a trace where the yellow line is, he ping-pongs.
* If you don't add that trace, he only goes up/left (NW).
* If you add that trace, but cut the other Latch-input, he'll only ever switch to down/right (SE).

NOTE: The purpose of a latch is to "remember" it's current state until a signal on one of the inputs changes it. Hence, cutting one of the inputs won't stop him from going in his current direction, it will only prevent him from switching to that direction again, due to the bumper input. For example, if the robot is headed NW, he'll continue NW until the N bumper triggers a switch to SE. Then he'll continue SE until the S bumper triggers a switch back to NW again. If you cut the S-bumper input, he'll never switch to heading NW but, if he's already headed NW, he'll continue until the N bumper switches him to go SE. He just won't switch back, because the trace that switches him is cut.

So, for me, I've been doing this:

* Use ping-pong to hoe & plant a row. Ping-pong is ok, because dirt & seeds don't trigger a turn-around.
* While sawing, I turn-off the turn-around (cut one of the bumper traces), so robot continues in one direction. Otherwise, he'll cut a tree, turn around, walk back to the fence, turn around, walk to a tree, cut the tree, turn around, walk back to the fence... He still cuts all the trees, but it takes forever. NOTE: I'm saving up to get a rock-sensor, so I can make the turn-around only happen if the thing-bumped was a rock.
* When I want to switch to another row, my process is:
- Walk to one end of the current row, with the bumper-to-turn-around trace cut. (To prevent the latch from switching)
- Pause (turn off) the robot while he's jammed against the wall.
- Cut the traces from the left/right thrusters.
- Add a trace from the "hot" node to the "other" L/R thruster. That is, if I've got him at the NW end, I switch things so that he's going NE.
- Turn on the robot, then turn him back off again right away, so he takes one step only (sometimes he takes 2, if my fingers are slow. I have enough "spare rows" that this is ok.)
- Put the L/R thrusters back to the way they belong (see image, above.)

At this point, I'm usually ready to hoe/shovel again, so I do the first (end) cell while "facing the wrong way" and, while that is happening, I re-connect the bumper-to-latch that makes him turn around.

If, instead, my new row needs harvesting, I just use the saw while I'm walking "the wrong way" (NE in the above example), which makes stopping the robot in the new row a little easier. The rest of the process is the same.

It took me a couple of times to get it down but, now that I've done it several times, I can usually make any of these changes in the few seconds that it takes to hoe, shovel, plant or saw one cell, which means that I can do many of them without shutting down the robot. HOWEVER, I've screwed it up a couple of times, and ended up "going sideways", at which point I have to pause the robot, disconnect sometimes-a-lot of wires, hook him back up to return to a good starting location, then re-wire everything. It's like the game-version of "bug fixing" :)

One thing I'm looking forward to (I've done this on a "debug" farm where I can get anything instantly, but I'm not yet there on my "real" farm) is: once I have a rock sensor and a few nodes & OR gates, I can add-in logic that says: "When you hit a rock, move over a row, THEN turn around." This will make it easier to hoe several rows, then turn around and plant several rows, then start at the top and harvest several rows.

I don't yet know how to write the logic to do, say, 4 rows at a time, then return to the start. I suspect it can be done with Numeric Registers & Comparators, I just haven't experimented with that, yet. That's ok, I'm weeks away from getting to that point! :)

NOTE: All of this describes only one way to do things. There may be others. Once you start crafting (or farming) logic gates, I guarantee there are others! It's a part of computer-science that, given the basic gates in worfc, you can build logic to do anything you like. You could actually build a working computer and simulate it (very-very slowly!) inside of worfc!
Posted by WORFC, board admin, moderator, game author.

Please LIKE us on Facebook
You can also follow us on twitter: @roboFarmCraft
Check out the development blog (short updates 1-3x/week.)
User avatar
worfc
Site Admin
 
Posts: 226
Joined: Wed Apr 15, 2015 5:08 pm

Re: ping-pong bot

Postby worfc » Thu Jul 30, 2015 7:30 am

A note about LATCHes (aka "flip flops").

* One side of a latch is always on/hot. At creation, it's the right-side.
* The hot-side sends power out its output (top connector).
* When there is a signal in either the left or right input (on the bottom), the latch switches to being hot on that side.
* (Here's the important "latch" part:) Even after the input signal stops, the latch "remembers" and that side remains hot until an input on the other side switches it. It "latches on" to that input and keeps it. It "flops" to that side, and says there until an input signal "flips" it back.

Sorry if you already know this; but it seems an important concept in case it hadn't sunk in. :)
Posted by WORFC, board admin, moderator, game author.

Please LIKE us on Facebook
You can also follow us on twitter: @roboFarmCraft
Check out the development blog (short updates 1-3x/week.)
User avatar
worfc
Site Admin
 
Posts: 226
Joined: Wed Apr 15, 2015 5:08 pm

Re: ping-pong bot

Postby Denis » Thu Jul 30, 2015 7:59 am

Ok thanks. I thought you meant you could automate the "move to the next row part" with your current gates but it's done manually.

I usually do it like you except that the ping-pong isn't (wasn't) automated. So my workflow is to write it for a row and then read something online and wait for the sound telling me it's bumping in the wall, reach out to turn it off, re-wire, turn it on, continue reading or whatever.
Denis
 
Posts: 138
Joined: Wed Jul 01, 2015 12:17 pm

Re: ping-pong bot

Postby Denis » Thu Jul 30, 2015 2:08 pm

I just noticed this ping-pong doesn't work when you're along a wall, say going NW-SE along the NE wall, as the bumpers feel the wall.
Denis
 
Posts: 138
Joined: Wed Jul 01, 2015 12:17 pm

Re: ping-pong bot

Postby worfc » Thu Jul 30, 2015 2:41 pm

The ping-pong wiring shown goes NW/SE, so would be better suited to the SW wall.

I've not tried but, if you can't ping-pong NE/SW along the NW wall, that'd be a bug. (Same thing any of the 4 walls, but your ping-pong-er has to be wired to go the correct 2 directions! :) )
Posted by WORFC, board admin, moderator, game author.

Please LIKE us on Facebook
You can also follow us on twitter: @roboFarmCraft
Check out the development blog (short updates 1-3x/week.)
User avatar
worfc
Site Admin
 
Posts: 226
Joined: Wed Apr 15, 2015 5:08 pm

Re: ping-pong bot

Postby rkda » Thu Jul 30, 2015 6:14 pm

Running adjacent to a wall will trigger the bumpers just the same as if you ran into that wall. There is no way to effectively use the row that is touching the wall with sensors intended to detect the ends of the row. It's just an anomaly of the way bumpers detect things around them.

Now that chests can be marked as "No Carry", the row next to the wall makes a great place to park the chests. You won't try to farm there, as the chests block motion anyway, and it keeps your robot and sensors safely away from the wall you don't want to bump.
User avatar
rkda
 
Posts: 66
Joined: Sun May 10, 2015 3:20 pm

Next

Return to Tips & techniques (gameplay)

Who is online

Users browsing this forum: No registered users and 0 guests

cron