Wednesday, November 18, 2015

Using an ultrasonic sensor with a Rasberry Pi

I was helping a friend build a robot the other day and he was having difficulty with the ultra sonic sensor. I offered to test it on my Pi which a "B" model. I followed this guide:

http://www.bytecreation.com/blog/2013/10/13/raspberry-pi-ultrasonic-sensor-hc-sr04
and hooked it up using the single 1k resistor. I used a total of 5 DuPont connector wires and put the resistor between two.

I had to alter the timeout of the code to a full 1 second to get valid results. Also I had to adjust the GPIO pins used to the ones that I actually used to hook up.

It worked out nicely:





Monday, September 28, 2015

Random Tables Update IV

I was able to connect the Azure site to Google Domains and left it running for a week or two and it worked fine. I have since shut it down the Azure application and removed the Storage files from the cloud. The repos are available on GitHub per my previous post. Development has stopped for the common library and the Web Portal until bugs are reported. I may update the data packs at a later date, but have begun to work on other projects until demand increases.

Wednesday, September 9, 2015

Random Tables Update III

I have split the repo into three parts:

RandomTablesCommon - portable library imported as a submodule into the other repos.

https://github.com/crb02005/RandomTablesCommon


RandomTablesUniversal - Windows 10 Universal app. It imports RandomTablesCommon as a submodule.

https://github.com/crb02005/RandomTablesUniversal


RandomTables - Web Application. It imports RandomTablesCommon as a submodule.

https://github.com/crb02005/RandomTables


Since I split the modules I went ahead and got a domain name. I'll announce it once I have the site up. I am working on making the Web App work on the Azure platform. This means I had to add yet another string provider. I haven't committed my changes which add Azure features. I am still developing that piece.

Azure has blob storage, and many other cool features. Here is an article I've been reading about the topic:

Here is a NuGet package:

I had a chat with some friends of mine Monday and I might have some content contributors after I get the Web port on the web. After I get things stabilized I might shift focus to community building. Adding creative common content will make this product really useful.

Now time for a small bit about BOM.

Byte Order Mark (BOM) is optionally included on UTF-8 files.

This goes unnoticed until your JSON parser stops working. With my latest development for Random Tables I started yet another implementation of a string provider. The Azure Blob string provider uses a memory stream to read the file.

The Windows 10, and System.IO.readAllText seem to chomp the BOM and it worked flawlessly. Reading from the memory stream it is a bit more manual. BOM's are easy to forget until they "Byte" you.

http://www.w3.org/International/questions/qa-byte-order-mark.en.php

Friday, September 4, 2015

Carl Burks' Random Tables Progress

I've made a bit more progress on my application.

I am working on adding a feature to support multiple data directories in the web version. This will keep things organized a little better and will make it easier to drop in content packs. I also registered a domain for this application and have researched hosting. After I finish adding the feature I plan to fork the code base and create a repo for each major part:

Portable Library
Windows 10 Port
Web Port

Further I will add a repo for the Creative Commons Share-Alike Attribution Non-commercial data pack.

Next feature will be to add logic for custom attribution display messages for the Web Port and corresponding parsing instructions to the Portable Library.

After these are developed I will hopefully setup the web facing application.

I will then split my time for this project between adding features, adding tables to the CC repo, adding content to the publisher packs which have given permission.

As a side note, Bing seems to hate blogger.com searching for my name, "Carl Burks", doesn't show any blogger.com links and shows a bunch of spammy unrelated content. I'm trying an experiment by adding my name to post title to see if that improves things.

Tuesday, September 1, 2015

Random Table Portable Library, Windows 10 Application, and Web Port in C#

Yesterday, I checked in a project I've spent a few weeks playing with:

https://github.com/crb02005/RandomTables
This is a utility for rolling random tables with support for connecting dependent tables. If you don't see the purpose you might not have played a pen and paper role playing game. Let's say you were running a space type game and you wanted to see what space craft were near by you might have a table that looks like this:

Tables - Space Craft Encounters (1d6)
1-2   No Encounter
3       Shuttlecraft
4       Some kind of cargo freighter
5       Assault Craft
6       Roll on Unusual Space Craft Encounters


You would roll a standard six sided die and get a result. This is fairly straight forward roll a one or two and nothing happens. Roll a three and get a shuttlecraft. Roll a four and get a cargo freighter. Roll a five get an assault craft. Roll a six, you would need to look at another table and roll on that. Depending on your game system this can be a somewhat tedious process. It is also difficult to organize multiple publishers of books tables and connect them.

My software solves many of these problems. Currently only sample JSON files are included, but I am working on creating useful game system independent data-packs for my utility. I have also contacted several publishers and requested permission to create data packs.

I've contacted AEG, Steve Jackson Games, Fantasy Flights, Troll Lords and Green Ronin. So far I've heard back from AEG and Steve Jackson Games. Both companies were polite and helpful.

AEG indicated if I was not making any money then they were fine with creation.

Steve Jackson Games online policy indicates that they will only allow tables already published.

I plan on adding tables from both provided I have time. I will need to thoroughly research publicly available tables for SJG and that will take some time.

How can I get this program you might be asking yourself. Currently I have a common library that is used by the Windows 10 Application and the Web application. I've currently got some test coverage. Until bugs are reported I plan on spending time adding content in the form of JSON files. I have a few minor features I'm planning on adding, but the core application I believe covers most cases. The application is written in C#. Given time and interest I might make a port to another language. After some additional testing I might look for hosting and deploy the web app.

Sunday, June 14, 2015

Octodad: Dadilest Catch

I bought this game on Steam as an early father's day present to myself. Steam was running their summer sale and I had looked at the title of this game, but I hadn't watched the trailer once I did I knew I had to have it. It is an amazingly unique hilariously game which is also family friendly. I have added this to the list of games I've beaten. It was totally worth the price.

Saturday, June 6, 2015

New Phone

My BLU Android phone recently developed a screen crack, which set a new personal record for phone ownership length. I had only had the phone for two months before the screen cracked. Previously I had an ZTE which developed a problem with the touch screen on the exact same spot at this phone developed crack so I think it might be jeans when I sit down. Needless to say, I'm probably not keeping my new phone in my pocket when I sit down. Since I am not going to buy another Apple product any time soon (see proprietary USB cable rant) I looked for Android phones. If money was no object I'd probably have gotten an S6 or perhaps a G4 by LG, the G5 release date is too far in the future and I was getting glass slivers in my hand using my cracked BLU. Not being one to splurge on phones I selected a two generations back S4.

http://en.wikipedia.org/wiki/Samsung_Galaxy_S4

I'm glad it has an IR blaster. This should be standard until all TVs implement Bluetooth.




Apple Proprietary USB cable rant

When I had an Apple computer the USB cable which came with the keyboard had a little notch on it which only worked with Apple Keyboards. It made me and others angry:

http://www.mactalk.com.au/28/75847-apples-made-me-mad-their-usb-extension-cable.html
https://discussions.apple.com/thread/1237982
http://arstechnica.com/civis/viewtopic.php?t=615190