Showing posts from November, 2015

Raspberry Pi and Sensor Tag - Part II

In my last post  on this subject, I documented how to set up your RPi for the purpose of connecting to a Sensor Tag by TI and then collect data through all its sensors. In this second part of that journey I am going to show you how to accomplish the followings: Find the address of your Sensor Tag Connect manually to validate that Bluetooth works as expected Retrieve data from the sensors Find Mac Address There  are a few commands  that you will find useful in this quest of dealing with BT devices on Linux based systems. With the following command, you can discover all the devices in discovery mode around you and their mac address. We’re interested into grabbing the one that reports “SensorTag”. Turn on your tag, launch the command and then Ctrl + C to stop as soon you spot it. sudo hcitool lescan  Copy the associated address in the clipboard and then run this command sudo hcitool leech <your address here> Read Sensors Now let’s switch on the thermomete

Raspberry Pi and Sensor Tag - Part III

This is the third part of a  project started a while back  which is aiming to gather data from multiple sensors hosted by  Sensor Tag by TI . As I mentioned in Part II of this series after setting up the platform, we would be addressing the write-up of some code to retrieve sensor information via NodeJS. Here is what we’re going to do: Install SensorTag library by  Sandeep Bake some code to read accelerometer data Store the data for later review (simple edition) Modify Sensor Tag firmware for practical purposes Setup In the first post, we installed Node and verified that worked. Assuming that you haven’t already messed things :-) the next step is to install a library that will help us to retrieve data from the sensor. Enter the directory  Andromeda  or whatever you called the folder that will hold the project and type npm install sensortag I found necessary to run the following command otherwise I would have been facing permission issues while executing the code.

How to install latest version of Node using Brew

Image How to install latest version of Node using Brew The latest version of NodeJs right now is 0.4.1 The command brew install node right now, installs 0.2.6 - which is not ideal. I would like 0.4.1 I've looked at this list of commands for brew and ... I have been dealing with some issues in either using or updating nodejs and as it turns out some programs on the OS X platform do change the permissions on the key folder for npm. On top of that once you go in that stage and start hammering on the keyboard you only end up in a weird state that no-one online can reproduce and therefore help you out. However the linked post did help me and taught some. Here’s what worked for me on the first shot. sudo brew uninstall node brew update brew upgrade brew cleanup brew install node sudo chown -R $(whoami) /usr/local brew link –overwrite node sudo brew post install node Good Luck!

Raspberry Pi and Sensor Tag

Originally posted by gifnews A while back I documented  my first ride  with Raspberry Pi. Most recently I wanted to put together a simple system to do data collection from multiple small IoT devices. The key objective was to collect data from a  Sensor Tag  then run the data through some R code and to generate insights and some plots that could be reviewed through a website hosted on the Pi. Today I started putting together this project and I am documenting as I go through the exercise. Here is what I need to do: Configure and Update the RPI Install NodeJS Build a script in Node that retrieves data from one or more sensors Add database support where data can be stored Install R server to run scripts on a daily basis Wrap it up & testing Since it’s going to be a big project to put together just in one day I will blog as I learn and make progress about it. This get it installed on the system sudo apt-get install tux and just running tmux starts the session. Now

PSD file format, opinion and facts

During my career, I have met folks that despite extreme cleverness & geekiness were incapable of producing anything remotely of humor, occasionally burst an amazing moment of talent to the point that I could almost cry of hilarity.  The one that I selected for this Friday is dedicated to the . Enjoy! // At this point, I’d like to take a moment to speak to you about the Adobe PSD // format. PSD is not a good format. PSD is not even a bad format. Calling it // such would be an insult to other bad formats, such as PCX or JPEG. No, PSD // is an abysmal format. Having worked on this code for several weeks now, my // hate for PSD has grown to a raging fire that burns with the fierce passion // of a million suns. // // If there are two different ways of doing something, PSD will do both, in // different places. It will then make up three more ways no sane human would // think of, and do those too. PSD makes inconsistency an art form. Why, for // instance, did it suddenly decide that

Tic Tac Toe Bonanza - Part II

This post is a follow-up on the promise made  previously  which is the  implementation  in C# of a Tic Tac Toe algorithm often asked in an interview. I have already previously explained the algorithm therefore in this post I am going to focus just on the making of it. The key aspects of the code are the initialization phase and the move chunk of code. public static void main() { player = new TttNums[2]; player[0] = new TttNums("Toto"); player[1] = new TttNums("Molly"); int who = 1; //player numbers are 1 and 0 board = new bool[10]; //only 1-9 are used for (int k = 0; k < 9 && player[0].isTrying() && player[1].isTrying(); k++) { player[who].move(); printBoard(); who = 1 - who; //now it’s the other player’s turn } } Many of the recorded pairs do not share the same row, column or diagonal

Introduction to CyberPsychology

Image Introduction to CyberPsychology l Mary Aiken l RCSI Leadership As a discipline, CyberPsychology is concerned with the impact of emerging technologies on human behavior. CyberPsychologists study human interactions with t... If you haven’t heard that before, CyberPsycology is a thing and it is heavily used by forensic analysts. Not for straight cases of hacking but more for intricated security dramas like the ones where the hack was only possible with help from insiders. The video is very informative and Mary does an excellent job in explaining the fundamentals, however, the part that I love the most is the passage when she explains the  meaning of IA  as that is my philosophical mantra for innovation breakthrus. I shouldn’t point out the last two letters of this domain :-)

Billions in Change Solution: Free Electric Overview

Image Billions in Change Solution: Free Electric Overview Access to electrical power is the first step toward economic advancement for billions of people living in poverty. Free Electric can light their homes and sh... I have tried to bring to life this type of innovation before and I faced the sad reality of not be able to generate enough energy. Although in my case I tried with a few treadmills.  A house uses about 911KwH per month that is a bit over 30 KwH per day, which can convert to 25,795,357 calories per day. The  article  where I found the video doesn’t provide enough information about the design. I have tried to contact a few people to reach out and explore the opportunity of either collaborating or actually getting one. If they cracked the key obstacle behind it this could change the landscape of energy generation for so many people! I really hope that this is more than just a motivational stunt and I have no reason to doubt it given the background o