Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Zeitgeist-daemon using all the CPU

Hi there! :)
Some time ago I had a problem in my Ubuntu installation. All of a sudden, I had some weird process using all the CPU, causing the computer to become really slow and hot and making the laptop fans go crazy. Since I use conky, I quickly verified that the weird process causing all of it was zeitgeist-daemon. Zeitgeist-daemon is a process that keeps track of activities on your system (file usage, browser history, calendar events, etc.) and logs them into a central database. It does not only create a chronologic register, but also supports tagging and can establish relationships between activities.
Maybe due to some buggy update it went nuts and was keeping the whole CPU busy.
I tried to kill the process but it would just show up again and keep doing the same.
To temporarily disable it I had to perform a few steps (source):
  1. Add the Zeitgeist PPA to the system:
    sudo add-apt-repository ppa:zeitgeist/ppa
    
  2. Install the latest version of Zeitgeist:
    sudo apt-get update
    sudo apt-get upgrade
    
  3. Restart zeitgeist-daemon
    zeitgeist-daemon --replace
  4. Install activity-log-manager
    sudo apt-get install activity-log-manager
    
  5. Open activity-log-manager and click the "Logging active button" in the bottom right corner of the window to disable logging.
(Click the photo for better resolution in Picasa Photostream)
After disabling it in the activity-log-manager, all the problems were gone and everything was working as desired again :) .
If desired, it can be turned on again by clicking the same button.
It happened some time ago and I have reinstalled Ubuntu in the meantime and I have zeitgeist-daemon turned on ever since and never got the same problem again. I guess it was just due to a buggy update. Anyway, if it happens to you, now you know how to fix it :) .

Take care! :)



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

Turning the Raspberry Pi into a Wireless Access Point

Hi! Following my latest posts on how to get started with the Raspberry Pi "headless mode" and Using Bluetooth with the Raspberry Pi now I'll show how to turn the Raspberry Pi into a Wireless Access Point. Most of this post follows what is described here but I added a few more steps. Moreover, I ran into some troubles and had to do some troubleshooting. I used a D-Link DWA-140 Rangebooster N Adapter which contains a Ralink RT2870 chipset.

(Click the photo for better resolution in Picasa Photostream)
 The process looks a little long but it can be done in under 10 minutes :) . Every time you need to edit or create some file (for example /etc/udhcpd.conf) among this process you can use "sudo nano /etc/udhcpd.conf".

Hi there!
Following my previous post on how to get started with the Raspberry Pi "headless mode" I'll now show you how to install the Bluetooth tools.
On the project that I'm working on right now I'll be using Bluetooth with the Raspberry Pi so that later I can connect to several devices via Bluetooth. For this purpose I have ordered some USB Bluetooth dongles from ebay and some HC-05 Bluetooth modules, also from ebay.

(Click the photo for better resolution in Picasa Photostream)
The first thing to do is type "lsusb" in the terminal to see if your USB Bluetooth dongle is being recognized. As an example, the ones I ordered from ebay show up as:
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Headless start with the Raspberry Pi

Hi! Some time ago I made two posts about the the Raspberry Pi (Raspberry Pi has Arrived and First Impressions on the Raspberry Pi) and unfortunately since then it has been closed inside its box. I really wanted to do something with it but other projects always got in the way. Finally I'm doing a project where I'll use the Raspberry Pi and I hope to make some posts about Raspberry Pi stuff while I work on it. To begin I'll show you how to start playing with your Raspberry Pi without having to connect it to an external HDMI monitor or screen with RCA connector and using Ubuntu on your computer.

(Click the photo for better resolution in Picasa Photostream)
The first thing to do is get yourself a 4GB (or greater) class 4 SD card. Branded cards are usually better and more trustful. If you have one, then its time to prepare the card to be used in the Raspberry Pi.

How to view the processor information in Linux

