Thursday, July 31, 2014

Book review of Raspberry Pi Robotic Projects by Packt Publishing

I bought one more text book to learn of Raspberry Pi and this is quick review of the book.

Raspberry Pi Robotic Projects

Raspberry Pi Robotic ProjectsRaspberry Pi Robotic Projects by Richard Grimmett

My rating: 4 of 5 stars


I've had almost no experience in building robotics development before reading Raspberry Pi Robotic Projects because I was thinking that it costs a lot to pay for a computer or server, hardware components, and text book. However, I found it wrong after buying Raspberry Pi and this book.

I am totally new with robotoics development, but I did enjoy reading this book because I found that I can learn how to develop it quickly by following several small projects with Raspberry Pi, open source software, and some hardware stuff which I should by on Amazon.

There are some who feel it too easy and light for each projects, but I believe that this book is also fun to just read to learn about how hardware components work with programming by paying just $14 (kindle edition).

Lastly, this is quick review of each chapter.

Chapter 1: Getting Started with Raspberry Pi
I love the pictures of Raspberry Pi, hardware components and the explanation for each component.
Installation guide is also nice with several picutres for beginners.

Chapter 2: Programming Raspberry Pi
If you are not new with programming, you can skip this chapter.

Practical robotics development begins the chapters below.
What I love most is the pictures of the hardware components such as a USB camera, wheels, a speaker, and completed version because it helps us understand how it works and is build at last.

Chapter 4: Adding Vision to Raspberry Pi
Chapter 5: Creating Mobile Robots on Wheels
Chapter 6: Making the Unit Very Mobile Controlling the Movement of a Robot with Legs
Chapter 7: Avoiding Obstacles Using Sensors
Chapter 8: Going Truly Mobile The Remote Control of Your Robot
Chapter 9: Using a GPS Receiver to Locate Your Robot
Chapter 10: System Dynamics
Chapter 11: By Land, Sea, and Air

View all my reviews

Next, I need to purchase hardware components to achieve some of the robotics deployment in the book..


Book review of Raspberry Pi Server Essentials by Packt Publishing

I bought Raspberry Pi and SD card to try something related with hardware components recently because I've been using public cloud like AWS for years, but I just felt like trying to use a tiny computing and gathering some data into public cloud.
As I was very new with Raspberry Pi, I just bought a text book to learn about what I can do with Raspberry Pi quickly. This is my review of the book.

Raspberry Pi Server Essentials


Raspberry Pi Server EssentialsRaspberry Pi Server Essentials by Piotr Kula

My rating: 4 of 5 stars


If you want to try hands-on about installing several servers such WEB, DB, open source games, Streaming, and playing audio on Raspberry Pi, this book will bring you a good and quick hands-on step by step. But, it is focusing on application, there are little study about H/W component and its architecture, programming, nor server architecture. However, If you are a beginner with Raspberry Pi, it will be the first step to have fun with it by paying at least $55 ($10: Book, $35: Raspberry Pi, $10: SD card). Besides, I recommend you should buy the kindle edition.

This is quick review for each chapter.

Chapter 1: Getting Started with Raspberry Pi
Summrized hardware requirement, essential peripherals and installing OS. You can find what you need to enjoy Raspberry Pi at the essentials peripehrals section.

Chapter 2: Preparing the Network
Wireless configuration, benchmarking tools and Internet configuration are great and helpful

Chapter 3: Configuring Extra Features
Hardware watchdog is interesting to monitor its status.

Chapter 4: Using a Fast PHP Web Server and Database
Summirized minimum setup and configuration to implement LAMP servers.

Chapter 5: Setting Up a File Server
If you need a File server, you should read it.

Chapter 6: Setting Up the Game Servers
Here, it's getting more playful by installing open source games.

Chapter 7: Bitcoins ? Pools and Mining
I am not interested in Bitcoins and mining, so I skipped. But, it might be interesting to measure how much CPU is used during the mining.

Chapter 8: Streaming Live HD Video
Short hands-on about how to stream video by installing and compiling.
It was fun because I've never had experienced in streaming and gave me a quick insight how to stream.

Chapter 9: Setting Up a Media Center
This chapter also shows streaming and playing audio and was fun to try to play audio and make slideshows.

View all my reviews


This is This is my Raspberry Pi!

By the way, I tried internet bandwidth with speedtest_cli.py via LAN, following at Chapter 2.
The bandwidth is not so bad.

Friday, July 25, 2014

AWS CLI memorandum - Describe all Availability Zones for each region

I was creating CloudFormation template and wanted to list all of the Availability Zones for each regions to create the following Mappings in the template.

  "Mappings": {
    "AvailabilityZoneMap": {
       "ap-northeast-1": { "AZa": "ap-northeast-1a", "AZb": "ap-northeast-1b", "AZc": "ap-northeast-1c" }
      ...
       "ap-northeast-2": { "AZa": "ap-northeast-2a", "AZb": "ap-northeast-2b", "AZc": "ap-northeast-2c" 
    }
  },

Describing all the names of the regions
aws ec2 describe-regions | jq -r '.Regions[].RegionName'
eu-west-1
sa-east-1
us-east-1
ap-northeast-1
us-west-2
us-west-1
ap-southeast-1
ap-southeast-2

Describing all the AZs for each regions
$ for i in `aws ec2 describe-regions | jq -r '.Regions[].RegionName'` ; do
ec2-describe-availability-zones --region $i
done

AVAILABILITYZONE        eu-west-1a      available       eu-west-1       
AVAILABILITYZONE        eu-west-1b      available       eu-west-1       
AVAILABILITYZONE        eu-west-1c      available       eu-west-1       
AVAILABILITYZONE        sa-east-1a      available       sa-east-1       
AVAILABILITYZONE        sa-east-1b      available       sa-east-1       
AVAILABILITYZONE        us-east-1a      available       us-east-1       
AVAILABILITYZONE        us-east-1b      available       us-east-1       
AVAILABILITYZONE        us-east-1c      available       us-east-1       
AVAILABILITYZONE        ap-northeast-1a available       ap-northeast-1  
AVAILABILITYZONE        ap-northeast-1c available       ap-northeast-1  
AVAILABILITYZONE        us-west-2a      available       us-west-2       
AVAILABILITYZONE        us-west-2b      available       us-west-2       
AVAILABILITYZONE        us-west-2c      available       us-west-2       
AVAILABILITYZONE        us-west-1a      available       us-west-1       
AVAILABILITYZONE        us-west-1c      available       us-west-1       
AVAILABILITYZONE        ap-southeast-1a available       ap-southeast-1  
AVAILABILITYZONE        ap-southeast-1b available       ap-southeast-1  
AVAILABILITYZONE        ap-southeast-2a available       ap-southeast-2  
AVAILABILITYZONE        ap-southeast-2b available       ap-southeast-2  

I tried using AWS CLI to do the same, but AWS CLI only includes the zones for the region that you're currently using and it does not show the AZs for the other regions.
Describes one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone.

$ for i in `aws ec2 describe-regions | jq -r '.Regions[].RegionName'` ; do
aws ec2 describe-availability-zones --zone-names $i
done
A client error (InvalidParameterValue) occurred: Invalid availability zone: [eu-west-1]
A client error (InvalidParameterValue) occurred: Invalid availability zone: [sa-east-1]
A client error (InvalidParameterValue) occurred: Invalid availability zone: [us-east-1]
A client error (InvalidParameterValue) occurred: Invalid availability zone: [ap-northeast-1]
A client error (InvalidParameterValue) occurred: Invalid availability zone: [us-west-2]
A client error (InvalidParameterValue) occurred: Invalid availability zone: [us-west-1]
A client error (InvalidParameterValue) occurred: Invalid availability zone: [ap-southeast-1]
A client error (InvalidParameterValue) occurred: Invalid availability zone: [ap-southeast-2]

I need to think about how to convert the results into JSON format next.