SensoDuino with a Parallax 30086 RN-42 Bluetooth Module and Arduino Uno

2013-11-23 18.33.48My colleague Ryan send me on a Tweet about SensoDuino, an app for Android Phones that allows you through the phone’s bluetooth to send sensor data from your phone; from gyroscope and accelerometer data to light, heat and humidity!; to your Arduino. As luck would have it I had borrowed a few items from work and had a Bluetooth module sitting right next to me on my coffee table. The problem being that the author recommends the cheaper RC05 bluetooth module and I had the rather expensive RN42 bluetooth module, adapted by Parallax into their 30086 module, which rather handily narrows down all of the various pins of the RN42 into seven outputs. There is very little information out there on connecting this module to the Arduino. So this post is to document process I went through to get the RN42 module to work with SensoDuino.

2013-11-24 14.19.01The wiring of the module is extremely easy to connect to the Arduino Pro as it has a jumper for 3.3v and 5v. The wiring is as so…

Arduino —> 30086 RN42

5v — > VIN
GND —> GND
0(RX) –> TX
1(TX) —> RX

That’s it, no need to knock the voltage down with combinations of resistors.

Uploading the sketch to the Arduino is standard, although as Hazam Bitar points out, you may need to disconnect the power from the bluetooth module as it will interfere with uploading a new sketch.

By default, the jumper settings on the Bluetooth module sets the baud rate to 9600, so you will need to change this in the sketch

Serial.begin(9600);

Or change the first jumper to off and it will run at 115200.

2013-11-24 14.24.38

So that’s it. It will be interesting to see if I will be able to make my own app that can use the sensors in my phone to control whatever I wish without going through the rather excellent SensoDuino, but for those learning and wanting to prototype devices without working with complex wiring and badly documented components, then this is a brilliant app.

Posted in Arduino, UDK | Tagged , , , , , , , , , | Leave a comment

Heightmap data. Web based and quick.

Yesterday I posted my Photoshop Script for creating heightmaps from OS data, but I wasn’t happy with the 30 minutes it took Photoshop to render the map.

Many moons ago I used to be a web developer and I loved messing around with the Image creation in PHP. I thought that generating images was a lot quicker, so this evening, I’ve ported my script to PHP and I can confirm it is quicker. About 29 minutes and 50 seconds quicker. In fact it takes longer to upload the OS data than it does render the image.

biddynew

So the new steps are this:

1. Get the OS data as before.
2. Go to My Heightmap generator
3. Choose between Relative (best for single heightmaps) or Absolute (Best for multiple if used with multiple terrain)
4. Right click and copy image.
5. Open a package of your choice and create a new file. Photoshop will take the settings of whatever is in the clipboard. Ensure it is greyscale.
6. Save as a RAW file.

That’s it.

Posted in Uncategorized | Leave a comment

Heightmap creation from OS data. (UK Only)

This tutorial will allow you to create heightmap data from Ordnance Survey’s OS Terrain 50 grid data. The information is free to download from https://www.ordnancesurvey.co.uk/opendatadownload/products.html

BenNevis

This process may well work for data from other sources, but as far as I know, this works for 10x10km areas of the UK only and produces a resolution of 50 metres.

Continue reading

Posted in Photoshop, UDK, Unity | Leave a comment

A preview of my Arduino/Unity experiment that I will talk about at LUUG 21.

Posted in Uncategorized | Leave a comment

Arduino to Unity. Reading in a photoresistor.

This is much the same as the Ultrasonic experiment from a while back. I’m not going to write this up, but I have made another video which explains everything.

Posted in Arduino, Unity | Leave a comment

Controlling an Arduino from Unity

Later this month I’ll be doing a talk for LUUG (London Unity Usergroup) on using Arduinos with Unity, so to prepare for that I’ve gone through the basic processes of talking to the Arduino from Unity.

For this tutorial, you’ll need…

Continue reading

Posted in Arduino, Unity | Leave a comment

Retroshooter. Source materials.

Howdy all,

A few weeks ago I revisited Retroshooter for my class as a part of a transfer from Unity to UDK. I don’t think that I sold UDK very well due to my ranting about creating a basic terrain, or the process of shutting down UDK to compile, then reopen and test…

Anyway, I’ve resurrected Retroshooter for UDK Feb 2013 beta and included a model I created, rigged and brought into UDK to take the place of the Zombies. Unfortunately the poor chaps seem to lose their arms, probably because I disarmed them, making them… (h)armless.

I thank you… Please comment on youTube if you wish, I can’t work out how to turn on comments here without getting hammered by spam. The original video is at Retroshooter on youTube

Retroshooter files This contains…
Continue reading

Posted in Uncategorized | Leave a comment

Ultrasonic sensor, Arduino and Unity

Today I did a quick test to see how well I could get an Arduino to talk to Unity. The video is the result of the experiment.

aurduinoTest - Zip File of my Unity Project

The Ultrasonic code has largely been taken from http://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/ and the Unity example was largely taken from http://arduino.cc/forum/index.php?action=printpage;topic=73425.0 I just stuck the two together.

My altered code for the Arduino is below.

Continue reading

Posted in Arduino, Unity | Leave a comment

Vic 20


The newest addition to my collection will be my first entry into this new section of my blog, which I will be coming back to as I have chance to test and catalogue each entry. I picked up this Vic 20 from a very nice man called Andrew who owned it since he bought it brand new so it’s been in a good home.

Continue reading

Posted in Gaming Collection / Hardware, My Gaming Collection | Leave a comment

Unity 4. Toon Terrain Shading.

I was asked by one of my students about applying Toon shading onto the Terrain. I didn’t have an example then, but since I’ve had a little time to look into Unity 4 when I discovered the opportunity to apply a normal map to the terrain. This is done through creating a new shader and setting it to Nature/Terrain/Bumped Specular.

This needs for be applied through selecting the terrain and going into it’s settings which is the 7th option, it looks like a cog. Drag and drop that and the Normal maps will work.

Then it occurred to me, “Can I apply the Toon Shader?”

Yes, yes I can.

Toon Terrain Example

 

 

First update in 18 months…

Posted in Uncategorized | Leave a comment