viernes, 28 de agosto de 2015
Posted by Espartan_7 on 10:35 with No comments
Posted by Espartan_7 on 10:14 with No comments
Ayer hablabamos de la llegada de Plasma 5.1 de KDE en el articulo “Ya se llego Plasma de KDE 5.1.1” y hoy vamos a explicar como instalarlo en Ubuntu, Linux Mint y demás derivados de ambos.
Lee todo el articulo antes de efectuar alguna acción
Si utilizas Ubuntu 14.04 y Linux Mint 17 KDE sigue estos pasos:
Instalación por terminal:
Si utilizas Ubuntu 14.04 y Linux Mint 17 KDE sigue estos pasos:Instalación por terminal:
$ sudo add-apt-repository ppa:neon/kf5Y si lo quieres desinstalar solo tienes que ejecutar:
$ sudo apt-get update
$ sudo apt-get install project-neon5-session project-neon5-utils project-neon5-konsole project-neon5-breeze project-neon5-plasma-workspace-wallpapers
$ sudo apt-get install ppa-purgeSi utilizas Ubuntu 14.10 sigue estos pasos:
$ sudo ppa-purge ppa:neon/kf5
Instalación por terminal:
$ sudo apt-add-repository ppa:kubuntu-ppa/nextY si lo quieres desinstalar solo tienes que ejecutar:
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get install kubuntu-plasma5-desktop plasma-workspace-wallpapers
$ sudo apt-get install ppa-purgeAl parecer los pasos anteriores (supuestamente correctos) están dando problemas, os dejo la instalación más recomendada por el momento (Comprobado en Kubuntu 14.10 64 bits):
$ sudo ppa-purge ppa:kubuntu-ppa/next
sudo apt-add-repository ppa:kubuntu-ppa/next
sudo apt update
sudo apt install kubuntu-plasma5-desktop
sudo apt full-upgrade
sudo reboot
jueves, 27 de agosto de 2015
Posted by Espartan_7 on 12:42 with No comments
Ubuntu Core Supports Raspberry Pi 2 I/O

