LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Arduino music

Posted 05-15-2015 at 08:20 PM by peonuser

Arduino has a predefined sketch for out putting music to a speaker.

If you are familiar with sheet music, you can create a text file that has the noted and timing. But to use data on the Arduino takes a bit of manipulation/

So if you created a file with the following data:

G3-3
F4-8

You could use a bit of freebasic to extract the data to cut and paste into the sketch. Freebasic is free and is available for most platforms.
...
Member
Posted in Uncategorized
Views 179 Comments 0 peonuser is offline
Old

Days between dates.

Posted 04-11-2015 at 08:20 AM by peonuser

Thanx to an lq user, I was able to get this to work.

Just an experiment to determine the amount of days between two dates. In this case it is the days left in the current presidency.

Code:
#!/bin/bash
D=`date +%Y-%m-%d`
D1=`date +%s -d "$D"`
D2=`date +%s -d "2017-01-20"`
((diff_sec=D2-D1))
echo - | awk -v SECS=$diff_sec '{printf "Number of days : %d",SECS/(60*60*24)}'
echo " till Obama leaves
...
Member
Posted in Uncategorized
Views 199 Comments 0 peonuser is offline
Old

Devil in the details.

Posted 03-29-2015 at 12:03 PM by peonuser

Was trying to get a list of systems up on the network. Pingall.sh would not work at all. It was driving me nuts. So I went to another system and it worked.

$ cat pingall.sh
a=""
for i in {1..254}
do
ping 192.168.1.$i -c1 -w1 -v | grep "icmp_seq=1"
done

$ ./pingall.sh
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.623 ms
64 bytes from 192.168.1.32: icmp_seq=1 ttl=64 time=0.113 ms
64 bytes...
Member
Posted in Uncategorized
Views 232 Comments 0 peonuser is offline
Old

Network ports.

Posted 02-12-2015 at 08:38 PM by peonuser

Our goal here to see what is live on the network and how possibly vunerable those machines are. Might be interesting to use with a wifi network.

First lets get the live systems at the moment. You will need to change your code depending on your network,

alive.sh
Code:
 #!/bin/bash
rm goodips
is_alive_ping()
{
  ping -c 1 $1 > /dev/null
  [ $? -eq 0 ] && echo $i >> goodips
}

for i in 192.168.1.{1..255}
...
Member
Posted in Uncategorized
Views 205 Comments 0 peonuser is offline
Old

Pogoplug does linux.

Posted 12-26-2014 at 05:04 PM by peonuser
Updated 12-29-2014 at 03:15 PM by peonuser

A 486 laptop running floppy based Pitux linux connected via rs232 to a Pogoplug v2 running Arch linux. Knew I would find a use for that old laptop yet.

http://4.bp.blogspot.com/-85itCuMmfs...0/SUNP0039.JPG
Member
Posted in Uncategorized
Views 318 Comments 0 peonuser is offline

  



All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration