OSEPP Arduino Starter Kit

Arduino and a Raspberry Pi 2BSo, a month or so ago, while traveling for work, I was bored in the hotel room and found out there was a Fry’s Electronics around the corner from the hotel. I decided to pop in and look around and see if I could find anything interesting. I also wanted to see how much Raspberry Pi 2B boards were there (and if they were comparable to Amazon.) They had a couple of Pis, a large selection of basic electronic components and a pretty decent selection of Arduino shields and parts.

I’d been looking into getting an Arduino for a while and decided what the hell. There may have been single packed Arduino boards but I really couldn’t tell from the cards which was the base board an which was just an add on shield. I ended up with the OSEPP Arduino Basic Starter Kit.  Honestly, since I hadn’t ever used an Arduino, I didn’t own an Arduino, and I had some basic but not super amazing electronics skills, this really was the best choice.

The kid includes a lot of nice basic parts as well as a guide book to get you started using these basic parts.  The box itself promotes the major projects of “Volt Meter”, “LED Game” and “Electronic Buzzer”.  It also runs through the basics of lighting up some LEDs.  The tutorials are decent though I wish there was a little more on the basics of how to work the bread board and the little wires.  It’s not hard to figure out, but it also isn’t super self explanatory if you didn’t have any experience with electronics at all.  the Volt meter tutorial is less exciting than hoped and the Buzzer just runs up the music scales but it could be modified to play a tune using the little piezo buzzer.

WP_20150630_09_21_48_ProThe LED game is neat, but simple.  You make the lights flash in sequence and you must press the button when the appropriate light is flashing, which causes the lights to flash faster.  There is also a 7 segment LED in the kid, which you make count down from 9 to 0.  This actually has a lot of fun potential and I have some ideas for it but I need to figure out how to light up both numbers to display a number (such as say, a temperature).

After exhausting the fun of the starter manual, on my next trip to the area, I bought a temperature and humidity sensor and wired it up.  This was a bit trickier since it required figuring out how to find and download the necessary libraries and modifying the code a bit to get it to read properly.  In the end, I managed to get things working though, which was kind of great since the AC in my hotel room didn’t have a digital read out, so I could know exactly how cold it was and why I was either freezing or sweating.

So, fast forward a bit more again, I’ve got some fun ambitions going and the idea of playing with several Arduino projects.  Unfortunately, while cheap, Arduino boards can add up to expensive.  Unless you buy cheap Chinese knockoffs for $3 apiece off of AliExpress.  I also have some cheap Network boards and temperature sensors coming.  Five boards total, five sensors and two network shields, for around $35, really isn’t too bad of a deal if it all works.

And thus, I have a ton of Arduino boards to play with now.

IMGP5277

 

 

Raspberry Pi Rack

Even before buying any Raspberry Pi computers, I had this sort of vision for neat rack to put several of them in. The idea evolved a bit as the logistics of it got ironed out but after picking up a second Pi (and planning to get a third), I went and built the thing.

Raspberry Pi Rack

Sorry for the mediocre pictures, I didn’t think to take photos until things were running and I didn’t really want to unplug it. It currently holds a Raspberry Pi B+ and a Raspberry Pi2 B, the B+ is running a ZNC server to keep me connected to several IRC channels and the Raspberry Pi 2B is running a small OpenSIM server, though I’ll probably re-purpose it since in testing performance seems to top out at around 2000 Prim cubes and 4 Avatars. The instance I’ve got running on my VPS is much more suitable. On the other hand, it could be a good place to “archive” builds.

Raspberry Pi Rack

The build itself is pretty straight forward. I used (roughly) the following materials picked up at Lowes:

  • 3 pieces of 10×8 plexiglass cut to 5×7 size.
  • 6 6″ #8 thread rods.
  • 8 (2 packages) of #8 rounded caps.
  • 3 packages of #8 nuts
  • 6″ Micro USB cables from Amazon
  • Cat 5 Cable cut and crimped as needed
  • 1 Netgear Switch I had already
  • 1 Choetech 40W Smart power from Amazon.
  • The smaller screws holding the Pis in are 4mm i believe, and it took two packages of them (16 screws and 32 nuts).

The hardest part was working with the Plexiglass pieces. I could have cut it with the Dremel but the edge would have been all crooked for sure. Instead I scored and snapped them, which did leave a jagged edge on one edge but it could easily be sanded off. On a starting note, the Plexiglass comes with a plastic protective layer, this should be left ON until final assembly to protect the clear surface as much as possible.

Anyway, to cut the sheets down, I used a square and a box cutter to but a line where I wanted the break to be on one side, then clamped the sheet down on the edge of the workbench between the surface and a 2×4. The 2×4 was mostly to help protect the surface of the plexiglass from the clamps. The cut edge should be on the up side, right at the edge of the surface and the 2×4 (or whatever) at the edge on top. The Plexiglass should snap more or less cleanly off. I had some small chips left hanging on the shorter 1″ breaks to shorten the shelves to 7″ from 8″. I used a small hammer while the pieces was still clamped down to chip these down a bit.

