Thursday, June 27, 2013

Automating youtube downloads.

Sometimes I would like to download a set of youtube files, but I do not want to sit and wait for all the downloads. So I created a text file with the video links. Then I set cron job to run a batch file that will automatically download the files at some other time say late at night when I am sleeping. (Good job for an older computer!!) When it is done, you should have a folder of the videos ready to watch at your convenience. (updated)
#  Get youtube videos
# Assignments
# --------------------------------
if [ -z "$1" ]
echo "You are using the datafile:  $datafile."

# Data input
while read line
do theurl=$line

youtube-dl $theurl -f flv

done < $datafile

Wednesday, June 26, 2013

The Arduino gets another project.

 A little project I am working on. Web server with external display clients (Arduino) for presenting important messages. Could be everywhere from a retail establishment to an office where hearing is impaired. A Raspberry Pi would be a good low cost manageable web server, but any decent web server will do. The pages can be put as not to be part of the regular
web server pages if you wish. So you are giving the web server double duty,  Displays will be text only unless you have graphics converted to text. Lowers the cost of the interfaces dramatically. Reusing old composite monitors or televisions with composite input puts old equipment back to work.

Test monitor:

Update: waiting on Arduino and  or the TV.out people to resolve issues between the software libaries. Possible solution of using a standalone arduino chip via the serial port to do the video out.

Tuesday, June 18, 2013

Sunday, June 16, 2013

Arduino to the rescue.

You can get add on boards to make your Arduino more functional. Seeed (available at Radio Shack and other fine companies) makes several boards that are price competive.)   I bought the Seeed ethernet add-on board for half the price of the Arduino option, but it was a bit trimed down such as no card slot. The board also works with the Osepp Arduino clones. That is what we used for this project.


I wanted a way to have a temporary web server up when I needed to bring the regular web server down.  The Arduino was the perfect choice. I just took the web server example from the Arduino IDE and commented out the code that was not needed (but could be reused later) and added the code that was needed i.e.


          client.println("<h1>Your server name<h1>");
          client.println("<br />");

          client.println("<h2>Bear with us as the server is under reconstruction!</h2>");
          client.println("<img src='' height=500 width=500 />");

Now I have a way to keep a web presence if I need to alter the server for a short period of time without the usual web page being up. Our Arduinos: