Fork Robotics Learning, Building and Exploring Robotics Tue, 10 Feb 2015 03:49:14 +0000 en-US hourly 1 Arduino IDE 1.6.0 is Here With Some Nice Features Tue, 10 Feb 2015 03:49:14 +0000 Continue reading ]]> Arduino just released version 1.6 of their IDE. I have to say it’s really nice to have a non-beta release that supports the DUE and Yun in addition to the rest of the Arduino family. The interface hasn’t changed, so it’ll feel very familiar to anyone who’s used the Arduino IDE in the past but there have been nice tweaks:

  • The drivers are signed for Windows and Mac
  • The serial monitor has been re-written on a modern JSSC serial library
  • Board Detection in the Ports sub menu (This worked for all the boards I tested except the Micro)
  • Ability to display Line numbers in the IDE

Here is a screenshot with both the line numbers and the board detection:Arduino IDE 1.6.0

Great stuff, I highly recommend getting your copy today here: Download Arduino IDE 1.6.0

]]> 0
Windows 10 Will Support Raspberry Pi 2 Mon, 02 Feb 2015 18:11:08 +0000 Continue reading ]]> As if the news about the next generation Raspberry Pi wasn’t exciting enough Microsoft just announced that Windows 10 will support for the new Raspberry Pi. This is all part of Microsoft’s  Windows Developer Program for IoT that already supports a stripped down version of Windows on Intel’s Galileo. Gotta say the potential for working with a Raspberry Pi with remote PowerShell is pretty awesome. I’m hoping to see some GPIO control cmdlets. If you’re not already registered you can sign up here.

]]> 0
Dynamic DNS with NameSilo and PowerShell Thu, 02 Oct 2014 00:25:03 +0000 Continue reading ]]> Most people have cable internet and with ISPs like this you will notice that your IP changes from time to time. This causes headaches if you want to know how to access devices at your home network from a remote location. The typical solution to this is to use a Dynamic DNS provider. At one time it was DynDNS but they eliminated their free option years ago. I’ve been using the free option from No-IP but after the whole seized domain issues last summer I decided to look for another alternative. I was already looking for a new registrar for the domain names I own and after much research decided to switch to NameSilo. They had the best prices I could find and they also had a solution to the Dynamic DNS issue.

API Access

NameSilo, in addition to a number of other great features, also provides API access to manage domains. Once I found this out it was only a matter of writing some code to do it. In this example I created a PowerShell script to run as a scheduled task on a Windows machine but it would be similarly easy to write it in any programming language. First you need to get your API key:

Get an API Key

Go to the API Manager page and check the box for “Generate New API Key” and the checkbox to accept the API terms of use then click “Next”.


The following screen will show you the API key to be used in the next step


Create the PowerShell File

Below are the PowerShell commands that will compare the current public IP and if the DNS entry is doesn’t match the script will update it. The variables are all at the top of the list. Copy the code below and paste it into a text editor, change the APIkey, the domain you want to work with and the host you want to update (this should be a pre-existing A Record). In this example we’re update Once you’re done save the file as NameSiloDDNS.ps1

# NameSilo API Dynamic DNS
$APIkey = "49d7202378997443f699a016”
$domain = ""
$record = "dyn"

###Code - Do not edit below this line
# Gather data about the DNS entries in the domain
$listdomains = Invoke-RestMethod -Uri "$APIkey&domain=$domain"
$CurrentIP = $listdomains.namesilo.request.ip
$RecordIP = ($listdomains.namesilo.reply.resource_record|where {$ -eq "$record.$domain"}).value
$RecordID = ($listdomains.namesilo.reply.resource_record|where {$ -eq "$record.$domain"}).record_id

# If the current IP address is not the same as the one in the record it updates it
if ($CurrentIP -ne $RecordIP){
$update = Invoke-RestMethod -Uri "$APIkey&domain=$Domain&rrid=$RecordID&rrhost=$record&rrvalue=$CurrentIP&rrttl=3600"

Scheduled Task

Now we need to create a scheduled task for this to run automatically.

  1. Click Start and search for “Task Scheduler” or “Schedule Tasks” (depending on which version of Windows you’re on)
  2. Click “Create Basic Task”
  3. Name the Task & click Next
  4. Select Daily for when to run the task (you can set it to run more or less frequently if you like) & click Next
  5. Pick a time to run the script & click Next
  6. Pick “Start a Program” and click Next
  7. In the Program text box type “PowerShell.exe”
  8. In the “Add Arguments” box type “-ExecutionPolicy Bypass C:\scripts\NameSiloDDNS.ps1” & click Next
  9. Click Finish

 Next Steps

This is a simple script and is effective for Windows machines, however many of us use other platforms that will not run PowerShell commands. The next steps would be to recode this for a Linux based language.

]]> 3
Clean a Soldering Iron Tip with a Dremel Fri, 08 Nov 2013 16:45:25 +0000 Continue reading ]]> A little over a year ago I noticed that my soldering was becoming messy and I wasn’t getting the same clean results that I used to. It was taking longer for the solder to flow and when it did it wouldn’t form a solid joint. I tried raising the temperature of the soldering iron, I tried a different solder, switched to a brass sponge instead of a wet sponge (a worthwhile upgrade) and tried using a tip tinner and cleaner. Nothing I tried worked so I decided to buy a new tip for my soldering iron. When the new soldering tip arrived it became obvious why I was struggling. Comparing the new tip with my old one I could see that after more than a year of using my soldering iron the tip had built up a significant layer of oxidation.

