Next Error

Comments

You know you're doing some major refactoring when you find yourself searching for "visual studio keyboard next error". Thanks Stack Overflow! It's F8, by the way. I fixed over a thousand build errors today.

Buying Bitcoins Isn't Easy

Comments

I recently bought some bitcoins. I’ve been interested in them for a while and wish I had bought some sooner. If you’ve ever tried to buy bitcoins, you know it’s not that easy. Currently, the most popular exchange is MtGox, which is based in Japan. Before you can even deposit money into MtGox, you have to get your account verified, which requires sending a scan of an ID (e.g. a driver’s license) and a proof of residency (e.g. a bill addressed to you). That’s annoying for two reasons. First, I don’t have a scanner. Second, all my bills are delivered electronically. I guess I could just give them a PDF of one of my electronic bills, but I don’t know whether they’d accept that. Instead, I found a physical copy of something sort of like a bill and scanned it at work.

After I got my account verified, there was the matter of making the transfer itself. I’d never transferred money outside the US before and it’s not as simple as transferring money between two US banks. There’s a lot more information you need to fill out. You have to provide the address of the bank you’re transferring to and the address of the business that owns the account you want the money to go to (MtGox isn’t a bank itself, it just has an account at a bank where you transfer your money). One silly problem I ran into was that I had no idea how Japanese addresses are formatted. The wire transfer form at my bank had separate fields for “city”, “state/province”, etc. But the address provided on MtGox’s website wasn’t formatted that way, so I didn’t really know which part of the address was supposed to go in each field. I remember having to read Wikipedia page about the Japanese postal system before I was able to make a reasonable guess.

You also have to state the type of business you’re transferring the money to and the purpose of the transfer, which is a bit odd. With my bank, there was also this additional authentication process where they sent me an email at a particular time and I had to open it and electronically sign something within like 2 hours of receiving the email. Oh, and it can take a week or two for the transfer to go through, unlike the usual 3 days for domestic transfers.

There could also be future inconveniences. I haven’t done my taxes yet, but I vaguely remember from last year there being a question about foreign bank accounts or foreign transfers or something like that. So doing my taxes could be that much more painful this year, as if they weren’t painful enough already. I’m guessing it increases my chances of being audited too.

Besides the inconvenience of transferring money outside the US, it’s also expensive. My transfer was for $2,000 and I ended up paying roughly $75 in fees just to transfer the money. Another weird thing about it is that you don’t even know beforehand how much the transfer fee is going to be. I knew that my bank would charge $40, but I guess you can’t know exactly how much the receiving bank will charge or what intermediaries it may go through on the way and what they will charge. I figured it would cost somewhere between $40 and $100 total to make the transfer, but I only found out exactly how much it was after the transfer was complete and I saw how much money made it into my account. On top of those transfer fees, there’s also the trading fees you pay to actually buy the bitcoins.

I was also a little worried whether my money would actually go to the right place. That’s because one of the pieces of information you have to include with the transfer is a number identifying you to MtGox so that they know whose account to credit. The problem was that MtGox’s website said to include the number as a “message” with the transfer, but my bank had no field for a message in the transfer. It did, however, have a “special instructions” field, so I added an instruction which said “Please include the following message: <my number>” and hoped that whoever or whatever was looking at those instructions would get the idea.

Anyway, I did finally get my bitcoins. But going through this whole process took quite a bit of time. Also, I put off doing it for a couple months just because I knew what a hassle it was going to be. And of course the price of bitcoin went up significantly during the course of those months I put off buying them. Fortunately, I still got in before the really big price spike happened about a month ago. I look forward to my bitcoins being actually useful one day. I’ll have more to say about that in a future post.

Useful websites for robotics

Comments

When I wanted to start building a robot recently, I had no idea where to look for parts and information. I’ve learned quite a bit since then, so I thought I’d just share a list of useful websites I’ve found.

Here are places where I’ve bought parts:

  • hobbytown.com – HobbyTown has physical locations in my area, so I went to one mostly just to check it out. It was pretty small and didn’t seem to have much of the sort of stuff that I wanted, but I bought some tools and asked the salespeople some questions about motors.
  • batteryspace.com – As the name says, this place has tons of batteries. I bought a couple 12 V batteries with barrel connectors to match my mainboard. I also bought a couple motors, a connector, and a charger. The prices seemed pretty good. My only complaint was that shipping seemed a little slow. Waiting for parts is hard when you’re excited to get started building.
  • sparkfun.com – I bought a bunch of stuff here: wire, diodes, capacitors, a protoboard, and some screw terminals.
  • ghielectronics.com - This is where I got my FEZ Cobra II mainboard, which I discussed previously. They also have lots of other .NET Gadgeteer modules and mainboards.
  • servocity.com – Don’t let the name fool you — they have a lot more than just servos. I bought a lot of chassis parts here: small machine screws, motor mounts, wheels, wheel hubs, and metal brackets. Shipping was very fast and they event included some candy with my order!
  • digikey.com – This place has an insanely large amount of small electronics parts. What’s awesome is that you can look for parts in a very structured way. You can navigate to a category of part and then you can filter the parts by their specifications (dimensions, voltage, style, etc.). It’s very nice for finding something particular. I bought a lot of little stuff: capacitors, header pins, standoffs, resistors, and alligator clips.
  • And of course, don’t forget about Amazon and Home Depot. I bought a soldering iron and some wire on Amazon. I got some wood, screws, and tools at Home Depot. The best thing I found at Home Depot were some small caster wheels. I needed them to be a particular height to match my other wheels and Home Depot had some that were perfect in the toolbox aisle, of all places.

