logo

Two Websites I've Been Asked To Make

Normally when family or friends say they need a website I roll my eyes and hope there's a way I can get out of doing it. But then my older brother, Tim, asked me to do one that actually got me quite interested.

Tim's the engineer for a local radio station and is responsible for making sure - amongst other things - the station stays on air. He wants a way to monitor the output level of the station's signal remotely. So he's bought an Arduino kit and written a "sketch" file to have it monitor audio signal levels via a 3.5mm input jack.

2012-01-27 09.24.23

The Arduino board has a network connection and the plan is to put it on their network and it give a publically resolvable IP address. The Arduino board will respond to a HTTP request with a text/plain response that contains a number from 1 to 20 that is a measure of the output at that moment.

What Tim wants me to do is write a web front end to this. It needs to regularly "ping" the Arduino board to get the output signal and make some kind of visual indicator of historic output. If it drops to 0 for any length of time then he's got an issue. Either the Arduino has packed up or station is off air.

This is the kind of geekery I enjoy and I'm looking forward to getting stuck in to it. The Arduino in the shot above is in my possession and I'm free to mess about with it as I please.

Also on my to-do list is to make a website for Quinn's boyfriend's dad's driving school. He too has produced a "sketch" to show me how it should look:

image

Quinn's boyfriend is a talented artist and currently studying on a Computer Animation course at university. He must have gotten his talents from his mum's side me thinks.

Which website do you think I'll do first? Hmm....

Comments

  1. I understand your frustration! (laughs like Beavis and Butthead in "Tech Support" episode.)

  2. Hi Geeky do you want to go?

    If you didn't want to poll an internal IP from an external website you could build an AIR app.

    Have the app installed on a couple of machines inside there network - the apps can talk to each other in realtime using the RMTP protocol for failover.

    You could have the AIR app broadcast updates lots of different ways: Twiiter, SMS - via a HTTP gateway, Android C2DM, Twilio -might as well have a phonecall as well and not forgetting email. If you want a website as well then have the app post updates to an external webserver.

    Or you may prefer to have the notification logic moved to the webserver depending on where you might get the most reuse.

    One thing the AIR app can do is monitor a microphone so could potentially replace / backup the Arduino board.

    1. Interesting ideas. As much as I'd like to investigate them all to the nth degree of geekiness I have to be realistic about how much spare time I have. My to-do list is getting bigger by the day. Going to have keep the solution to this as simple as possible.

      Show the rest of this thread

    • avatar
    • Karel
    • Fri 27 Jan 2012 04:43 AM

    The second one is pulled from the WayBack Machine I guess?

    1. I wish it was. It's in a Word document I've been give and is on my desktop waiting for me to turn it in to a state-o-the-art website. Whether the Comic Sans survives or not remains to be seen.

      Show the rest of this thread

    • avatar
    • Jaap
    • Sat 28 Jan 2012 03:29 AM

    Very interesting projects Jake, like the hardware one and suggested approaches, saw some project before for a windsurf school in which they measured windforce and angle to alarm for bad or good sailing conditions together with someone for safety pressence, they used twitter for that. I forsee a title Jake's Demotica section on the website;-)

    • avatar
    • Ferdy
    • Mon 30 Jan 2012 02:37 PM

    Jake,

    Unless you really insist on doing this yourself, I'm wondering if the service http://aremysitesup.com/ could be a solution?

    I'm like you, trying to avoid such mini projects for a lack of time and they only bring trouble. Plus, you'll be responsible for it eternally. I'd definitely look to outsource the problem to the above service.

    As for the driving school project, I'd definitely take it on to look for some modern front-end development learning opportunities, for example in HTML5, responsive web design, things like that. In addition, I can highly recommend submitting your designs to conceptfeedback.com and fivesecondtest.com for some free peer advise.

    And no, I'm not affiliated with any of these services :)

    • avatar
    • Gregg
    • Fri 3 Feb 2012 02:24 PM

    For the Radio strength website, does it have to be any particular language?

    I ask because RRDTool is a pretty cool and powerful tool to graph just about anything that can provide a number.

    Its a simple matter to create the database:

    #!/bin/bash

    #

    cd /var/www/radio

    /usr/bin/rrdtool create radio_db.rrd \

    --step 60 \

    DS:radiostrength:GAUGE:120:0:5000 \

    RRA:AVERAGE:0.5:1:1440 \

    RRA:AVERAGE:0.5:10:1008 \

    RRA:AVERAGE:0.5:30:1440 \

    RRA:AVERAGE:0.5:180:1440 \

    RRA:AVERAGE:0.5:720:1440 \

    RRA:MAX:0.5:1:1440 \

    RRA:MAX:0.5:10:1008 \

    RRA:MAX:0.5:30:1440 \

    RRA:MAX:0.5:180:1440 \

    RRA:MAX:0.5:720:1440

    Then Update the database (via cron every 60 seconds):

    #!/bin/bash

    #

    ### set the paths

    rrdtool="/usr/bin/rrdtool"

    ### change to the script directory

    cd /var/www/radio/

    RETURN_DATA=`curl -s -N http://127.0.0.1/radio/data.php` // this is the URL to get the signal reading

    ### update the database

    $rrdtool update radio_db.rrd --template radiostrength N:$RETURN_DATA

    Then create the graph (again via cron):

    #!/bin/bash

    #

    ## change directory to the rrdtool script dir

    cd /var/www/radio/

    ## Graph for last 24 hours

    /usr/bin/rrdtool graph radio_graph.png \

    -w 1200 -h 600 -a PNG \

    --slope-mode \

    --start -86400 --end now \

    --font DEFAULT:7: \

    --title "Radio Strength" \

    --watermark "`date`" \

    --vertical-label "strength" \

    --lower-limit 0 \

    --x-grid MINUTE:10:HOUR:1:MINUTE:120:0:%R \

    --alt-y-grid --rigid \

    DEF:rstrength=radio_db.rrd:radiostrength:MAX \

    LINE1:rstrength#0000FF:"strength" \

    GPRINT:rstrength:LAST:"Cur\: %5.2lf" \

    GPRINT:rstrength:AVERAGE:"Avg\: %5.2lf" \

    GPRINT:rstrength:MAX:"Max\: %5.2lf" \

    GPRINT:rstrength:MIN:"Min\: %5.2lf\t\t\t" \

    Then you just need to display radio_graph.png for a graph of today's results. You can create other graphs that show week, month, year, etc.

  3. About the radio thing!

    How about NAGIOS (www.nagios.com) it can monitor the arduino board by sending pings and has a nice interface. It´s cheating but works!

    keep us posted

    • avatar
    • Jaap
    • Sun 29 Apr 2012 12:49 PM

    Hi Jake, how did you role with the projects, I am in particular interested in the Arduino project.

    Cheers

    Jaap

      • avatar
      • Jake Howlett
      • Mon 30 Apr 2012 03:31 AM

      Hi Jaap,

      The Arduino is still sitting on my desk, untouched. If/when I get round to working with it I'll try and report back my findings.

      Jake

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Fri 27 Jan 2012

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content