Xamarin is a framework to develop a cross platform mobile application using C#. Developers have many choices for building mobile applications. There are many frameworks and platforms to pick from like Ionic, Swift, Objective-C, and Java for Android. Xamarin was really strong, but now its gaining more momentum since Microsoft has purchased them ($400M) and is offering as part of Visual Studio and MSDN subscriptions. You may wonder what the benefit of Xamarin is compared to other cross-platform tools. Most cross platform tools use web technologies which do not look like native apps and incur significant performance costs compared to coding in the platform's native language. The C# code that you write in Xamarin will perform as good or sometimes better than code that you would write in the native languages.

Pretty much any cheap old digital scale can be connected to the internet of things using the digital scale application I created for the Raspberry Pi. Here are the steps to do it yourself.

The key to reading weight from the scale with the Raspberry Pi is the load cell or collection of load cells. When you step on a scale your weight causes a change in resistance in the load cell that can be measured with the right analog to digital converter.

It may be possible to hack some scales in such a way as to use their built in electronics, but I find that it's better to bi-pass their circuitry altogether and use a chip that is well documented. The chip I've chosen to use is the Avia Semiconductor HX711. You can find these with the breakout board for just over a buck each if you shop around.

The load cell should have 4 wires coming off of it. Remove the load cell wires from the scale's built in electronics and extend them so you can work with them. I extended mine by connecting some jumper wires that easily fit into a breadboard. You may have to play around with plugging in different combinations of these wires once you have the rest of your setup finished if the colors are not standard. The typical color scheme is as follows:

Red: Excitation (E)+

Black: Excitation-

White: Signal +

Green: Signal -

Yellow: (Shield)

For my tests I've been using a small gram scale that can easily fit in my pocket. My yellow wire was E- and blue was signal-. Your results may vary as well.

Once you have the wires extended re-assemble the scale but with the wires hanging out where you can access them.

Here is what my setup looks like.
Connect the Raspberry Pi to the HX711 using 3.3v to vcc, Raspberry Pi pin 23 to the clock pin that is labeled CLK on the HX711 board, pin 24 to data(DT) and ground to ground.

Next you'll want to get the code from the IoT Scale github repository. Load the application onto the Raspberry Pi and viola, you're reading weight.

I'm still laying the groundwork for my bee hive scale but in the mean time I've got a great simple WinJS interface for putting a digital scale on the Raspberry Pi.

]]>The hive scale is a digital scale that can be left under a bee hive that will transmit data about the weight of the hive over time. When my wife, Dani, picked up the hobby of beekeeping I found that the bee hive scales for sale were in the $800]]>http://grahamtech.azurewebsites.net/hive-scale/d39d2bb5-431c-4905-9cc4-52f93ca05389Tue, 16 Feb 2016 21:10:40 GMT

The hive scale is a digital scale that can be left under a bee hive that will transmit data about the weight of the hive over time. When my wife, Dani, picked up the hobby of beekeeping I found that the bee hive scales for sale were in the $800 range. I would probably buy one if it were under $200, but after searching high and low nothing came close. Finally, one day while hanging out at Hackerspace Charlotte, I decided I would try to make it myself. Some of the other hackerspace members and I even set the bold target of getting the bill of materials down under $35. I'm still in the process of putting it together.
I've been playing with the following scale since it is cheap, and small enough to play with until I get the rest of the components right.
I was able to take the four wires coming from the load cell and remove the board that came with the scale(since I don't know how it works) to use with my own set up.
I'm using the HX711 chip which has some documentation on how to use it, am able to plug in the 4 wires from the load cell, and get readings just fine.
More to come soon!

]]>I created a giant chess set as a decoration for my wedding. Each piece is made out of two hardboard cutouts slotted together in the middle.

The vectors for each piece are included in this zip file. I ended up creating the vectors myself after my searches online didn't turn

I created a giant chess set as a decoration for my wedding. Each piece is made out of two hardboard cutouts slotted together in the middle.