Ubuntu Core abandons the old-style Debian packages, in favor of Snap, a new version of the Ubuntu phone’s Click package manager. Snap offers transactional updates. The idea is that all of these “things” on the IoT need to be updated to patch security holes or fix other issues.
As you might expect from an unofficial release, there are some rough edges. However, as you can see in the video below, it is workable, With all the hype about Windows 10 on the same board, it is a good move to push this release out sooner rather than later. Hopefully, the final release won’t be too far away. The Pi 2 is certainly capable enough, with specs that would shame an average desktop PC not too many years ago.
Posted by Espartan_7 on 12:36 with No comments
In the previous pair of installments in this series, you built a simple Verilog demonstration consisting of an adder and a few flip flop-based circuits. The simulations work, so now it is time to put the design into a real FPGA and see if it works in the real world. The FPGA board we’ll use is the Lattice iCEstick, an inexpensive ($22) board that fits into a USB socket.
Like most vendors, Lattice lets you download free tools that will work with the iCEstick. I had planned to use them. I didn’t. If you don’t want to hear me rant about the tools, feel free to skip down to the next heading.
Hiccups with Lattice’s Toolchain
Still
here? I’m not one of these guys that hates to sign up for accounts. So
signing up for a Lattice account didn’t bother me the way it does some
people. What did bother me is that I never got the e-mail confirmation
and was unable to get to a screen to ask it to resend it. Strike one.I had tried on the weekend and a few days later I got a note from Lattice saying they knew I’d tried to sign up and they had a problem so I’d have to sign up again. I did, and it worked like I expected. Not convenient, but I know everyone has problems from time to time. If only that were the end of the story.
I was impressed that Lattice does support Linux. I downloaded what appeared to be a tgz file. I say appeared because tar would not touch it. I examined the file and it looked like it was gzipped, so I managed to unzip it to a bare file with a tar extension. There was one problem: the file wasn’t a tar file, it was an executable. Strike two. I made it executable (yes, I’m daring) and I ran it. Sure enough, the Lattice installer came up.
Of course, the installer wants a license key, and that’s another trip to the Web site to share your network card’s MAC address with them. At least it did send me the key back fairly quickly. The install went without incident. Good sign, right?
I went to fire up the new software. It can’t find my network card. A little Internet searching revealed the software will only look for the eth0 card. I don’t have an eth0 card, but I do have an eth3 card. Not good enough. I really hated to redo my udev rules to force an eth0 into the system, so instead I created a fake network card, gave it a MAC and had to go get another license. Strike 3.
I decided to keep soldiering (as opposed to soldering) on. The tool itself wasn’t too bad, although it is really just a simple workflow wrapper around some other tools. I loaded their example Verilog and tried to download it. Oh. The software doesn’t download to the FPGA. That’s another piece of software you have to get from their web site. Does it support Linux? Yes, but it is packaged in an RPM file. Strike 4. Granted, I can manually unpack an RPM or use alien to get a deb file that might work. Of course, that’s assuming it was really an RPM file. Instead, I decided to stop and do what I should have done to start with: use the iCEStorm open source tools.
TL;DR: It was so hard to download, install, and license the tool under Linux that I gave up.
Programming an FPGA Step-by-Step
Whatever tools you use, the workflow for any FPGA is basically the same, although details of the specific tools may vary. Sometimes the names vary a bit, too. Although you write code in Verilog, the FPGA has different blocks (not all vendors call them blocks) that have certain functions and methods they can connect. Not all blocks have to be the same either. For example, some FPGAs have blocks that are essentially look up tables. Suppose you have a look up table with one bit of output and 16 rows. That table could generate any combinatorial logic with 4 inputs and one output. Other blocks on the same FPGA might be set up to be used as memory, DSP calculations, or even clock generation.Some FPGAs use cells based on multiplexers instead of look up tables, and most combine some combinatorial logic with a configurable flip flop of some kind. The good news is that unless you are trying to squeeze every bit of performance out of an FPGA, you probably don’t care about any of this. You write Verilog and the tools create a bitstream that you download into the FPGA or a configuration device (more on that in a minute).
The general steps to any FPGA development (assuming you’ve already written the Verilog) are:
- Synthesize – convert Verilog into a simplified logic circuit
- Map – Identify parts of the synthesized design and map them to the blocks inside the FPGA
- Place – Allocate specific blocks inside the FPGA for the design
- Route – Make the connections between blocks required to form the circuits
- Configure – Send the bitstream to either the FPGA or a configuration device
Constraints For Hardware Connected to Specific Pins (or: How does it know where the LED is?)
There is one other important point about placing. Did you wonder how the Verilog ports like LED1 would get mapped to the right pins on the FPGA? The place and route step can do that, but it requires you to constrain it. Depending on your tools, there may be many kinds of constraints possible, but the one we are interested in is a way to force the place and route step to put an I/O pin in a certain place. Without that constraint it will randomly assign the I/O, and that won’t work for a ready made PCB like the iCEStick.For the tools we’ll use, you put your constraints in a PCF file. I made a PCF file that defines all the useful pins on the iCEstick (not many, as many of you noted in earlier comments) and it is available on Github. Until recently, the tools would throw an error if you had something in the PCF file that did not appear in your Verilog. I asked for a change, and got it, but I haven’t updated the PCF file yet. So for now, everything is commented out except the lines you use.
Here’s a few lines from the constraint file:
set_io LED3 97 # red set_io LED4 96 # red set_io LED5 95 # green
Every
external pin (including the clock) you plan to use must be defined in
the constraint file. Errors in the file can be bad too. Routing an
output to a pin that is connected, for example, directly to ground could
damage the FPGA, so be careful! The picture to the right shows the
configuration with my PCF file (the center LED and the one closest to
the FPGA chip just blink and are not marked in the picture). Keep in
mind, though, you could reroute signals any way that suited you. That
is, just because LED1 in the Verilog is mapped to D1 on the board,
doesn’t mean you couldn’t change your mind and route it to one of the
pins on the PMOD connector instead. The name wouldn’t change, just the
pin number in the PCF file.Configuring an FPGA
Different FPGAs use different technology bases and that may affect how you program them. But it all starts with a bitstream (just a fancy name for a binary configuration file). For example, some devices have what amounts to nonvolatile memory and you program the chip like you might program an Arduino. Usually, the devices are reprogrammable, but sometimes they aren’t. Besides being simpler, devices with their own memory usually start up faster.However, many FPGAs use a RAM-like memory structure. That means on each power cycle, something has to load the bitstream into the FPGA. This takes a little time. During development it is common to just load the FPGA directly using, for example, JTAG. However, for deployment a microprocessor or a serial EEPROM may feed the device (the FPGA usually has a special provision for reading the EEPROM).
The FPGA on the iCEstick is a bit odd. It is RAM-based. That means its look up tables and interconnections are lost when you power down. The chip can read an SPI configuration EEPROM or it can be an SPI slave. However, the chip also has a Non Volatile Configuration Memory (NVCM) inside. This serves the same purpose as an external EEPROM but it is only programmable once. Unless you want to dedicate your iCEstick to a single well-tested program, you don’t want to use the NVCM.
The USB interface on the board allows you to program the configuration memory on the iCEstick, so, again, you don’t really care about these details unless you plan to try to build the device into something. But it is still good to understand the workflow: Verilog ➔ bitstream ➔ configuration EEPROM ➔ FPGA.
IceStorm
Since I was frustrated with the official tools, I downloaded the IceStorm tools and the related software. In particular, the tools you need are:- Yosys – Synthesizes Verilog
- Arachne-pnr – Place and Route
- Icestorm – Several tools to actually work with bitstreams, including downloading to the board; also provides the database Arachne-pnr needs to understand the chip
There are four command lines you’ll need to program your design into the iCEstick. I’m assuming you have the file demo.v and you’ve changed the simulation-only numbers back to the proper numbers (we talked about this last time). The arachne-pnr tool generates an ASCII bitstream so there’s an extra step to convert it to a binary bitstream. Here are the four steps:
- Synthesis:
yosys -p "synth_ice40 -blif demo.blif" demo.v - Place and route:
arachne-pnr -d 1k -p icestick.pcf demo.blif -o demo.txt - Convert to binary:
icepack demo.txt demo.bin - Configure on-board EEPROM:
iceprog demo.bin
./build.sh demoThis will do all the same steps using demo.v, demo.txt, and so on.
Try It Out
Once the board programs, it will immediately start operating. Remember, this isn’t a program. Once the circuitry is configured it will start doing what you meant it to do (if you are lucky, of course). In the picture below (and the video), you can see my board going through the paces. I have some buttons for the two adder inputs on one side and a reset button on the other. I also soldered some headers to the edge of the board.If you are lazy, you can just use a switch or a jumper wire to connect the input pins to 3.3V or ground. It looks like the device pins will normally be low if you don’t connect anything to them (but I wouldn’t count on that in a real project). However, I did notice that without a resistor to pull them down (or a switch that positively connected to ground) there was a bit of delay as the pin’s voltage drooped. So in the picture, you’ll see I put the switches to +3.3V and some pull down resistors to ground. The value shouldn’t be critical and I just grabbed some 680 ohm resistors from a nearby breadboard, but that’s way overkill. A 10K would have been smarter and even higher would probably work.