Hi everyone! This is going to be a really short post but I think that someday it may be useful for you like it is for me. Sometimes friends, family or strangers give me/throw away old/damaged computers (some aren't damaged at all and can be fixed by formatting the hard drive :) ).  Whenever I get my hands in one of these computers I want to find out about the specs of the hardware. In this post I'll show you how to get info about the processor if you have a running computer. Basically, start a console and run:
cat /proc/cpuinfo
and you'll get all the info about the CPU, just like shown in the image below :) .

(Click the photo for better resolution in Picasa Photostream)

Homemade CNC: TheMaker2

Hi! As I previously said in my first post about my first Homemade CNC: TheMaker1, I was slowly developing a bigger, faster (didn't accomplish this part yet) and more robust CNC. Well, the development phase has finally come to an end and it is finally ready! :D In order to build a more rigid structure I decided not to build it with a moving gantry, but with a moving table on x axis and a fixed structure for y axis, which holds z axis. The build is based on this one.

(Click the photo for better resolution in Picasa Photostream)
One of the main objectives was to make it low cost and believe it or not, with some scavenging involved I managed to build the whole structure with only 84.4€! :D Oh, and this cost still includes some spare materials! :P

Adding an external power supply to a cheap USB hub

Hi again! In this post I'm going to show you how to add an external power supply to a cheap USB hub. :)

(Click the photo for better resolution in Picasa Photostream)
I've been running some experiments with two Logitech Quickcam for Notebooks Pro and the Raspberry Pi and unfortunately I haven't been getting any good results. I can't get many fps and some of the captured frames contain corrupted data but I think I may have found out the reason for that. After some reading I verified that the USB ports of the Raspberry Pi can only source 100mA to a device and maybe the cameras are consuming more than that. To bypass that problem I went out to buy a USB hub with external power supply.

Hi! Have you ever needed to find some files in linux? Here's a quick and easy "How To" on it. To locate files you can use the command "locate" (yes, to locate, use "locate", pretty obvious, huh? :P). If you know the name of the file just launch a terminal and write:
locate "filename" 

(Click the photo for better resolution in Picasa Photostream)

Hi! This post is about a common need for everyone. That's highly probable that, at least once, you needed to resize lots of pictures, either to spare some storage space or just because you needed them to have a specific size for some reason. Below you'll find a script to do it with no effort :) It is based on my previous script for Overlaying a logo in multiple images at once. Once again we'll use the "convert" program from the Imagemagick toolkit.

(Click the photo for better resolution in Picasa Photostream)

Hi! If you work with computer vision maybe you have had the need to generate a video from a sequence of images, in order to get a dynamic view of your results. I'm going to show you a very easy way to do that with a simple command, using ffmpeg :) .

(Click the photo for better resolution in Picasa Photostream)

First Impressions on the Raspberry Pi

Hi again! A few days ago I made a post about the Raspberry Pi board that I recently got in the mail. I only made a short description of the board since I hadn't test it at the time. I still haven't much to say but I have finally tested it and I'll share my first impressions of the board.

(Click the photo for better resolution in Picasa Photostream)

Raspberry Pi has arrived!

Hi! I just want to share with all of you what I just got in the mail yesterday! :D

(Click the photo for better resolution in Picasa Photostream)
The world famous Raspberry Pi (model B) has arrived! :) I thought that I would have to wait 1 or 2 months from the order date to get one but happily it only took 2 or 3 days! RS was extremely fast shipping it :)

For the few of you who still haven't heard about the Raspberry Pi, it is a full computer with the size of a credit card (85.60mm x 53.98mm x 17mm)! It's just one of those incredible things that will change the world as we know it :).

Now you may be thinking "Wow, that must cost a lot of money!..." but the size of the board isn't the only small thing about it! It only cost me 40€ with shipping included (from UK to Portugal) :) . Here are the full specs:

Overlaying a logo in multiple images at once

Hi! Have you ever had the need of placing a logo in multiple images and feared that you could have to do it one by one? Well, fear no more because you don't! You can do it easily using a program called "convert" which is bundled in the Imagemagick software package. You can even resize both, images and logo, by tweaking the parameters.

(Click the photo for better resolution in Picasa Photostream)

Using Piklab with Tiny PIC Bootloader


Piklab already has programming interfaces for various programmers, including the Tiny Bootloader. To configure it you must go to "Settings > Configure Programmers... > Tiny Bootloader" and then set your serial port and it's specific settings. In my case, since I use a USB <->Serial TTL Cable (see my previous post on how to make a Low Cost (1,85€) USB to RS232 LVTTL Serial Cable), I configure it with the following data:
  • Port Selection: /dev/ttyUSB0
  • Specific > Port Speed: 19200
  • Specific > Timeout: 300
  • Specific > No of Retries: 5
Get the flash player here: http://www.adobe.com/flashplayer

After inserting all the correct configurations for your serial connection, Click "Apply" and you're ready to go. To program you just have to go to "Programmer > Program". Do not forget to click the Reset button of your development board to reset the PIC and initiate bootloader when you want to program it.

Easy, right? Yes, but it doesn't always work. :( I had it working when I used Ubuntu 11.04 Natty Narwhal and some version of Piklab that I can't remember now but since I upgraded to Oneiric Ocelot and a new version of Piklab, the Tiny Bootloader programming interface stopped working. However, there is another easy way to use Tiny Bootloader with Piklab.

CNC Controller Board

In this post I'll make a short description of the CNC controller boards that I'm making available for you to download and use to control your own CNC. I'm posting 3 version of the same board, but only the first one has been really tested and has been working inside my CNC Control Box for a long time now (see my previous post Homemade CNC:TheMaker1). I'm 99% sure that the other boards will work too because they only have minor changes. I'll explain them to you in a few moments.

All the boards are made in Kicad. The design of the boards is based on the CNC3AX designs, but it uses other components that I had available at the moment that I made the board for my CNC. I advise you that I just wanted to get my CNC running, so I didn't make any careful selection of the most appropriate components and I didn't make the math to calculate the best values for the resistors. I just made it with the components that I had laying around. The boards design can be split in three parts:
  1. Isolation - it has Vishay's 6N137 optocouplers to isolate the parallel port from the rest of the circuit;
  2. Drivers - the ST Microelectronics' L297 drive the motors in unipolar mode (if you prefer bipolar you can change the schematics and boards at your will);
  3. Power Interface - a bunch of Vishay's IRL510 N-channel FETs working as switches controlled by the L297 Drivers.