The vectors for each piece are included in this zip file. I ended up creating the vectors myself after my searches online didn't turn up any results that I liked. What I did to create the vectors was take pictures of the pieces from my favorite chess set and then convert them to black and white.

I then imported the black and white pictures into Inkscape and used Inkscape's built in tracing functions. After a little bit of clean up I set all the pieces to the same scale. The scale I chose had the queen at about 5 feet high.
I then printed the silhouettes out on on paper and lined up the multiple sheets, taping them together, to create one half of each piece.

After I had the paper templates together I traced them onto 4 feet by 8 feet pieces of hardboard, making sure to mirror the templates. I used a jig-saw to cut out one silhouette of each piece. The exception being the knight, which was the only real asymmetrical piece. I cut out an extra silhouette for the knight.

Once I had one cut out for each silhouette shape I needed I used that cutout to outline all the other copies I needed, I was able to cut through multiple layers of hardboard at once, which sped up the process.

Once I had all the pieces cut out I made corresponding cuts in the top middle of one half and bottom middle of the other half of each piece and made sure the slits were just wide enough that they slid together but not too wide to allow too much wiggle room.

I took each piece apart so they would lay flat and transport easily to the wedding destination. Once there the next step is to lay out the board. The rule for how large to make the board is to make each square 1.5 times as large as the base of the king. For my chess set this meant that each square would be large enough for a person.

We hammered nails into the concrete and used string to mark out first the outer edges of the board, then after checking to make sure it was square we marked out each of the rows and columns of the board. We rolled on the paint for each white square, making sure to use white for the bottom right square in the orientation we preferred the board to go. We used a smaller roll for a white border around the outside of the board.

Once the ceremony was over, we had our first dance and were well into the champagne. Everyone gathered around and started taking places beside their pieces in a life sized chess game.

I hosted an AI competition at Hackerspace Charlotte where contestants competed by writing bots to play the game pictured below.

Some of the stuff going on behinds the scenes is as follows:
The site itself is ASP.Net MVC 5 and uses OAuth to allow users to login using their github accounts. The game is displayed live using Signal R. The game engine is a C# library. Bots are written as web servers that respond to a JSON request for a move from the main AI Battleground site. Each contestant is free to program their bot in whatever language they like, as long as they can host it and can respond to requests for a move. My own bot was written in C#.

]]>Some of the guys from Hackerspace Charlotte were building simple hockey bots that could be built for well under $100 in parts.
Here is an image of one of these "Cheap Skate" hockey bots.
Their initial implementation relied on an Android application that used Bluetooth to control the hockey bots.]]>http://grahamtech.azurewebsites.net/hockey-bot-controller/5ddbc4f6-4c50-418a-9b3e-e29c13d370a2Mon, 26 May 2014 03:02:00 GMT

Some of the guys from Hackerspace Charlotte were building simple hockey bots that could be built for well under $100 in parts.
Here is an image of one of these "Cheap Skate" hockey bots.
Their initial implementation relied on an Android application that used Bluetooth to control the hockey bots. I found the application hard to use and set out to make it possible to control the hockey bot using an Xbox 360 controller.

I built a WinForms application that used Microsoft XNA libraries to monitor input from an XBox 360 controller and send bluetooth communication to the Cheap Skate hockey robot. The application can be found on my Github library for Serial Commander.

I found out that I'm a direct male descendant of a clade of Grahams
who can trace their common ancestor well over 400 years ago to Scotland.
I found this out after doing extensive genealogy research into other lines of my family as well,
and created a tree with well over 1000 named ancestors.
I'd love to share my experience in genealogy. It's a pastime that anyone can enjoy.
If you would like help creating your family tree please feel free to contact me.

I've been learning the cutting edge technology available to genealogists.
I have experience with several software tools and websites that assist in searching historical records,
that walk you through building pedigrees and family trees, and that help long-lost distant relatives connect.
I also have found that DNA tests can help connect the dots when the paper trail runs cold.
One of the most valuable things I've learned in my research is that no amount
of sleuthing online can beat a good old fashioned interview with a distant family member.
Sometimes its the Great Aunts and Uncles that you've never met who can help with the family tree the most.

