Portada

Este es el blog del buscador temático sobre el open source Via Alternativa, basado en la API de Google.

En este espacio encontrarás noticias de varias fuentes RSS relacionadas con el mundo del código abierto y comunidades gnu-linux.

Todo el contenido de las anotaciones es responsabilidad de aquellos que las escriben y sus respectivas webs. Si administras una web enlazada por RSS y no estás de acuerdo con la redistribución de tus contenidos contacta con nosotros.

¡A divertirse!

El verdadero progreso es el que pone la tecnología al alcance de todos.

— Henry Ford

Logo Via Alternativa

Entradas recientes

Building A Dashcam With The Raspberry Pi Zero W

raspberry-pi-zero-w

I've been playing around with the Raspberry Pi Zero W lately and having so much fun on the command line. For those uninitiated it's a tiny Arm computer running Raspbian, a derivative of Debian. It has a 1 GHz processor that had the ability to be overclocked and 512 MB of RAM, in addition to wireless g and bluetooth.

raspberry pi zero w with wireless g and bluetooth

A few weeks ago I built a garage door opener with video and accessible via the net. I wanted to do something a bit different and settled on a dashcam for my brother-in-law's SUV.

I wanted the camera and Pi Zero W mounted on the dashboard and to be removed with ease. On boot it should autostart the RamDashCam (RDC) and there should also be 4 desktop scripts dashcam.sh, startdashcam.sh, stopdashcam.sh, shutdownshutdown.sh. Also create and a folder named video on the Desktop for the older video files. I also needed a way to power the RDC when there is no power to the vehicle's usb ports. Lastly I wanted it's data accessible on the local LAN when the vehicle is at home.

Here is the parts list:

  1. Raspberry Pi Zero W kit (I got mine from Vilros.com)
  2. Raspberry Pi official camera
  3. Micro SD card, at least 32 gigs
  4. A 3d printed case from thingverse.com
  5. Portable charger, usually used to charge cell phones and tablets on the go
  6. Command strips, it's like double sided tape that's easy to remove or velcro strips

 

First I flashed the SD card with Raspbian, powered it up and followed the setup menu. I also set a static IP address.

Now to the fun stuff. Lets create a service so we can start and stop RDC via systemd. Using your favorite editor, navigate to "/etc/systemd/system/" and create "dashcam.service"  and add the following:

[Unit]
Description=dashcam service
After=network.target
StartLimitIntervalSec=0

[Service]
Type=forking
Restart=on-failure
RestartSec=1
User=pi
WorkingDirectory=/home/pi/Desktop
ExecStart=/bin/bash /home/pi/Desktop/startdashcam.sh

[Install]
WantedBy=multi-user.target

 

Now that's complete lets enable the service, run the following: sudo systemctl enable dashcam

I added these scripts to start and stop RDC on the Desktop so my brother-in-law doesn't have to mess around in the menus or command line. Remember to "chmod +x" these 4 scripts.

 

startdashcam.sh

#!/bin/bash

# remove files older than 3 days
find /home/pi/Desktopvideo -type f -iname '*.flv' -mtime +3 -exec rm {} \;

# start dashcam service
sudo systemctl start dashcam

 

stopdashcam.sh

  1. SeaGL – Seattle GNU/Linux Conference Happening This Weekend! Deja un comentario
  2. Hot Swappable Filesystems, as Smooth as Btrfs Comentarios desactivados en Hot Swappable Filesystems, as Smooth as Btrfs
  3. How to Try Linux Without a Classical Installation Comentarios desactivados en How to Try Linux Without a Classical Installation
  4. How to Create EC2 Duplicate Instance with Ansible Comentarios desactivados en How to Create EC2 Duplicate Instance with Ansible
  5. TCP Analysis with Wireshark Comentarios desactivados en TCP Analysis with Wireshark
  6. How to Add a Simple Progress Bar in Shell Script Comentarios desactivados en How to Add a Simple Progress Bar in Shell Script
  7. Ubuntu 20.10 “Groovy Gorilla” Arrives With Linux 5.8, GNOME 3.38, Raspberry Pi 4 Support Comentarios desactivados en Ubuntu 20.10 “Groovy Gorilla” Arrives With Linux 5.8, GNOME 3.38, Raspberry Pi 4 Support
  8. Btrfs on CentOS: Living with Loopback Comentarios desactivados en Btrfs on CentOS: Living with Loopback
  9. How to Secure Your Website with OpenSSL and SSL Certificates Comentarios desactivados en How to Secure Your Website with OpenSSL and SSL Certificates
  10. Pretty Good Privacy (PGP) and Digital Signatures Comentarios desactivados en Pretty Good Privacy (PGP) and Digital Signatures
  11. Mark Text vs. Typora: Best Markdown Editor For Linux? Comentarios desactivados en Mark Text vs. Typora: Best Markdown Editor For Linux?
  12. Quick Tutorial on How to Use Shell Scripting in Linux: Coin Toss App Comentarios desactivados en Quick Tutorial on How to Use Shell Scripting in Linux: Coin Toss App
  13. How To Kill Zombie Processes on Linux Comentarios desactivados en How To Kill Zombie Processes on Linux
  14. Linux Command Line Interface Introduction: A Guide to the Linux CLI Comentarios desactivados en Linux Command Line Interface Introduction: A Guide to the Linux CLI
  15. How To Upgrade From Fedora 32 To Fedora 33 [CLI & Graphical Methods] Comentarios desactivados en How To Upgrade From Fedora 32 To Fedora 33 [CLI & Graphical Methods]
  16. Linux Mint 20.1 “Ulyssa” Will Arrive In Mid-December With Chromium, WebApp Manager Comentarios desactivados en Linux Mint 20.1 “Ulyssa” Will Arrive In Mid-December With Chromium, WebApp Manager
  17. The Preservation and Continuation of the Iconic Linux Journal Comentarios desactivados en The Preservation and Continuation of the Iconic Linux Journal
  18. Installing Ubuntu with Two Hard Drives Comentarios desactivados en Installing Ubuntu with Two Hard Drives
  19. Linux Journal is Back Comentarios desactivados en Linux Journal is Back