DBASEII and Mr. SPOCK: Today we lost our first officer Mr Spock leaving definitely the Enterprise star-ship but not our hearts. Few people really knows the importance of Mr Spock on influencing our modern databases. In 1979, a programmer called Wayne Ratlif created a database that could accept common English words like “find”, “insert”, “append”, “browse”, etc.. Wayne worked for Jet Propulsion Laboratories in Pasadena.

It was possible also to display messages in the screen creating menus, print data and have real applications trying to bring the natural manner that Mr Spock accessed data in the sophisticated Enterprise. The database received the name of Mr. Spock home planet, in other words, Vulcan. Later the software turns commercial and it was renamed as DBASEII even not having a first version… Vulcan or DBASEII was able to run in 24KRAM computers based on Z80 processor until huge main frames and introduced a modern database management even not being a full relational database. I worked with “Vulcan” database when I was 13 years old creating an application for storage control. I am thankful for all inspiration that Mr Spock brought during decades to our lives and our technology.

R.I.P. Mr Spock or Leonard Simon Nimoy and thanks for all!!!

(March 26, 1931 – February 27, 2015)

My book is available now !!!!

After 11 months working all weekends and mostly all nights (late nights) and besides my duty on Intel, the book “Intel Galileo and Intel Galileo Gen 2: API Features and Arduino Projects for Linux Programmers” is ready in the printers and it will be available for shipping.

One of the conditions that make me to accept the proposal to write this book is “the digital book must be FREE”. The focus is to attend our maker/open-source community, colleges or any individual interested in our boards… You will be able to download the digital content on Apress website or you can order the hardcopy here http://www.amazon.com/Intel-Galileo-Gen-Features-Programmers/dp/1430268395/ref=sr_1_2?ie=UTF8&qid=1419625128&sr=8-2&keywords=intel+galileo+intel+galileo+gen+2.

The book has a little more than 700 pages (in fact was more than 800 but we reduced) and covers several topics like details of our Yocto build process, the integration of 7160 LTE modem, OpenCV with emotion recognition, 6 analog board control channels to control robotic arms, and much more info.

The front matter is below:

 What is in the book ?

Chapter 1 discusses the hardware design of Intel Galileo and Intel Galileo Gen 2, and the construction of serial and FTDI cables for debugging using Linux terminal consoles.

Chapter 2 explains how the Yocto build system works, and how to generate your custom SPI and SD card images. It also presents how to compile, install and use the toolchains for native applications development, and discusses procedures to recover bricked Intel Galileo boards.

Chapter 3 shows how to install and use Arduino IDE;  how to install the drivers needed in the computer or virtual machine used, running real examples of interacting sketches with simple circuits. It also brings a practical project that integrates Python, POSIX calls and sketches to send an alert when an email is received.

Chapter 4 discusses the new APIs and hacking techniques created especially for Intel Galileo and Intel Galileo Gen 2 boards. It contains a broad discussion about clusters architecture, how GPIOs are distributed and their respective speed limits.

A practical project of how to overcome Intel Galileo’s limitation and make the temperature sensor DHT11 work is presented.

Chapter 5 presents networking APIs and hackings using Ethernet adapter and Wi-Fi mPCIe cards. Also explains how to install new Wi-Fi cards and how to share Internet access between Intel Galileo and computers. This chapter also explains how to hack the Arduino IDE to download sketches using network interfaces instead of USB.

Chapter 6 is a practical project about tweeting using Intel Galileo boards with new OAuth authentication without intermediary computers or servers. The project uses RTC (Real Time Clock) with external coin batteries and Wi-Fi mPCIe cards.

Chapter 7 shows techniques to use V42L and OpenCV libraries and how to capture images, videos and detect face and emotions using a webcam. This chapter also explains how to change the Linux BSD to support eglibc instead uClibc and generate the toolchain to compile C/C++ programs. There are also examples of OpenCV in Python.

Chapter 8 presents a low cost project to create moisture sensors based in scrap materials and galvanized nails.

Chapter 9 shows a practical home automation project implementing a webserver using node.js , interacting with multiples sensors as motion and temperature, keypads and switch relays.

Chapter 10 explains how to install and use PoE (Power of Ethernet) modules with Intel Galileo Gen 2.

Chapter 11 discusses basic principles in robotics, how to design and control a robotic arm using analog controllers and shows a practical project using a 6 DOF robotic arm with a mechanical gripper and another one built with ground coffee.

Chapter 12 discusses how to connect a XMM 7160 LTE modem and use data channels in real networks using Intel Galileo boards.

Chapter 13 is only available online. It shows a practical project of how to design and build a low cost robot head with animatronic eyes and mouth that  expresses emotions. This chapter is available online at

http://www.apress.com/9781430268390, under the Source Code/Downloads tab.

What about Intel Edison ?

In few months we will have a “mini version” of this book including Intel Edison and the digital version will be also FREE.


Many thanks for ALL!!! I hope you appreciate the book.

My book is coming!!!!

I am feeling so excited with my book.. it is being painful because I am working so hard during late nights and my weekends while we were developing the Intel Galileo Gen 2. I hope to provide a good information to the community with some cool projects…

It is about Intel Galileo and Intel Galileo Gen 2 ... cool thinks are coming like

  • emotion recognition with openCV
  • Images and video capture with V4L2
  • Communication with LTE modems
  • Video card out through mini PCIe
  • How to make DHT sensor work
  • Hacking Intel libraries and IDE…