The real trick was drilling the holes. In the end, I found the best results came from clamping all of the plastic sheets together between some boards and drilling them all at once. There should be a piece of wood completely covering the bottom of the drilling spot to help support the plexiglass as the drill penetrates through.

I had some trial and error trying to drill my sheets separately, so the holes are not perfect. For the mounting holes I laid the Pi itself where I wanted it and uses a pen to mark the holes. I probably could have done a bit better with a paper guide though.

Assembly was pretty easy, just a lot of tedious screwing of nuts as the thread rods were fed through the holes. Each shelf takes at a minimum, one nut above and below to hold them in place and the rounded caps go on the top and bottom. The power supply and switch are not mounted, they are simply sandwiched in place between the shelves, though the supporting long bars were positioned around the Switch to prevent it from sliding left or right or backwards.

The Power supply I picked because it has two standard wall outlets on one side. I used the Dremel to cut holes in the top sheet to allow these plugs to be accessible. I wanted the unit to be as self contained as possible, these plugs give me a place to plug the Switch in. It’s important when choosing a power supply that it has enough power on all ports to power a Pi. A USB HUB doesn’t work since it will distribute power across all the ports. Several ports I looked at had 2 “high output” ports for iPads and iPhones but the rest were lower output.

The USB power cables were 6″ jumpers I found on Amazon and the CAT 5 cable were small jumpers I made myself with ends and a crimper. When I add the back two Pis I’ll need different cables though, likely cables with a 90 degree connector and definitely longer ones.

Raspberry Pi Rack

The whole package sits nicely on top of my desktop box next to my Synology NAS.

Encryption and You…

encryption-imageThere seems to be an endless stream of stories about how the UK wants to ban the use of encryption on the Internet.  It’s hard to say what this says about the UK officials, since banning encryption is essentially impossible without completely breaking the Internet.

Well, technically it could be done, but you wouldn’t want to be on this Internet anymore for anything requiring security.

So a quick rundown on just what encryption is.  Let’s say you send data cross the Internet, an email, a tweet, e bank password, a credit card number for buying something on Amazon.  Without any sort of encryption, data is simply converted into bits, and sent from router to router to the machine on the other end.  Capturing this traffic as it flows across the Internet is actually fairly easy.

There was a very famous exploit plug in a few years ago called FireBug.  Firebug would sniff the local network for the log in cookies used by Facebook and snatch them out of the air (so to speak) and allow the user of Firebug to access the Facebook account of anyone else on the local network.  This was before Facebook encrypted the data for it’s log in information, so the cookie was just flowing across the network.  The cookie data basically is a way for Facebook to know “yes, this , but it will person has logged in and this is who they are” so you don’t have to enter your password every time.

Because Facebook switched to SSL Encryption for their log in data, these cookies are now encrypted as they pass through the internet.  You may still be able to snatch the cookie but it will be a garbled mess of gibberish.

Now imagine if your bank or Amazon didn’t use encryption.  The same methods used by Firebug could be used to pull your bank or credit card data.

This is why encryption is important and used every day.

But how does it work.  When you connect to a remote website, your computer and the website exchange keys for translating the encrypted data.  This means the data can only be read by your computer or the remote website.  An extremely simple example, Let’s say the “key” is “13” and the “algorithm” is “ROT13”.  The data would be translated by moving all of the letters in a data packet by 13, hence ROT 13 (Rotate 13).  The phrase “My name is Josh” becomes “Zl nzar vfWb fu”.  Now, this is a very very very simplified example.  Real encryption uses long long keys, complex multi faceted algorithms, often with time based mechanics, and in general, would never be human translatable.  In fact, without the key, depending on how complex the encryption is, it could take the most powerful computer in the world millions of years to break some encryption.

So, why does the UK government (and others) want to ban this important security tool?  It’s simple, they can’t break it.  The world has become aware of how the governments of the world are scooping up and reading all of the data across the Internet, and the world has turned to encryption to keep their privacy.  Websites big and small have started using SSL by default so all traffic is encrypted making reading the contents impossible by outsides.  More people are using things like VPN tunnels, TOR networks, and PGP keys for their emails, these are all useful encryption tools.

The claim of these spying agencies is that it makes it hard or impossible to “find the bad guys”.  This assertion is as ridiculous as claiming say, we need to ban White Vans because kidnappers always and only use White Vans.  Or maybe, we need to ban beards because “Terrorists always have beards”.

“Only bad guys encrypt their data”.

It’s basically applying a false sterotype and getting mad when it doesn’t fit.  Its also blatantly ignorant of the real world uses of encryption.  No one would every shop online since it would be trivial for hackers to harvest credit card data.  You may as well require you to speak your name, card number, card verification number etc out loud to the check clerk at the grocery store every time you want to buy something.

Building up to the Raspberry Pi

Raspberry_Pi_LogoI’ve been hitting the Raspberry Pi and Arduino pretty hard lately.  I plan to detail my projects some here in the future but I figured it would be good to start off with a little “why” and a little history.  I mentioned the Arduino, but I only plan on touching on the Raspberry Pi here today.

I’ve used a secondary PC for projects for a very long time now.  A second or third or even fourth PC an be extremely useful for learning more about PCs.  The main nicety is that if you want to completely wipe it out, you don’t have to worry about what to do with your important data on your main PC.  Want to try a new Linux distro?  Screwed up some configuration?  Just reformat and try again.  You can do some of this with Virtual Machines but that can mean sharing resources which isn’t always a good solution.  Also for any long term “always on” projects like a web server, having a dedicated box is generally cleaner and more secure.

The first project PC I had was my first personal PC that wasn’t “the family machine”.  When I graduated from High School, I was given a PC of my own. It was at the time a pretty “top of the line” Pentium 2 IBM with a blazing 450mhz processor.  Over the years i upgraded the hard drives and RAM and eventually the motherboard and processor.  Eventually, I found that I had a box containing all of the parts from the original machine, so I rebuilt that machine, installed Redhat Linux on it and started playing around with web server software.

During my time working IT/Engineering at my old television job, I accumulated several project machines.  When computers were upgraded, we just sort of let the old machines pile up in the back.  Sometimes these machines would go to employees if they needed a computer.  Sometimes I’d do projects at work to streamline the processes and we’d use a machine for some sort of ftp or scripted copy project.  If they were too old or just broken they’d get recycled.  I ended up with several of these machines as well.

The problem with these project machines is they are full PCs.  They need a lot of power to run, especially for something that is a very low use webserver or game server.  They also take up a lot of space.  Also, since many of the machines were used and old, they were prone to failure.  I started replacing the towers with old laptops but these have their own issues.  They take up less space and use marginally less power, but they also tend to over heat in confined spaces and if a laptop had been replaced at work, it likely had a severe issue and thus these laptops were more prone to failure and less easily repaired than the towers.

These days I’ve been phasing out the bulky old machines for Raspberry Pis.

The Pi uses way less power than a whole machine.  They are also super cheap, so buying several of them over time doesn’t really break the bank.  They aren’t super powerful, but I really don’t do anything that requires a ton of processing power, and because they are cheap, I can use several of them running single tasks to spread the load.  Frankly, they are still better than some of the towers I’ve used in the past spec wise.

So why the Pi?

There are a lot of options out in the micro PC space.  The Raspberry Pi is probably not “the best” but it’s definitely the “most supported”.  I like to learn and play around with new technology, but I’m at a point where I’m not super keen on having to fight with obscure technology.  This is pretty much the why of the Pi.  It just works.  Or at least, I can generally Google how to work it.

The Pi also runs Debian based Linux, which I am most familiar with when it comes to Linux.  Since the Pi is a full computer, it’s great for software projects.  There are GPOI pins but I’ve not really explored them yet.  I’m leaving the hardware tinkering to the Arduino for now.

Tiny Tiny RSS, Possibly my Perfect RSS Solution

rss_iconSo, I mentioned recently, I wanted to migrate off of my shared Hosting to a VPS on Digital Ocean.  One reason sited was more control over what I can do with the server.  It’s essentially just a cloud based Linux machine, I can do anything I would do on a locally hosted Ubuntu box with it.  I came across Tiny Tiny RSS recently, and it’s the perfect example of the kind of thing I wanted the VPS for.

While nowhere near the main reason, the final straw with my tolerance of Google’s increasing level of crap was the closing of Reader, a service I’d depended on pretty much since it’s inception.  I’d tried a few alternative solutions but nothing really did anything for me next tot he simplicity to Google Reader.

Eventually I just sort of lost the want for RSS feeds.  The whole web seems to be abandoning the idea 9probably because it’s not nearly as easy to plaster crap ads all over an RSS feed) so I just decided to let it go.

Recently I’ve been trying to find a good solution again.  I really hate not being able to keep up with infrequently updated blogs i find.  That’s like 90% of the reason i liked having Google Reader, so when that interesting niche blog I like that updates once ever 4 months updates, I can know.

I looked into some Firefox extensions but using them tends ot be clunky.  I’ve tried a few different apps on my phone but nothing is idea.  The biggest issue is a lack of sync across everything.

tinytinyrss

Tiny Tiny RSS is a self hosted RSS Reader.  You download it (with Git in this case), set up a database for it, and let it roll.  I’ve set it up on my little sandbox domain BloggingIntensifies.com and added feeds I was pulling with other services to it.

It’s web based, so I can get to it from anywhere.  Need number one.

It’s hosted by me, so I won’t have to worry about some “thinks they know best” company screwing me over again, need number two.

There is a built in API so it can be access via mobile with an app.  Need number 3.  BONUS!  There is even a compatible Windows Phone app.

The next step is to figure out what I did with my old list of Google Reader feeds and start loading it up.