Here are some other parts stores. I haven’t bought parts at these places yet, but they seem to have a good catalog:

Here are some other random sites I came across that looked interesting, but which I haven’t really explored yet:

If you’ve read this far, you’re probably wondering what I’ve been using all these parts for. Well, I’m afraid I’m going to have to save that for a future post.

Finally, if you happen to be in the Seattle area (like me), you should check out the Seattle Robotics Society. Meetings are once a month. They’re free and open to anyone.

Folding whiteboard worktable

Comments

Now that I’m getting into robotics, I need a place to work on my robot. Since I live in an apartment, a small table would be good for now. I want it to be foldable, so it won’t take up too much space when I don’t need it. I’d also like to be able to move it easily so I can take it outside when I want to do things like cut wood. And I also want to be able to easily bring it with me to a new apartment next time I move.

I was just going to buy a cheap folding table, but I decided that this would be a good opportunity to practice some basic building skills. I need the practice because I really have no experience with building physical things. I never even took shop class.

I was thinking about following these plans and building it entirely myself. The problem is that table is larger than I wanted it to be. At 69 in. x 30 in., it seemed like it would be difficult to move around. And I would need to rent a truck just to bring home the lumber. I thought about modifying that design to be smaller, but I realized that the way the folding legs are designed, the table has to be that long in order for the legs from both sides to have enough room to fold under.

Then I got the idea to look for pre-made folding legs and I found these ones from Home Depot. I figured using those along with a smaller tabletop would be a good compromise between just buying a table and building one entirely from scratch. I’d seen a large whiteboard surface at Home Depot previously for about $10 and thought that would be a pretty cool surface for the table. I decided to go with that, and bought the following materials, in addition to the folding legs:

  • 3/16 in. x 2 ft. x 4 ft. whiteboard panel (example)
  • 3/4 in. x 2 ft. x 4 ft. plywood panel (example)
  • #6 flat head (countersunk) screws, 1/2 in. length

WP_20130808_004

Fortunately, those 2 ft. x 4 ft. panels fit nicely in the back seat of my car. The folding legs came with all the necessary nuts, bolts, and screws for attaching them to the panel. The other screws I bought were for attaching the whiteboard panel to the plywood panel. I also had to buy some tools:

  • Drill
  • Drill bit set
  • Countersink drill bit
  • C clamps

Assembling the table was pretty easy. I followed the instructions for the folding legs to attach them to the plywood panel. Then, I put the whiteboard panel on top of the plywood panel, clamped it down, and marked four spots for screws to attach it.

WP_20130808_007

I drilled holes all the way through the whiteboard and into the plywood, about 1/2 inch deep in total. I used tape to mark the 1/2 inch depth on my drill bit so I wouldn’t go too far and come out the other side of the plywood.

drill depth

After I drilled the holes, I used the countersink bit so that the screws would be flush with the surface of the whiteboard, then put in the screws.

table

So far, I’m liking the table. I haven’t written much on it yet. I will say that it’s pretty tough to erase the board, but that’s alright — I didn’t expect a high-quality, large whiteboard surface for $10. The legs seem very sturdy. The downside there is that they’re not very easy to fold and unfold. But it’s not a problem because the table is small enough that I can move it around and even take it outside without folding it up. Not including tools, I probably spent about twice what I would have just buying a table. But for me, it was worth it to have the whiteboard surface and also just for the building practice.

Learning robotics with the .NET Micro Framework

Comments

I’ve recently started playing around with robotics and the .NET Micro Framework (NETMF). I guess all the cool kids are using Arduino or Raspberry Pi instead, but I like the idea of being able to write in C# and use Visual Studio. So I bought a FEZ Cobra II mainboard and played with it all weekend.

FEZ_Cobra_II

I thought I’d just list a few of the things I learned about the board here.

  1. Unfortunately, the first thing I learned about that mainboard is that the USB client connector (which is used to connect to the PC for power, deployment, and debugging) is the mini type B connector. Since the website didn’t say what type of connector it was, I had looked at the pictures and assumed it was the micro type B connector, which I already had a cable for. So I ended up way overpaying for a cable at Radio Shack because I didn’t want to wait for one in the mail (I was excited to try it out).
  2. When I ordered the board I was wondering whether the alternative power connector is the same type used for laptops. The website didn’t say. Being new to this, I didn’t even know what to call the connector. After some searching, there doesn’t seem to be an official name per se. Some places call it a barrel jack. Wikipedia calls it a coaxial power connector. Many places just refer to its dimensions: 2.1 mm (inner diameter) x 5.5 mm (outer diameter). Anyway, it’s pretty easy to find batteries and chargers with that connector. And once I received the board, I confirmed that indeed it is the same type as my laptop and that my laptop power supply will power the board.
  3. From looking at the pictures and schematics, I could see that there were some buttons and LEDs on the board. I wasn’t sure if I’d actually be able to use those from my programs or not. For example, one of the buttons is the reset button, which can’t be used by programs because pressing the button reboots the board. The other two buttons are labeled “LDR0″ and “LDR1″. I believe they’re used when updating the bootloaders (there’s more than one, apparently), but I haven’t had to do that yet. I’m happy to report that those buttons can easily be used as inputs. You just have to read from the right pin (which you can find by looking at the schematic):
    var button = new Microsoft.SPOT.Hardware.InputPort(GHI.Hardware.G120.Pin.P0_22, true, Microsoft.SPOT.Hardware.Port.ResistorMode.PullUp);
    var value = button.Read();

    Similarly, one of the LEDs is the power indicator, but it’s easy to use the other one.