This is the Intel Galileo Gen 2:

This Intel Galileo Gen 2 has a lot of hw issues resolved including design changes… finally we have a decent GPIO expander with decent PWM as well. The ports can reach until 2.39 Mhz if configured properly and the pins used shares the same cluster because the pins are connected directly to SoC instead to be commanded via I2C. The board is a little bit bigger because we are not using the internal regulators of SoC, so we could reduce around 8F degrees the temperature.

The audio and weird audio jack for serial communication is gonne!! not we have micro USB connectors, OTG USB connector, the Linux terminal might be opened using FTDI cable, and much more….

I hope you enjoy this book!!!

How to “hack” CY8C9540A using I2C to set different freqs and duty cycles on intel Galileo Board

This is a short and very simple post but I decided to write it because I am pretty sure will be useful for some developers

Intel Galileo board has a GPIO explander called CY8C9540A that operates in 5V and is responsible for the PWM.

If you see the Servo library API, the methods implemented are the same methods implemented for Atmel micro-controllers except the fact we have two methods added that allow us to decide if the Servo trains will be 48Hz or 188Hz.

How the Servo library does that ? The Servo communicated with the CY8C9540A using I2C. The I2C communication can be done using the Wire API. Continue reading

PWM with low frequency using Arduino – Is the simplicity the best model ?

If you have a simple project and you need to develop a prototype quickly, I really like the OPEN solution offered by Arduino. It is open source, open hardware, free compiler, the language is close to C (easy.. easy…), it is very affordable and we can count to thousands of different examples how to use arduino to communicate with sensors, control IO’s, displays, gsm modules, etc.

OK.. let’s talk about my problem…

I was wondering if it is possible to program the Arduino Uno R3 in order to use the Pulse With Modulation (PWM) functions like analogWrite() but for very low frequencies like 5 Hz.

Why 5 Hz ? Imagine you need to send an ASCII sequence of bit using a GPIO and the purpose of this sequence is to simulate a serial keyboard with debounce of 200ms. Inverting this debounce we have 5 Hz and arduino Uno operating on 16Mhz you will conclude the analogWrite() is not able to provide this frequency.

Then you make some research and you discover it is possible to change the timers registers(TCCRnA and TCCRnB) on atmega but the best case you can reach is close to 31 khz (timer2) and to make your life a little worst, you realize also changes these registers the delay() function is impacted and some correction factor must be considered. This link has a nice reference that explain this.

Continue reading

Installing OpenGrok and Tomcat 7 on Ubuntu 13.04 quickly

If you are a developer you need a good source code navigator. I have used cscope to navigate and edit code directly from my terminal dismissing any graphical user interface but some people like to use the sourcenav or net beans ecosystem. However both are graphically nice but are “heavy” apps and also, if you want to share a way with your co-workers how to browser your code you will need to install the apps in different desktops.

But what about to have a fast way to navigate in your code, have fast crossed references  and share your source code with your co-workers dismissing the installation of source navigators on different desktops using your web browser ?

If you need something like this or if you wants a fast and easy installation of a good source navigation, I recommend OpenGrok. To be honest, even if I do not need to share my code with anyone, I use in my machine only for my personal code browsing.

OpenGrok runs as a webapp that means you and your co-workers can use your favorite browser navigator. Chrome, Firefox, Internet Explorer, whatever! you only need your preferable one to enjoy the code.

Considering OpenGrok is web based you will need to install a web server to be used as servlet server. OpenGroks supports Tomcat or Glassfish.

I am personally using tomcat 7 in my ubuntu 13.04. Let’s see the 3 basic steps:

Continue reading

How to download quickly the kernel source code used on your Ubuntu

I am really sorry if this post is so shot and newbie but I will use these instructions on my next posts.

Try typing:

#> sudo -i

#> cd /usr/src

#> apt-get source linux-image-$(uname -r)

If fails complaining about dpkg-source, you need the debian package development tools.

Install it doing:

#> apt-get install dpkg-dev

and try to download the source again.

You can get using git. If you prefer this method check this page.

I am using root (sudo -i) on this example because next post I will compile some code that requires the right permission to run the example codes.

Debugging tombstones with ndk-stack and addr2line

I really like to work with several components in a system including linux kernel or keep my emotions on userspace.

If you work with android and your are a real engineer, it is very difficult to resist the native support using Android NDK. If your software requires performance using graphic API like in OpenGL or if you need to access some specific information provided by some native library, the NDK fits for you.

However, bugs in native side sometimes takes time and usually it is not an easy and fast task. If you have the device and an easy way to reproduce the issue, it is ok but suppose you need to collect logs from remote users and the scenario is very difficult to reproduce. Some cases the users even see the crash visually but the system contains the logs blocking the approval of your software that must be completed to some costumer.. at this point the program/project managers team are “talking” in your ears… “fix it!”.

Working with Android, every time a process that runs on native side crashes, we have some small pieces of your stack in files called tombstones.

The tombstones are located at /data/tombstones as isolated files (one files represents one crash) or you can see them in your logcat Take a look in the adb shell:

root@android:/ # find . |grep tombs

root@android:/ #

The tombstone inform you about:

  1. Build fingerprint
  2. Crashed process and PIDs
  3. Terminated signal and fault address
  4. CPU registers
  5. Call stack
  6. Stack content of each call

I will not post a full tombstone here. Check the /data on your device and you will observe the 7 sessions mentioned above . Let’s go straight to the point.. how to debug the stack in tombstones files!

Continue reading