By watching this.
Happy New year! With a new year I decided to move my blog to my own hosting instead of using the wordpress.com. I figured that since I have a nice domain and some hosting on azure, why not take advantage of it? In doing so, I figured this could be a great piece of knowledge, for those people who are also hosting on wordpress.com and would like to self host.
Now Let’s get to the beef.
I’ll go over how to setup a wordpress site on azure and forward a custom domain to it in this tutorial. The reason I’m using azure as
- It’s super simple to do a self-host
- You can use many other features in azure if you’d like to
- I work for Microsoft : ) and azure is quite a cheep option.
I’ll be using azure websites for this as it provides the easiest maintenance and setup option. Setting up the server literally will take me a few clicks, it will also be very cheap (free if you have some bizspark credits hanging around)
- First step is to head over to the azure portal login with your existing account or create a new one.
- Once you’ve done that you can hit the plus sign on the bottom and create a new website. Azure is kind enough to offer a template for wordpress sites so this will be quick.
- In the next menu that pops up you’ll choose blogs and scroll down on the list to WordPress.
- I’m now naming by demo site atilev which would put it at http://atilev.azurewebsites.net.
- You will be prompted to create a database. Since WordPress uses MySQL you’ll have to use clear dB. This will happen automatically for you. You all you need is to choose the name from the dropdown.
- Go ahead and hit create, check the box on the bottom of the last page saying you agree to ClearDB’s terms and you’re good to go. Once the website should be up shortly and you can go to http://<youwodrpesssitename>.azurewebsites.net and start the setup. You should be seeing a screen like this that will be asking you to create a username and password for your worddpress site.
- If you’re not you’ve done something wrong. Go back.
- To setup a custom domain for you wordpress site you’re going to need a few things. First you can’t use the FREE tier of azure websites so you’ll have to upgrade to the standard or basic tier. You can do this by going to your deployment and going to the Scale page. The small instance works fine for me as it keeps my costs down. If you have a lot of traffic you might want to increase this.
- After this you can navigate to the configuration tab and scroll down until you find the domain names section When you click on “manage domains” you’ll be provided instructions on a few ways you can verify that you own the domain. At this point you’ll need to log into your domain provide like godaddy.com or namecheap and add a CNAME record that points your domain to the azure website. Keep in mind this took around an hour for me so take a coffee break after you put in the CNAME record. You can only enter in your domain name on the azure portal once azure is able to verify it.
- Once you’ve verified that your domain is now resolving azure service you can go ahead and add it.
- One last thing now you can log in to the admin portal of your WordPress site by going to http://www.yourdomain.com/wp-admin
- Simply login the credentials you setup in step 6. Once you’re in you should be seeing your admin panel Here you’ll need to set things up but first go to the settings page and click on general settings. You’ll need to put in the address for your website so that WordPress can display the proper urls when navigation occurs. Here how my setup looks:
With this final step, you should be done! Blog and post the night away. If you have any questions feel free to post the in the comments. You’ll see that my posts are a bit stale currently on atilev.com but that should change soon.
Once you have all your parts in order you can start your assembly
Start you assembly by putting together the ESC’s I noticed that the 12A hobbyking BEC I’m using are not Simon K flashed so I’ll go into the details of that further but not letting it stop my right now. I later witched these out with Afro 12A ESC’s that can be found.
First we need to create the power distribution circuit.
If you’re not using a power board get your soldering iron ready as were going to be using it a lot.
Simply put the power flows through the ESC’s to the Flight controller to the receiver
Start by Soldering some 16AWG wire to your Xt60 battery connector. I had a bit of trouble finding good sized heat shrink wrap to put around the connection points.
Second you need to cut the 16AWG wire to form 2 different branches so you can distribute the power to each ESC.
I did this by branching out the positive side and the negative side to two smaller branches.
Once the ESC’s are sorted out we can move across to connecting them to the motors.
This is a bit of a tedious process as you want to cut the lengths of the motor control wires and the motor wires such that there is minimal slack between the esc and the motor.
Below you can see this after the soldering. Take note to remove the power cables from all but one ESC going to the flight controller. The cable color coding is as below. So cut the Brown and red from all esc signal cables but one prior to plugging in. This is explained in the cc3d wiki http://wiki.openpilot.org/display/Doc/CopterControl+Hardware+Manual
ESC signal wires:
Brown – Red – Orange
Neg – POS – Signal
Before we zip tie everything down I’ll make sure to check that everything is working. Remember to cross the wires of 2 opposing ESC to give counter rotation to the props on opposing ends. This will save you some time future debugging hours.
Also ideally you would like the arrow on your CC3D board facing the front of the quad but again this is not necessary as you can tune this later in through the openpilot software. JUST REMEMBER THIS BEFORE YOU FLY. (more details on CC3D board here http://wiki.openpilot.org/display/Doc/OpenPilot+Quick+Start+Guide)
At this point you can go ahead and download GCS here : http://www.mavlink.org/downloads
Simply step through the Aircraft setupwizard. This will make you update your CC3D firmware , calibrate your ESC’s and make sure all you motors are oriented correctly and spinning the right way.
You can now go ahead and plug in your receiver. I removed the casing from mine to make it smaller and easier to mount. I chose to mount it on top of my CC3D board with the dual sided foam tape.
As a transmitter I got the Turnigy 9x reciever priced at 50$ at hobby king this is a steal. This also comes with a 9 channel receiver.
Here are a few pictures of the setup. I have the FPV transmitter mounted in the back along with the receiver antenna. I’m thinking this might cause some interference but we’ll see.
At this point we’re almost ready to fly. You’re probably thinking “well , were is my camera?”
This is one step before that. We’ll be needing to calibrate the transmitter and the quad before we’ll be mounting our camera.
I’ll be going over pre flight and final FPV pre checks in the Final and calibration and 3rd post : )
Something happened in the late 2000’s which made took us go from super high polygon counts to favor low polygon counts in models. I’m not sure if it was the yearning for the 90’s but these lo polygon models became quickly a hit. You can find a whole section in Thingiverse dedicated to high quality models exquisitely dubed down to low polygon models.
I have to admit they do look really cool. I’m just guessing it’s the nostalgic beauty that’s talking back to us.
I was playing around with the Philae comets model availible from ESA and I wanted to see how this would looks as a low polygon model. I think this could be a great ornament for the Christmas tree. (http://blogs.esa.int/rosetta/2014/07/28/updated-comet-shape-model/)
To manipulate STL files I usually go to my favorite tool MeshLab. It’s an open source utility that’s incredibly helpful. If you haven’t already downloaded it get it here: http://meshlab.sourceforge.net/
Once you’ve loaded up meshlab it’s pretty straight forward to manipulate the mesh. STL or POLY files are made up of triangles that you can run reduce and manipulate using different models. For our little comet we will need to reduce the number of vertices we have in the mesh.
To do this I’ve found the most useful method is Filters > Remeshing, Simplification, Reconstruction> Quadratic Edge Collapse Decimation.
Here you’ll find a number of variables. I’ve found that most important to variables are Quality and Percentage reduction.
Percentage reductions is the amount of the vertices that should be kept. I use a number like 0.8 here and rerun the simplification multiple times. Each iteration will reduce 0.8 of the vertices.
Quality I’ve found difficult to decipher but using 0.5 had good result for me.
Preserve topology leave checked. (Helps keep the shape surface as is)
Preserve Normal leave checked.(Prevents flipping of surfaces)
Weighted simplification unchecked (This helps with a mor uniform simplification)
You should run the simplification algorithm multiple times. Unfortunately there is no undo function in meshlab so if things go too far you’ll have to start from the beginning.
If you wish to further manipulate the mesh in say solidworks you’ll have to export this mesh as a DFX file which solidworks can open as an object. Though granted you’ll have to do some healing
Make sure you export all surface when you export the mesh as DFX.
Now you can import the dfx file in solidworks or your 3d modeling program of choice.
Happy low poly holidays.
There are many reasons why Mongo DB became a promement database for devs. As microsoft only recently launched DocumentDB as it’s own NoSQL option it’s still early stage and catching on Mongo is still the NoSQL db of choice. You can always gow with MongoLabs or MongoHQ which provide Mongo as a service. However if you recently stumbled on 6000$ of azure credits it’s good to know that these credits are not usable for 3rd party services. So setting up you’re own Mongo cluster might be in your best interest.
I’ll try to walk through the basic points in doing this. It’s generally a pretty straigh forward process so this should be painless. I hope.
You’ll have to start by creating a virtual network in Azure. You’ll want to put your VM’s on this once you do as they’ll need to talk to each other. You can do this by going through the basic steps.
Important note that it’s not possible to add VM’s into an existing VNet. You need to provision them Vnet first.
You’ll be needint at least 2 VM’s to setup high availibility. I went ahead and used Ubuntu VM’s to test this out. Installing mongo is rather easy
- sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv 7F0CEB10
- echo ‘deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen’ | sudo tee /etc/apt/sources.list.d/mongodb.list
- Sudo apt-get update
- sudo apt-get install -y mongodb-org
You can check out the official post from mongo which is fairly verbose
Once you have mongo installed you’ll realize that the Master slave model has moved to a replica set model.
Now we can start to configure. First check the version of mongo you’re running by checking
$ mongod –version
db version v2.6.5
If you’re aon the latest you should open up the mongo conf to get started. Start by opening up /etc/mongo.conf
comment out the bind_ip line so mongo attaches to external interfaces as well. We’ll need this for replication.
Also at the bottom go ahead and add
# in replicated mongo databases, specify the replica set name here
This is an arbitary name you will use to name your set.
You need to do this step on all the nodes. Once they’re up you can go ahead and log in on the mongo running on the node you wish to elect the master.
On the master node open the mongo console by typing mongo. Once you’ve logged in RS command sets are used to manage the replica set. You can do this via
>Rs.initiate() //run this on master only
This will initiate the master set. Now you need to add the your slave server to the replica set. This will ensure the Master copies the content over to the slave server. In my case my slave vm hostname is “sql2
>Rs.add(“sql2”) // run this on master
>Rs.status() // run this on both as it
When you log in on the slave server you can run this command to see the status.
The order of running these commands and where you run them are important as you can end up with to configuraitons that each think they are the master. You should also now see that when you’re in the console a “Primary” should appear on the active line.
Next up depending on which driver you’re using to speak to mongo. If you were to use Python this would mea handling a failed connection and using the replicaset connection type.
>>> from pymongo import ReplicaSetConnection
>>> c = ReplicaSetConnection(‘localhost:27017’, replicaSet=‘repl0’)
Database(ReplicaSetConnection([u’…’, u’…’]), u’test_database’)
Database(ReplicaSetConnection([u’…’, u’…’]), u’test_database’)
I remember the first time I tried on a pair of FPV goggles and took my drone for a spin. At that moment what I felt was incredible. I true out of body experience. My mind ran wild thinking how I could do this in 3d and increase the quality. I could see this being a game changer in the future of entertainment. So I had to build on for myself. I usually fly dji phantom 1 which is has so many add-ons that it looks like a Frankenstein. Also its flight time is down to merely 6 minutes with all the added weight. So I decided to build something smaller and a bit more nimble. I’m going to be using off the shelf components and maybe a 3d printed part here or there.
Let’s start with the bill of materials
[Qty. 1] CC3D Flight Controller
[Qty. 1] 36mm Power Distribution Board
[Qty. 1] 1800mAh 3S 40C LiPo
[Qty. 1] XT60 Connector Pair
[Qty. 12] M2x12mm Bolt
[Qty. 4] Tiger MN-1806 2300KV Motors
[Qty. 4] Afro 12A SimonK ESC
[Qty. 4] M3x6mm+6mm Nylon Spacer
[Qty. 4] M3x8mm Nylon Screw
[Qty. 4] M3 Nylon Nut
[Qty.~] Cable Ties
[Qty.~] 16AWG Red Wire
[Qty.~] 16AWG Black Wire
[Qty. 1] Sony Super HAD CCD 660TVL Camera
This is an awesome list from Polakiumengineering so kudos to them. They have a really nice 3d printed acetone treated frame which looks pretty nice. You could of course print one yourself but you would need a pretty large bed 3dprinter.
If you noticed there isn’t a receiver and transmitter in this list. I’ll be looking to get a Spektrum DX6i transmitter with a DXM compatible receiver. I haven’ purchased these yet so look forward to my second post for more details there.
One more note is the FPV goggles. Fatshark is the de facto fpv goggles. Though oculus and other VR alternatives are nice concepts they really don’t play well with FPV thus far. The portability aspect of fatshark and the built in receiver makes them very practice. I own a Predator model which comes with a transmitter (http://fatshark.com/ )
Moving on to construction the first bit was simply attaching the motors to the frame which only took a few minutes.
Be very carefull when doing this! if you screw the screws in too tight they can damage your motors I recommend using a plier to shorten your screws as I lost 2 motors due to screwing them in too tight. You have been warned.
Now comes the fun part. I’ll be putting on the ESC’s which control the power which flows in each motor. I’m also excited to try out some of my own 3d printed parts for this project. As there might be opportunities to shed weight while affecting performance in the most minimal way.
3d printers are both incredibly fast and obscenely slow. They are fast in the sense that what would in the past take you days to create using traditional tooling now takes you only a few hours and the end result is in millimetric precision. Though it’s also slow in the sense that the average print still takes at least an hour or more. As this technology is still in it’s early stages each print takes a good amount of baby sitting. I’m sure anyone who’s had a printer and left it unattended has come back to see this multiple times. From nozzle clogging or simply print board adherence are some of the common causes for such print failures. So what does dropcam have to do with this. Well I don’t have a fancy new makerbot so I can’t just launch an app and see how my print is doing. Also I didn’t want to drop a couple hundred dollars on a dropcam just to see my prints were progressing or failing. I found this incredibly useful piece of software called YAWcam(Yet Another Webcam Software http://www.yawcam.com/). The app I written in Java and is far from beautiful but what it lacks in beauty in makes up for by far in simplicity. You can simply launch your app and create a streaming webserver on the fly like this. I use it with my Microsoft webcam which is aging by the day.
Pretty cool though make sure you open your ports on your router so you can access it externally.. No more worrying and thinking “did my print fail”. Now I need to figure out a way to stop my printer if I see something wrong and feed the cats. Alp