Still, DNA testing can tell us a lot that no amount of family record keeping would possibly be able to. Paternal lineages can be traced through DNA from the Y chromosome that is passed down from father to son. The more people who get tested and share their results the more detailed genealogists are able to get in their models of how all people are related. The data already provides enough detail that we can trace where families came from, and how they migrated throughout the world over time. The Haplogroup Migration Map shown here represents the predicted general migration pattern of a particular Y-DNA haplogroup from 60,000 years ago to 25,000 years ago.

While the map only goes into enough detail to show the break between the family groups, or haplogroups, labeled as R1 and R2 and the later break into R1a and R1b branches, we can trace smaller groups much farther than that. DNA testing shows that my paternal line branched again to form the R1b1a2 group. According to the
wikipedia artical on R1b1a2 the line is defined by the presence of SNP marker M269. This is the bloodline of about 80% of Europe. As the map shows, the theory for this blood line's origin is that they came from Eurasia into southern Europe. Thankfully for me matches between my Y-DNA test and other Grahams paired me with someone who tested for 24 different SNP markers. The result seems to put my family of Grahams into the category R1b1a2a1a1b4, with positive matches for SNP markers L11, L21, M173, M207, M343, P25, P310, P311, and P312.

As I understand it, the history for this branch is less certain, but evidence suggests that during the Neolithic age, from 10,000 to 4,000 years ago, the family migrated from southern Europe up to Germany, then at some point probably made it over to the British isles. They then would have been in Ireland up until about 1000 years ago, and finally would have settled in Scotland between the years 1300-1700. It seems that some of my family ended up spelling their name Grimes, while others ended up spelling their name Graham. These different spellings of the name go back at least 300 years, though DNA shows that our families seem to be about 500 years apart. I'd like to believe that this means that my family had been using the same last name for longer than they've been writing it down, though they may have pronounced it with slight variations.

My research allows me to pick up on a paper trail starting with my first ancestor who traveled to America from Scotland. According to documents I've hunted down, my 6th Great Grandfather John Graham moved from Scotland to North Carolina with his family sometime about the period of the Revolutionary War. I've found papers at the University of Notre Dame referencing my family which included tax records as well as letters. It seems both my 6th great grandfather John Graham, as well as my 5th great grandfather Alexander both did at least a bit of teaching, since I found receipts from both referencing such. My 4th Great Grandfather, Nathaniel Smiley Graham, moved to Alabama in 1827 and was a Farmer. My 3rd Great Grandfather Reverend Malcolm, was a Methodist Minister. My 2nd Great Grandfather Keith Graham is the oldest ancestor I've had anyone tell me they knew, and then there's my more recent family. My dad left Alabama for Georgia not too long before I was born, and that's where I was raised.

A Colorized chart of the different clades of the Graham family can be found at the
FTDNA Graham Surname DNA Project.
I intend to produce an improved visualization of the information from this project
to show an easier to read info graphic on the splittings of branches of the family tree.
Please let me know if you know of any such project that aims to do something similar,
or if you would like to help me with my own.

I set out on a quest to create something like a mechanical Turk.
I wanted to teach a robot how to play chess.
When I began the project I had a pretty quick deadline: the Raleigh Maker Faire.
I knew I couldn't possibly build a robot and program it to play chess all before the Maker Faire, but I was confident that if I had a robot I could program it to play chess.

The Robot

Being a member of a Hackerspace comes with all sorts of benefits,
of which the greatest is the network of hobbyists you'll invariably build connections to.
One of the people in this network, who calls himself Inventor42, had built several 3D printer designs.
He was interested in having his 2nd most recent design do something new.
The 3D printer he gave me permission to use was a modification of the Rostock Delta Bot,
a RepRap design which we both decided would look really cool playing chess.