Solder tip new and used

Instead of putting on the new tip I decided to try to get some more life out of my old one.. I pulled out my Dremel and put in the 280 grit buffing wheel. After a few quick passes my soldering tip looked just as good as the brand new one and worked great. I made a video to demonstrate how you can clean your own soldering iron tip at home.

If you feel like soldering is harder than it used to be you might have the same issue. I highly recommend this method for cleaning the oxidation off of your soldering iron tip. Not only will you get cleaner results when soldering, you can save yourself some money by extending the life of your current soldering iron tip.

]]> 0
Using Raspberry Pi to Control a TinyG ShapeOko Tue, 30 Jul 2013 00:10:31 +0000 Continue reading ]]> When I put together my ShapeOko CNC I decided to use a TinyG as the controller. It’s a great board with a lot of support behind it, however the TinyG is strictly a controller for the mill’s motion. The G-Code commands need to be read in though a serial connection and it only has a buffer of 255 characters which means it requires that a computer be connected to send the commands. Instead of leaving my laptop with the ShapeOko I decided to use a Raspberry Pi for this purpose. Most of the documentation around the TinyG is based on Windows or Mac; there is not much info on using it with Linux. This is currently the way I’m using the Raspberry Pi to control the TinyG.

Finding the Serial Port

The first thing you need to do is find which serial port the TinyG is on. The easiest way to find it is by running the command:

dmesg|grep FTDI

It will respond with something similar to this:
I’ve highlighted the line you should look for. Unless you have another USB to serial device connected (like an Arduino) yours should also show up as “/dev/ttyUSB0″. In the following examples the assumption is that this is the address for the TinyG. If yours is different then you may need to change the commands below.

Putty and Plink

The commonly recommended program to communicate with the TinyG is a freeware (not open source) program called CoolTerm. It does have a Linux version however it is compiled for x86 processors so it will not run on a Raspberry Pi’s ARM CPU. An alternative program that can do the job and will be familiar to at least a few IT people is Putty. It is a free, open source terminal emulator and serial console for Windows and Linux. Putty is a GUI based program and it can be used, however I find it easier to use the command line version: Plink.

One of the benefits of using Putty is that it supports XON/XOFF flow control protocol. As I’ve mentioned, the TinyG can only buffer up to 255 characters before erratic behavior, missed lines and other trouble start cropping up. TinyG utilizes XON/XOFF to tell the sending computer to stop sending commands when its buffer is almost full and continues when it gets below a certain level.

Install Putty and Putty Tools

Putty is available in the Debian based software repositories (this includes Raspbian and Ubuntu). You can install Putty and Plink on a Raspberry Pi with this command:

sudo apt-get install putty putty-tools

Open the Serial Console

To connect directly to the TinyG using the command line version use this command:

plink -serial /dev/ttyUSB0 -sercfg 115200,8,n,1,X

This will open an interactive serial console that can send and receive commands. From here you can fully interact with the TinyG.

Stream G-code Files

The next step once you’ve configured all your settings and run some simple commands is to be able to send a whole file of G-code to the ShapeOko. You can do this by piping the file to plink like this:

cat | plink -serial /dev/ttyUSB0 -sercfg 115200,8,n,1,X

In this example the file “” would contain a series of G-code commands and plink would send those to the TinyG.

Exiting Plink

The shortcut to exit plink is CTRL+C. You can also use CTRL+Z but this simply suspends the program instead of closing it (Explanation of the difference between CTRL-C and CTRL-Z in Linux CLI).

Next Steps

The method above will give you the basic ability to directly communicate with the TinyG or stream of G-code into the TinyG, however it doesn’t give you a visual interface and you still need to find a way to get the G-code files to the Raspberry Pi. I started writing a web interface based on PHP and have spoken with Alden from Syntheos who invited me to help with their NodeJS based web interface, hopefully I will have more on this in the near future.

]]> 3