(Click the photo for better resolution in Picasa Photostream)

Hi! In the following lines I'll present a project that has taken a very long time to complete: my homemade CNC machine. From the first tests and tryouts with various materials to the actual machine 2 years have passed. More important stuff always made me delay the development of the CNC. However, I estimate that the total amount of time was 3 weeks. I think CNCs are a big challenge for anyone since it involves a lot of mechanical, electronics and computer engineering (although we can bypass the computer engineering part by using available software). It was a challenge for me, with lots of frustration along the way because of my lack of skill to make the parts with the few tools I had, but now I can happily say "Mission Accomplished!":D.

(Click the photo for better resolution in Picasa Photostream)

Hi! Some time ago I made a post about My Home Lab where I showed a small CNC that I built. In the same post I said that someday I would post some details on the software toolchain and that's exactly what I'm going to do in this post.

The process of using a CNC to make 3D parts follows three simple steps:
    1. Design the parts.
To design the parts I use HeeksCAD. HeeksCAD is a free, open source, CAD application written by Dan Heeks.

(Click the photo for better resolution in Picasa Photostream)

How to use OpenMP with CMake

Hi! Some days have passed since I wrote something on the blog but I've been a little busy. Anyway, here I am again, this time to write about CMake and OpenMP. If you don't know CMake, and don't know how to use it, you may check my previous  tutorial on How to use CMake with OpenCV where I describe the basic steps to get started with CMake.
OpenMP is an API that supports multi-platform shared-memory parallel programming in C/C++ and Fortran. The OpenMP API defines a portable, scalable model with a simple and flexible interface for developing parallel appications on platforms from the desktop to the supercomputer.
After following the steps I described in the post that I previously referred, you'll have to add the following lines to tour CMakeLists.txt file:
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
After inserting these lines you'll be ready to use the OpenMP libraries in your project. That's just it.



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)
Donate

How to setup a Cisco VPN Client in Ubuntu 11.10

In this post I'll guide you through the very simple process of setting up a VPN client to a Cisco VPN using the Ubuntu's Network Manager. A VPN is a Virtual Private Network. What does this mean? It means you can connect your computer to a Local Area Network through the Internet and do everything you could do in that network (access files in a local server, access specific websites, etc.) as if your computer is connected to that network by cable or Wi-Fi.
The first thing you have to do is to install the VPNC plugin for Network Manager, so that it becomes able to support the Cisco VPN protocols. To install the plugin open a terminal and run the following command:
sudo apt-get install network-manager-vpnc
Now you just have to click on the network connections icon on the top menu bar, click "VPN Connections" and then "Configure VPN". The Network Manager window will popup and then you can add a new VPN and insert all the info to connect to the desired remote VPN server or import a configuration file (.pcf), if you have one.
Finally, restart your computer and if you entered all the correct settings, you're ready to go! Simple, isn't it? :)



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

Hi! This time I'm writing to talk about a great organizer for electronic components that I found, zParts. Some days ago I decided it was time to organize the lots of electronic components that I have in my home lab. I thought about developing an application were I could insert the parts references, the amount of each component I had, and also with some button to open the datasheet without having to browse the folder with lots and lots of datasheets. However, before developing the application I decided to search if no one had done that work before and I found zParts, by Jon Ziebell. I gave it a try, and that's exactly what I needed. It is written in Java, so it works in whatever operating system you have.

(Click the photo for better resolution in Picasa Photostream)
It's very simple to use and allows you to create categories of components, subcategories, and components with as many fields as you desire. You can also relate each component to an image and a datasheet. What else do you need? :D In my case I don't remember anything else I would need, but if you do, you can always program it yourself, since it is an open source project and its source is available in sourceforge. If you need to organize your components, give it a try! To run it just open a console, enter the folder where you extracted the zParts files and enter the following command
java -jar zParts.jar
If you have tested it, liked it and want to add a shortcut for zParts in Unity in Ubuntu 11.10 just do the following steps:
  1. Create a file under /usr/share/applications named zparts.desktop and paste the following code into it 
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Icon[en_GB]=/usr/share/icons/hicolor/scalable/apps/gdu-category-multipath.svg
    Name[en_GB]=zParts
    Exec=/<path to folder where you have zparts>/zparts_start.sh
    Name=zParts
    Icon=/usr/share/icons/hicolor/scalable/apps/gdu-category-multipath.svg
    NOTE: Don't forget to put the correct path in the 'Exec' line. You can also change the Icon line with the path to the icon that you prefer.
  2. Go to the folder where you have zParts and create a file named .zparts_start.sh and paste the following script into it 
    !/bin/bash
    cd <path to your zparts folder>
    java -jar zParts.jar
    NOTE: Don't forget to put the correct path in the second line.
  3. Give the script permissions to be executed
    chmod +x .zparts_start.sh
    And that's it! Now when you open the Unity board and type zParts its shortcut will appear.
If you use M$ Window$ you can also try out Component Organizer, which is a similar free software developed by a portuguese guy (user msr @ the portuguese robotics forum Lusorobotica. You can check the entire thread about it here).



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

top