Arduino + Processing: Make a Radar Screen to Visualise Sensor Data from SRF-05 – Part 2: Visualising the Data

November 15, 2009 at 11:16 pm (Arduino, Processing, Programming) (, , , , , , , , )

This is where all the work is done to read an interpret the values from the servo and the sensor. If the readings are to erratic then you won’t have nice shapes. Also if you don’t allow enough time to the signals to be sent back then you’ll get false distance readings. So this code is only as good as your Arduino code and sensor setup.

Took me a few evenings to work this out to get it how I wanted, the hardest bit is the trigonometry involved which isn’t that difficult, everything else is done by loops and a few IF statements. I use the FOR loops alot because the all the elements can be displayed programmatically without having to write each rectangle, cirle and line to the screen with their own statement.

Arduino + Processing: Make a Radar Screen to Visualise Sensor Data from SRF-05 – Part 2: Visualising the Data

Permalink Leave a Comment

Arduino + Processing: Make a Radar Screen to Visualise Sensor Data from SRF-05 – Part 1: Setting up the Circuit and Outputting Values

November 15, 2009 at 11:15 pm (Arduino, Processing, Programming) (, , , , , , , , )

First things first, we need to build our circuit. This is the easy bit! We’ll be using the Arduino to control a servo that will rotate our sensor around 180 degrees. The Arduino will then send the value from the sensor along with the current angle of the servo to the serial port.

Before proceeding please take a moment to check out some of my other work with the SRF-05 and servos if you’re unfamiliar with either.
Stuff with SRF-05
Stuff with Servos

I’m building this with the SRF-05 ultrasound range finder, but because this has a fairly wide field of detection it’s not very precise – I think I’ll end up trying a different range finder maybe an IR one as the SRF-05 works best as a static sensor/ detector, anyway…

Arduino + Processing: Make a Radar Screen to Visualise Sensor Data from SRF-05 – Part 1: Setting up the Circuit and Outputting Values

Permalink Leave a Comment

Arduino: Basic Theremin meets Processing!

November 8, 2009 at 1:10 am (Arduino, Processing, Programming) (, , , , , , , , )

My last theremin involved a small speaker. Now I’ve replaced the speaker with my PC, using processing to pick up the values from the SRF05 ultrasound sonar thingy and play different notes accordingly – which gives multiple possibilities and far better sounds.

So to start with check out my previous theremin, the circuit is the same except for removing the speaker and the Arduino code now prints values to the serial port instead of outputing directly to a speaker. The only thing that I’m doing here that is really new is using the minim libary for processing, built by this chap (thankyou). What this allows us is to assign a sound file to a variable in processing and then gives us functions to start/stop the sound.

Arduino: Basic Theremin meets Processing!

Permalink Leave a Comment

Arduino: A Basic Theremin

November 8, 2009 at 1:09 am (Arduino, Programming) (, , , , , , , , , )

Theremins are cool. Fact. You may also have heard of them as either aetherphone/ etherophone or termenvox/ thereminvox. Essentially its an electronic music instrument that plays a certain note depending on the position of your hand and its distance from an antenna.

Building a very basic one with Arduino is easy – easier than my basic drum machine. Very easy. Basically we can replicate one by building a circuit of a speaker and a distance sensor, such as my favourite the SRF05 ultrasound thingy. We calculate the distance and the nearer you get the difference in note/frequency emitted from the speaker.

You’re going to need only a few parts and not much code. You can read more about my applications of the SRF05 along with sample code here. If you can’t be arsed with reading any of that then no worries all is revealed below…

Arduino: A Basic Theremin

 

Permalink Leave a Comment

Setting SSL with Apache 2.x on Windows

November 8, 2009 at 1:08 am (Programming) (, , , , )

Pretty similar to setting up SSL on unix/linux and actually not that hard to do. Just a few things to remember as a checklist.

If your Apache install didn’t include openSSL then you’ll need to download a few things:

Normally you can find mod_ssl.so in your apache install directory in modules.
In conf/extras you’ll find httpd_ssl.conf

Or just download Apache with openSSL here. Next step is to create a certificate. Only thing to look at really is your server name in your httpd.conf file (found in the conf/ directory). You use your server name in your certificate setup – these must match otherwise you’ll get errors (it’ll still work though).

Setting SSL with Apache 2.x on Windows

Permalink Leave a Comment

How to calculate data transfer speeds.

November 8, 2009 at 1:06 am (Programming) (, , , , )

When calculating data transfer rates we have to understand a few things. Firstly for this example we are ignoring network latency and additional packet data that gets sent along with the file. Next we need to understand the units of measurement and it’s here that some people have trouble and a lot of sites out there publish incorrect methods.

Namely the ‘answers’ sites where people ask this very question and either get responses incorrect working/ logic or told to find an online calculator neither of which are of any help to anyone. There is probably a really nice and simple equation for doing this without the below calculations but I will write my method down here. To begin with let us take our example file of say a 2 Gb file size and a transfer speed of 50 Mbps

How to calculate data transfer speeds.

Permalink Leave a Comment

Arduino: Basic Persistance of Vision

November 8, 2009 at 1:05 am (Arduino, Programming) (, , , , )

I think this’ll be the start of a few more projects for me. I’ve seen some cool PoV stuff (Persistance of Vision) with mounting displays on bikes, so hopefully I’ll get round to doing something like that.

Anyway as a start I’ve got 5 LED’s connected to 5 pins on the Arduino, nothing complex there. The real struggle is to work out the timings, or rather the pauses between the patterns. Starting with how to make a character or drawing.

Arduino: Basic Persistance of Vision

Permalink Leave a Comment

Google Maps API part 2: Retrieving Postcodes from your database

November 8, 2009 at 1:04 am (Javascript, PHP, Programming) (, , , , )

OK, this is a simple way to get your postcode/ address location returned and displayed via the Google Maps API on your own website. I’ll cover the ‘nearest store locator’ scenario in another post where you want places with a certain radius of an inputted postcode/ town returned.

First of all we need to retrieve our results which should already be stored with a geocoded result using the previous tutorial here. remember that in order for this to work you need an API key from google – again check the previous tutorial for more info on this.

Google Maps API part 2: Retrieving Postcodes from your database

Permalink Leave a Comment

Arduino: Getting my LCD Screen to work.

November 8, 2009 at 1:03 am (Arduino, Programming) (, , , , )

I’ve gotten hold of what I assumed was a compatible LCD screen with my Arduino board – it’s a Powertip PC1602F and uses a compatible driver for the Hitachi HD44780 display chip. This is essentially what the Arduino LCD libraries are built around, so when I failed to get a display this is the first thing that I checked out. I also downloaded and installed Arduino 0017 which has a better and more up to date library for LCD stuff but you can update version 0015 with this library I think.

Arduino: Getting my LCD Screen to work.

Permalink Leave a Comment

Sacre Coeur Basilica, Paris

November 8, 2009 at 1:02 am (Travel) (, , , , , )

Date of visit: 15th August 2009
Where: Sacre Coeur Basilica, Paris

Be prepared for the hundreds of steps. If you are very unfit and its the middle of summer you may struggle to see everything or it may take you a while but it is well worth it and I would say a must see if you’re in Paris.

Sacre Coeur sits at the top of a hill in the northern side of zone 1 in the Montmarte area of Paris and I think offers some of the best views of Paris and I think it holds more interest than most of the other attractions. I’m not a religious person in the slightest, so I only speak from the point of view of its setting, architecture and contents. Its location is much more interesting than say around Notre Dame, du Louvre or the Eiffel Tower. There are many winding streets and small shops to find so you can easily escape the tourist masses.

Sacre Coeur Basilica, Paris

Permalink Leave a Comment

Next page »