If it works, congratulations! You’ve configured an FPGA using Verilog. There’s still a lot of details to learn, and certainly this is one of the simplest designs ever. However, sometimes just taking that first step into a new technology is the hardest and you’ve already got that behind you.
Although you can do just about anything with an FPGA, it isn’t always the best choice for a given project. Development tends to be harder than microcontroller development (duplicating this project on an Arduino would be trivial, for example). Also, most FPGAs are pretty power hungry (although the one we used is quite low power compared to some). Where FPGAs excel is when you need lots of parallel logic executing at once instead of the serial processing inherent in a CPU.
FPGAs get used a lot in digital signal processing and other number crunching (like Bitcoin mining) because being able to do many tasks all at once is attractive in those applications. Of course, it is possible to build an entire CPU out of an FPGA, and I personally enjoy exploring unusual CPU architectures with FPGAs.
Then again, just because you can make a radio with an IC doesn’t mean there isn’t some entertainment and educational value to building a radio with transistors, tubes, or even a galena crystal. So if you want to make your next robot use an FPGA instead of a CPU, don’t let me talk you out of it.
Posted by Espartan_7 on 12:27 with No comments
Programmable Robot Arm Building an open source robot arm for makers and small businesses
Description
Industrial arms starts at
$10k each and go up from there. With low cost hardware everywhere now, I
see a market opportunity for low cost arms to serve small industry. I'd
like to drive the cost down by making an arm that others can tinker
with, improve on, and build community around. I'd like to see two arms
assemble a third.
Tell Elon Musk I need his rockets - lets put Marginally Clever robots to work building that lunar colony.
Tell Elon Musk I need his rockets - lets put Marginally Clever robots to work building that lunar colony.
Details
I don't know what to write here that isn't covered elsewhere. Ask questions?Like what you see? Support me on Patreon.
Components
| Quantity | Component name | |
| 2 | × | linear actuators + controllers and just a soupçon of joy |
| 3 | × | NEMA17 stepper motors + controllers https://www.marginallyclever.com/shop/motors-servos/stepper-motor-nema17-12v0.3a |
| 1 | × | MEGA 2560 |
| 1 | × | Custom controller PCB shield for MEGA |
| 10 | × | bearings of various types |
| 2 | × | metal brackets |
| 6 | × | touchless continuous hall effect angle sensors |
| 1 | × | PC power supply slim profile, 500W |
| 1 | × | Raspberry Pi or other high level interface for MEGA 2560. |
| 1 | × | USB wifi dongle wifi access for Pi |
| 35 | × | laser cut parts |
| 20 | × | 3d printed parts |
| 75 | × | fasteners or more, various types |
| 12 | × | metal spacers |
How to Design a Tool for the Arm
2 days ago • 0 comments I based the current wrist on this camera quick release. As long as your tool has a part that matches http://www.thingiverse.com/download:42988 then my robot should be able to pick up and use your tool.The PCB that is coming has a 12v power line and an RX/TX pair (with ESD protection). The 12v line can be turned on and off from software. That way you can communicate with and power the tool.
Now go to it!
-
Movement success!
3 days ago • 0 comments https://instagram.com/p/6yzLU6IfNx/?taken-by=imakerobots
It's very early days, but I've got great big news: I have now got controlled movement on all five axies.
Most of the day was spent testing electrical connections to my sensors and getting them to reliably deliver meaningful data from all five axies at once.
https://instagram.com/p/6yLZLuofPC/?taken-by=imakerobots
I also reprinted several pieces to correct for printer ...drift? I ask for a 6mm hole, I get a 5.7mm hole.
https://instagram.com/p/6vAFGjofBY/?taken-by=imakerobots
Same goes for pegs - usually oversized.
https://instagram.com/p/6xiBxsIfMA/?taken-by=imakerobots
After dinner I meant to play Rock Smith but, obsessive that I am, I went back to the robot and started implementing my first PID loop.
Since the sensors are delivering data all the time, I call gcode M114 to get the current sensor values. Then I call G0 [A/B/C/D/E][angle] and the PID loop kicks in to move that motor or actuator until the sensor value matches the target value.
Most of the first hour after that was spent hovering nervously over the e-stop while I unscrambled (in software) the motor/sensor relationship. Several times I said "go left" and the motor in question went right. ESTOP ESTOP ESTOP! One time the piston lifted the front end of the arm off the table. I wish the wrist were that strong!
The sensor magnets are really Goldilocks. For example, if the arm moves far enough back then weight compresses the anchor sensor downwards until the magnet is too close (papa bear). I imagine if I make the arm stretch out too far the opposite will happen (mama bear). I want it to stay baby bear all the time.
The next couple of days I'm waiting for my custom PCB to arrive. The time will be invested finishing an article for MAKE magazine and tweaking code in the Makelangelo
I asked HAD.IO to work on instagram integration. They say they're working on it.
-
3d printing test fits
3 days ago • 0 comments https://instagram.com/p/6vAFGjofBY/?taken-by=imakerobots
https://instagram.com/p/6xiBxsIfMA/?taken-by=imakerobots
Nothing sucks like printing part that has to be sanded to make it fit.
Over the weekend I printed several pegs and holes of graduated sizes to find the right fits. Then I went back and adjusted my 3D models with the new tolerances. That really bothers me - do I bake the tolerances into the original model? Maintain a version with ideal+correction? Both solutions are ugly.
http://learn.marginallyclever.com/index.php/Arm3_v1
Source: http://hackaday.com/2015/08/24/robots-are-coming-for-our-jobs-just-not-all-of-them/
Posted by Espartan_7 on 12:18 with No comments
Ever since this tiny, credit-card-sized computer, Raspberry Pi, appeared in the market, it has caught the imagination of every electronics and computer hobbyist around the world. The powerful Linux operating system combined with 26 input-output (I/O) pins can do many amazing things out-of-the-box. This article explains how to interface a USB camera and Wi-Fi with Raspberry Pi. It also explains the steps for making a webcam server using VLC Apache2 server software.
Raspberry Pi operating system
Several formats of Linux are available for installation on this tiny board. Among these, the most popular ones are Archlinux, Wheezy Linux, qtonpi, Fedora and xbmc.
I prefer Wheezy Linux because it is Debian style, where installation and tweaking is quite easy. The 2014-09-09-wheezy-raspbian.zip is available for download on raspberrypi.org. The wireless adapter, which comes in the form of a Wi-Fi dongle, can be installed out-of-the-box, so can be the USB cameras.
Fig. 1: USB camera with Raspberry Pi |
The steps to interface a USB webcam and Wi-Fi with a Raspberry Pi (model-B) board are given below. The USB webcam interfaced to a Raspberry Pi board is shown in Fig. 1.
Preparing the operating system. After downloading the zip file (wheezy-raspbian), extract the image in a folder on your computer and insert a 2GB or bigger-size SD card in the card reader slot. At this stage, check the identity of the SD card—sda, sdb or sdc—as shown in your Linux PC. After inserting the SD card, issue an ‘ls /dev/sd*’ command at a terminal prompt and see what name has been given to the card.
bera@Acer-AOD255E:~$ ls /dev/sd*
/dev/sda /dev/sda2 /dev/sda4 /dev/sda6
/dev/sda1 /dev/sda3 /dev/sda5 /dev/sda7
/dev/sdb1 /dev/sdb2 /dev/sdc
Here, my SD card has been identified as /dev/sdc. Now, go to the folder where you have extracted 2012-09-18-wheezy-raspbian.img file. This image file now needs to be written on the SD card to make it work as the operating system. Any mistake here will lead to the loss of entire data on your computer hard disk.
Look for the highest order, like sdc, sdd, etc, to identify your SD card. To be absolutely sure, just unplug and re-plug the card a few times and notice the changes.
At the terminal prompt, issue the following command:
bera@Acer-AOD255E:~/Desktop/Raspberry-
PI/OS$ sudo dd if=2012-09-18-wheezy-
raspbian.img of=/dev/sdc bs=2M
This will use dd, the powerful image-creator program of Linux, and transfer the image to the SD card.
When it prompts for ‘su’ password, enter it. (In Windows, there are several graphical image-creator programs like Nero Burner that can be used in a similar fashion.)
The above command may take several minutes. Look for HDD Lamp Busy indication. When the lamp stops blinking, go to the desktop and safely remove the SD card. (Right-click on the SD card and then click on Safely Remove.)
Connecting the display/monitor. Connect the TV screen or monitor to Raspberry Pi board using a composite video cable (AV cable) or HDMI cable, insert the SD card into the SD card slot and switch-on the power supply.
The TV screen/monitor even on the right AV channel may refuse to come up the first time. When that happens, remove the power-supply cord of Raspberry Pi board once (keeping the monitor’s power supply on) and then re-plug it. Now, the monitor should come on live, if the SD card is not removed.
Fig. 2: Raspberry Pi desktop screen |
Once the Raspberry Pi starts booting up, it will prompt you for login name and password. The login for Wheezy linux is pi and the password is raspberry. Once entered, Raspberry Pi will open the text screen. Enter Startx command at the prompt to start the beautiful GUI desktop screen (Fig. 2). The first time when I saw the image on my television screen, I was mesmerised.
To make Raspberry Pi open the GUI screen every time it boots up, all you have to do is to make a change in the raspi-config page. Select Sudo Raspi-config and bring the cursor down on Automatic GUI Boot Up. Select → Finish → Reboot. And, it’s done.
Connecting the USB camera and Wi-Fi dongle. Connect the Wi-Fi adapter and webcam to USB slots. You will run short of USB ports now because Raspi-B model has only two USB ports. Find a USB hub with multiple USB ports and grab a hub that has a small, 5V power supply input to it.
(Remember, wireless needs more power. Therefore, if the hub is not powered by a suitable 5V supply, the Raspberry Pi may malfunction.)
Power-on the USB hub; connect the wireless adapter (Wi-Fi dongle), web camera, keyboard and mouse to the USB hub. Go to Raspberry Pi desktop and double-click the wireless module (Wi-Fi Config). Most wireless adapters are easily detected and installed on Raspberry Pi.
Set up a Wi-Fi connection. After double clicking Wi-Fi Config icon, the wpa-gui page will open up. Click Search and a list of available wireless connections will come up. Select a connection and enter the IP address, if required, or leave it as it is for DHCP mode, select the authentication mode (mostly WEP) from the pull-down menu and then enter WEP key in the first blank space. Click Finish and Connect. The symbol will turn to Connected.
(For connecting to a mobile hotspot like cell phones, the WPA2 psk type authentication is used. Select the same from the pull-down menu.)
Checking network connection. To check whether your Wi-Fi is connected to the network or not, you need to go to Terminal and issue ping command as given below.
pi@raspberrypi:/$ ping raspberrypi.org
If you get continuous ping response, it means you are online and connected. Otherwise, you need to check the connections and, if required, need to go through the steps below.
Enter the following command at Raspberry Pi terminal:
pi@raspberrypi:/$ dmesg | grep ^usb
This command will furnish details of the kernel ring buffer of all the devices installed, starting with the word USB. Look out for 802.11 and the manufacturer’s name (realtek or ralink) associated with it. This means that the hardware is built on that chip and Raspberry Pi needs the driver (say realtek) for it. (On the latest Raspbian OS, this step is not required because it finds the suitable driver automatically.)
Driver installation. You can issue the following command to search the driver on your Raspberry Pi computer:
bera@Acer-AOD255E:~/Desktop/Raspberry-
PI/OS$sudo apt-cache search realtek
The command will give details of the packages available for that manufacturer. Since your Raspberry Pi is still not connected to the Internet, you need to go to a Linux PC that has an Internet connection and search for realtek drivers online. Go to the manufacturer’s website and download Debian wireless package (e.g., firmware-realtek.deb, firmware-ralink.deb) from their website. Copy this package in the /home/pi folder of the SD card and issue the following command to the Raspberry Pi:
pi@raspberrypi:/$ sudo apt-get install firmware-realtek.deb
This will install the right firmware on Raspberry Pi. Once the firmware is installed, disconnect the wireless adapter and reconnect it to Raspberry Pi. This will restart the kernel search process for the right software driver.
With the firmware installed, setting-up the connection is pretty straight forward now. Go back to the desktop and double-click WiFi Config icon and follow the steps mentioned above under Set-Up a Wi-Fi Connection section.
Setting up the webcam server. ffmpg has some issues on Raspberry Pi as a result of which ffserver does not work easily. Some staunch Raspberry Pi supporter claims to tweak it to work but I find it very complicated and not worth when various other easy choices are available.
Apache2 server with webcam software makes our job very easy but, before that, to ensure the webcam is working, we have to install VLC software. Along with showing webcam images, VLC can play all kinds of media files including *.flv files, which was not possible in the earlier OS.
Installation of VLC Apache2. To install it, issue the following command:
pi@raspberrypi:/$ sudo apt-get install
vlc apache2 webcam
This will install the wav trio—webcam, Apache2 and VLC media player. Go to the desktop, in the media section, click on VLC media player. Go to File → Capture Device, and see if the camera images appear or not. VLC is smart enough to find your first camera at /dev/video0 and the video driver as video4linux2 (if not, select from the pull-down menu). It will take some time for the images to appear on the screen. The images may appear broken at many places, but do not worry about it now.
Webcam software has no default configuration file to run with, so we have to make one now using Nano editor. Nano is the most beautiful, yet versatile, text editor for Debian Linux. Close the current window and open a terminal to write the following commands:
pi@raspberrypi:/$ sudo nano /etc/
webcam.conf
[ftp]
host = localhost
dir = /var/www
file = webcam.jpg
tmp = imageup.jpg
local = 1
[grub]
device = /dev/video0
width = 176
height = 144
delay = 5
quality = 75
trigger = 180
Save the file with ctrl+o command. Exit Nano using ctrl+x command. Close it and go back to the terminal window.
Note that, the webcam has a versatile software, with an ability to continuously ftp the captured image to a remote server, where the main webpage may be the host. But, in this case, we have made local = 1, which means that we will host it on Raspberry Pi’s Apache server page (var/www directory) itself.
The delay = 0 means the cam will take pictures non-stop. Since this will put a lot of load on the tiny Raspberry Pi board, a delay of five (means, taking one snap every five seconds) will be more justified for Raspberry Pi.
Checking the working of Apache server. We will now check whether Apache web server is working or not. In the Raspberry Pi computer, open a Midori browser page and enter the address as:
http://localhost
Apache will open a page, indicating the server is up-and-running (even though there is no content page available in the server). So far, so good. Now, we have to see whether the same page is available over wireless or not.
Before that, we have to know the IP address of our Raspberry Pi board (mine is a DHCP by my wireless router).
Issue the following command at the terminal window:
pi@raspberrypi:/$ifconfig
This will give details of the IP addresses of the wired as well as the wireless network of Raspberry Pi board. Look out for WLAN configuration—WLAN IP address of my Raspberry Pi board as assigned by my router is 192.168.1.2. So, I enter the following address in the address bar of the browser on my laptop:
http://192.168.1.2/
The same page opens up in my laptop. This confirms that Apache is up-and-running on Raspberry Pi board.
Automatic capturing of images. Open the terminal window and enter the following command:
pi@raspberrypi:/$sudo webcam /etc/
webcam.conf &
The last ‘&’ command means the process will execute in the background. Now, go back to a remote laptop and enter the following address in the browser address bar (To stop the webcam, use ctrl+c command or find out process ID number and then kill it by $sudo kill–9xxxx, where xxxx is the process number.):
http://192.168.1.2/webcam.jpg
A still-image facing the camera will now appear on the top-left corner of your laptop. This confirms that the webcam is working. You may try to open the same page in Midori browser on Raspberry Pi, but it may take several minutes to open, as most of its resources are busy handling webcam images. Do not worry; the page will open on the remote laptop quite comfortably.
Change the direction of the camera and refresh the browser on your laptop, and the image will change. Unless the browser window is refreshed, the picture will not change.
Now, we will create an automated page-refresh in Raspberry Pi itself.
Automated page-refresh from Raspberry Pi. Let us now use Nano to create a simple html page in /var/www directory of Raspberry Pi. Note that, /var/www is an Apache document root directory. Whatever we write here will be available, to view, from any PC connected to the network.
pi@raspberrypi:/$ sudo nano /var/www/
webcam.html
”no-cache”>
My Raspi Webcam
height=”240”>Save using ctrl+o and exit using ctrl+x keys on the keyboard. Now, go to the remote laptop and open the page http://192.168.1.2/webcam.html
The image will be auto-refreshing every second now. But, this may be a little irritating to the eyes, so we may need to enter a delay factor here. In the webcam, html CONTENT=”0” can be made to CONTENT=”5” for a more soothing refresh once in every five seconds.
You can strip Raspberry Pi board from the mouse, keyboard and monitor, and the webcam will still work non-stop—such is the power of Raspberry Pi and Linux.
Complete automation. Now, how about an automated script? So that, every time you boot or even before login, Raspberry Pi will fire-up the webcam command.
You can get rid of the monitor, keyboard and mouse from Raspberry Pi board. For that, we will put the command in /etc/rc.local file, and every time, on boot up, the webcam will start. Open a shell script file webcam.sh in /home/pi and enter the following command:
pi@raspberrypi:/$ sudo nano /home/pi/
webcam.sh
#! /bin/bash
webcam /etc/webcam.conf &
Save it and exit.
pi@raspberrypi:/$ sudo chmod +x /home/
pi/webcam.sh // make it executable
Now, in the /etc/rc.local file, enter this line before ‘exit 0’ line like this:
pi@raspberrypi:/$ sudo nano /etc/
rc.local
…..
…..
/home/pi/webcam.sh
exit 0
Save it and exit.
Now, strip-off the keyboard, mouse and monitor from Raspberry Pi, and reboot it. Then, go to the remote laptop and open the page http://192.168.1.2/webcam.html. Look for the time stamp at the bottom of the picture. It should change every five seconds. If so, you have just made Raspberry Pi an automated webcam server.
Setting time and date. To reduce the cost of Raspberry Pi board, its manufacturer has not included a real-time clock (RTC) on the board. So, every time on boot-up, the time goes back to an earlier date. However, you can change the date using the following command:
pi@raspberrypi:/$ sudo date –set=
’2014-11-06 23:30’
But, how to get your Raspberry Pi board running without a keyboard, mouse and monitor? Simple, through ssh (secure shell) command.
Fig. 3: Raspi-config window |
Reboot Raspberry Pi board and access it from a remote PC or laptop through Wi-Fi. That is, after successful installation of the Wi-Fi dongle, you can reboot Raspberry Pi computer and run it on headless mode (no keyboard, mouse and monitor). Wi-Fi should be connected on the same network to access Raspberry Pi computer using ssh command. Issue the following command:
pi@raspberrypi:/$ ssh -l pi 192.168.1.2
When asked for password, enter raspberry and you are good to go. Change the date and time using above command and check the webcam (which is already running now) time stamp on http://192.168.1.2/webcam.html page. You will see the current time running now.
Capturing live images using motion software. There is another versatile, video-rendering open source software available, which works well along with Raspberry Pi. Motion software, besides streaming video, can detect sudden motion of an object in the frame area and take snapshots or videos, depending on the threshold limit set in /etc/motion.conf file. To install motion software, follow the steps as given below.
$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install motion
By default, motion remains off. You need to edit motion configuration file. To do so, enter the following command in the terminal:
$sudo nano /etc/motion/motion.conf
Motion configuration file will appear and you can change a few settings. Most importantly, though, we need to change the following:
daemon off (to switch on—this can be changed near the top of the file). Save it, exit Nano editor and open the next motion file using the following command:
$sudo nano /etc/default/motion
Change start_motion_daemon= no to start_motion_daemon=yes.
Now, we need to start motion server by issuing the following command:
$sudo service motion start
Wait for a minute and then navigate to your Raspberry Pi’s IP address at 8081 port.
It should be something like http://192.168.1.2:8081. You can enter this IP address on the Web browser in Raspberry Pi or the remote laptop to access the image being captured by the webcam.
You will find your Raspberry Pi webcam churning out streaming pictures.
You can do further settings in motion.conf file as follows:
$sudo nano /etc/motion/motion.conf
Find Threshold under Motion Detection Settings. The default value is 1500.
The threshold value 1500 means that, if there is a minimum disturbance of 1500 pixels in the picture frame of the camera, it will trigger an event. Take a snapshot (or video) and dump it to /tmp/motion directory. However, since 1500 is a small value, you may change it to 6000.
At this point, you may change the webcam port to 5678 as 8081 is very common. Find On Picture Save in motion.conf file and create a pipe in front of it. Write the program you want to start additionally. For examples, I have added my program sendmail1.php (as shown below).
on_picture_save echo ‘Alert’ | echo %f >
/tmp/motion/img.txt | php -f /var/www/
sendmail1.php
(Here, php -f /var/www/sendmail1.php is my program that motion kicks into life.)
You will find many parameters in motion.conf file and you can change them to make motion much more interesting.
Posted by Espartan_7 on 10:14 with No comments
There is a lot to be said for replacing certain kinds of jobs with robots. Most people would agree that replacing physical human labor with automation is a good thing. It’s especially good to automate the dangerous kinds of labor like some facets of factory work. What about automation in fields that require more mental labor, where physical strain isn’t the concern? Is replacing humans really the best course of action? A year ago, a video called Humans Need Not Apply set forth an explanation of how robots will inevitably replace us. But that narrative is a tough sell.
Whether it is even possible depends on the job being automated. It also depends on how far we are able to take technology, and the amount of labor we are willing to offload. Automation has been replacing human workers in assembly and manufacturing industries for years. Even with equipment and upkeep expenses, the tireless nature of robotic workers means dramatically lower overhead for businesses.
Many of the current forms of factory automation are rather dumb. When something goes wrong and their task is compromised, they keep chugging away. That costs time and money. But there are companies out there producing robots that are better on many levels.
May Your Robot Overlords Be Cute and Cuddly
In 2013, Rethink Robotics
started filling orders for a new line called Baxter. They are a class
of general purpose robot that can be programmed to do many kinds of
manual tasks. Baxter bots have vision, and they can learn how to do a job simply by watching. They don’t need to be programmed in the traditional sense.Baxter even has a face – a screen that shows different expressions depending on his state. When he’s in the midst of a task, his eyes are cast downward. If something goes wrong, he stops what he’s doing. His cartoon face appears sort of shocked, then sad. He goes into safe mode and waits to be fixed.
If workers in manufacturing industries have anything at all to worry about in the near future, it is robots like Baxter. He’s streets ahead of bigger, dumber automatons for several reasons. Baxter runs Robot Operating System (ROS), which is completely open source and runs on standard PC hardware. Older ‘bots are graceless single purpose behemoths compared to Baxter. He is loaded with sensors and cameras that allow him to safely work side by side with humans, doing pretty much anything that fits his range of motion and tool attachments. In a way, Baxter is a kind of Arduino for companies that want to experiment with automation.
Baxter isn’t perfect, though, not even close. He would probably need several more layers of finesse and some decision-making skills before he could be counted on to assemble Big Macs.
I Need a Price Check on Brawndo