I received his permission to hack the delta-bot into an electro-magnet based pick-and-place machine.
The electro-magnet would be used to pick up chess pieces and move them about the board.
I had to get an idea on how big I could make the chess board and still have the robot reach all the corners.
This delta-bot was designed to be able to print onto an 8-inch square.
The board would have to be smaller than that for me to have a place to place the pieces down after they were captured.
I settled on a 7-inch square.

I received more great help from another hackerspace member who goes by the name of Schism.
Schism had been playing chess regularly at the Queen City Chess Club,
and already had experience printing out pieces for the set he took with him there.
I passed along the dimensions of my board and he had two complete sets made in short order.

Each piece had a nail pushed through the center so that they could be picked up with the electromagnet.
More shout-outs go to [Hyre] and Hsoj48 for producing an electromagnet
and for preparing the pieces with the nails.

The Program

Most 3D printers are controlled using a programming language for numerical control called G-code.
This same programming language can be used to control CNC routers, plotters,
and it is what I decided I would use to control my chess playing robot.
I knew from playing chess that most chess programs and chess players record moves using Algebraic Notation.
The program would need to convert from the standard algebraic notation
to G-Code so I set out to create a library that could do just that.

The Algebraic Notation to G-code converter currently requires moves to be entered as Reversible Algebraic
Notation since it doesn't keep track of where the pieces are in the game.
One simply enters the starting location of a piece and the ending location of the piece in order to
get the robot to move the piece. The advantage of doing it this away is that it allows flexibility in whether
or not the game is played by both people by entering their moves or just one person entering moves and the other
moving pieces on the board directly.

In the version that was ready for Maker Faire all the pieces were the same height,
which meant that the delta-bot did not have to worry about moving to a different height for each piece.
The software was flexible enough to move the height of a specific piece though,
since the piece is specified in reversible algebraic notation.

Future Plans

I hope to get a bit more accuracy in the robot, and to make the movements a bit less jerky.
Hopefully after making the moves less jerky I should be able to make moves faster.
I'd like to clean up the connections and wires on the robot itself so that it is easier to transport.

I would like to make the software keep track of a game
so that standard algebraic notation may be entered without requiring any additional information.
I would also like to have a visual front end for the software
instead of the terminal front end I had made for Maker Faire at the last minute.
The software should allow people to enter commands from devices that aren't directly attached to delta-bot.
It would be nice to provide an entire game in PGN format and watch the robot play it out for demonstration purposes.

Here is the github repository where I've uploaded the code which converts the reversible algebraic notation move into G-Code commands to be used by any 3D-Printer.
Please contact me if you would like to help with the project, or would like help getting it working for you.

It was sponsored in part by Harris Teeter, and the focus was on "Big Data." So we had transaction data for about 50K purchases made in Charlotte at five stores in April. We took that and combined it with a bunch of census data, breaking Mecklenburg County down into 470 neighborhoods and figured out how to do some cool metrics with it. Like, if you wanted to know the average home value of people who buy sandwiches from the deli on Thursdays, I could do that. Or, say, I could tell you what percentage of people who buy beer at 1:00 in the morning at a certain store dropped out of High School. -Zachary Shuford May 19, 2013

Our application used the ASP.Net MVC framework, we created a couple of visuals using the Data Driven Documents javascript library (also known as d3.js), and used Twitter's Bootstrap for the styles. We were using my Azure account to host the application, and the data was stored in a SQL Server database which we interacted with using NHibernate. We were almost disqualified for using SQL Server because one of the judges thought that since the requirement was for our code to be open source that we should have been using using a MySQL database. We had to explain that all our code was open source and available here on Github and that we could just as easily have used another database if we thought it would be a problem. Who knows, maybe we would have come in first if we had.

Team Dubmen, 2nd place, Hackathon Charlotte MMXXIII. From left to right: Zachary Shuford, William Owens, Patrick Graham]]>We CAN make password generation and recall easier!! Here's How: Can you find a pattern in these Passwords?

The above was a letter I received from my dad. I went ahead and created a little jsfiddle to perform the conversion he was describing. Test it out over on jsfiddle or below. https://jsfiddle.net/pabreetzio/162jz0b6/