Self-checkouts seem like a good idea because they provide more possible points of exit. They’re supposed to cost the company less money overall. But the situation is not as simple as ‘automation costs less’.
Many stores have installed self-checkouts only to remove them later. They make theft easier, and they have proven to lower overall customer satisfaction. It’s all fun and games until your coupons won’t scan and you can’t find the PLU for kumquats. Every frustration adds time to transactions, which holds everyone up.
Even if businesses replace human cashiers with self-checkouts as far as the eye can see, they still need humans to watch over the transactions. In the fantasy land where every self-checkout functions perfectly all the time and operates at an iOS-for-toddlers level of simplicity, the transactions still need to be monitored.
Besides, plenty of people will always prefer to interact with a human cashier. They will want to buy their milk and toilet paper from the brick and mortar stores no matter how poorly lit and dystopian they may become.
What Color is Your Parachute?
Replacing humans is a really difficult endeavor, even on a small, specific scale. Forget all the complex sensory and collision avoidance advantages of Team Humans. We will likely emulate all of that in due time. The big reasons not to worry are much simpler than that.Automation saturation is a simple matter of economy. The thing is, robots make far better workers than they do consumers. This is problematic when you consider that most economic models require both workers and consumers. If large groups of people are unemployed, that means large groups of people are spending as little money as possible to survive, and the economy stagnates.
Even if we get to the point where advanced Baxter-bots are showing each other how to do things and down-voting each other on their robotic Stack Exchange, humans will always be necessary at some level. We may be a reckless and hedonistic species, but we’re not going to replace ourselves into extinction. That’s just silly. Someone still has to design robots, train them, fix them, and streamline their processes. Jobs will be created along the way, some we can’t even imagine.
For at least the foreseeable future, only humans care whether automatons improve technologically. Only humans will drive it forward. As long as humans are making the decisions, humans will remain in the equation, for better or worse.
Suscribirse a:
Entradas (Atom)



