Received my Arduino Duemilanove from Toysdownunder today. It was ordered yesterday morning and shipped late yesterday afternoon. I got it just after lunch today.I am very impressed by Toysdownunder and their fast turnaround time.
I purchased the Arduino Inventors Kit due to the larger number of sensors and other pieces like servos and motors that are included. The other notable inclusion is a booklet of simple projects showing how to use the various sensors included in the kit.
After I got home tonight I installed the Arduino IDE and connected the Arduino to the USB port. After installing the USB Serial Port drivers the Arduino was immediately recognised by the PC.
Once the Arduino was connected to the PC I started the IDE and loaded the 'Blink' sketch. After compiling and loading it to the Arduino using the IDE. Almost immediately the small yellow led on the board starts flashing.
Over the next couple of days I will run through the various circuits in the booklet. As I have not had any experience with electronics previously it should be an interesting couple of weeks.
Thursday, June 3, 2010
Thursday, May 27, 2010
Moonrise over an Ayers Rock Sunset
Sunday, May 23, 2010
Google I/O 2010 - Keynotes
Google I/O 2010 finished two days ago. Lots of interesting news for HTML5 and Android. Here are the two Keynotes from Day 1 and Day 2.
Tuesday, May 18, 2010
Arduino Microcontroller Kits
Are you interested in embedded programming or microcontrollers? I have recently been looking into purchasing an Arduino Duemilanove to experiment with some physical computing. The Arduino is:
Little Bird Electronics
Arduino Inventors Kit
Arduino Starter Kit
Toysdownunder
Arduino Inventors Kit
Arduino Starter Kit
These kits include everything you need to start building with Arduino. They include the microcontroller board, sensors and wiring to connect it all together. The Inventors Kit also includes a printed book describing simple designs and the code to get you started.
My plan is to purchase one of these kits and do some building. Ultimately, I have some ideas for a large project that will use the Arduino along with some of the other sensors available.
an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.Using one of these kits from Little Bird Electronics or Toysdownunder it is possible to easily build systems that interact with their environment.
Little Bird Electronics
Arduino Inventors Kit
Arduino Starter Kit
Toysdownunder
Arduino Inventors Kit
Arduino Starter Kit
These kits include everything you need to start building with Arduino. They include the microcontroller board, sensors and wiring to connect it all together. The Inventors Kit also includes a printed book describing simple designs and the code to get you started.
My plan is to purchase one of these kits and do some building. Ultimately, I have some ideas for a large project that will use the Arduino along with some of the other sensors available.
Labels:
arduino,
physical computing
Thursday, May 13, 2010
Using DJ NativeSwing in Netbeans
In my previous post I linked to a library that allows the use of native components within Java applications as easily as using Swing components. At the time of this post I had managed to get the Web Browser sample to compile and run in Netbeans 6.8 but was having troubles getting the HTML Editor to compile in Netbeans.
Over the last couple of days I have managed to get the HTML Editor compiled and running in Netbeans 6.8.
This post will demonstrate how to configure Netbeans to use the DJ NativeSwing library to embed a HTML Editor into a Java Swing Application.
The first step is to download a copy of the libraries required for DJ NativeSwing to function.
DJ NativeSwing
SWT - requires the M6 development build to function correctly.
FCKEditor- requires FCKEditor not the CKEditor Download
FCKEditor Java Plugin
Once you have downloaded all the class libraries unzip them to a handy directory. I use c:\java_util\ and create a separate directory for each class library.
The FCKEditor ZIP does not require unzipping. The FCKEditor java plugin takes care of this.
Open Netbeans and create a new Java Application and add the downloaded libraries to the project. Once completed the libraries tab should look like the image below.
Now that the project has been created you need to create the two class files the project requires. Rather than have masses of code in the post, I have included these class files for you to download.
HTMLEditor.java- this is the class that includes the main class. Refer to image below for this class. This was copied directly from the sample HTMLEditor code in the JavaWebstart sample on the DJ NativeSwing site.
SimpleHTMLEditorExample.java- this is the HTMLEditor class that extends JPanel and builds the HTML Editor control.
This class was slightly changed as it returned a compiler error in the state it was in on the DJ NativeSwing site.
In the screenshot below you can see where the call to create the new JHTMLEditor is returning an error. To make this code work correctly requires a change to specify what HTMLEditor implementation is to be used.
Once these minor changes have been completed, it should be possible to compile and run the project and get a HTML Editor with WYSIWYG editing.
I have included a zipped file of the Netbeans Project for people to try out.
Enjoy.
Over the last couple of days I have managed to get the HTML Editor compiled and running in Netbeans 6.8.
This post will demonstrate how to configure Netbeans to use the DJ NativeSwing library to embed a HTML Editor into a Java Swing Application.
The first step is to download a copy of the libraries required for DJ NativeSwing to function.
DJ NativeSwing
SWT - requires the M6 development build to function correctly.
FCKEditor- requires FCKEditor not the CKEditor Download
FCKEditor Java Plugin
Once you have downloaded all the class libraries unzip them to a handy directory. I use c:\java_util\ and create a separate directory for each class library.
The FCKEditor ZIP does not require unzipping. The FCKEditor java plugin takes care of this.
Open Netbeans and create a new Java Application and add the downloaded libraries to the project. Once completed the libraries tab should look like the image below.
Now that the project has been created you need to create the two class files the project requires. Rather than have masses of code in the post, I have included these class files for you to download.
HTMLEditor.java- this is the class that includes the main class. Refer to image below for this class. This was copied directly from the sample HTMLEditor code in the JavaWebstart sample on the DJ NativeSwing site.
SimpleHTMLEditorExample.java- this is the HTMLEditor class that extends JPanel and builds the HTML Editor control.
This class was slightly changed as it returned a compiler error in the state it was in on the DJ NativeSwing site.
In the screenshot below you can see where the call to create the new JHTMLEditor is returning an error. To make this code work correctly requires a change to specify what HTMLEditor implementation is to be used.
JHTMLEditor htmlEditor = new JHTMLEditor(JHTMLEditor.HTMLEditorImplementation.FCKEditor);
Once these minor changes have been completed, it should be possible to compile and run the project and get a HTML Editor with WYSIWYG editing.
I have included a zipped file of the Netbeans Project for people to try out.
Enjoy.
Tuesday, May 11, 2010
DJ NativeSwing Class Library
Would you like to include an embedded browser, media player, flash player or html editor in your application. Then the DJ NativeSwing class libraries may be what you are looking for. This is a JAVA library built on SWT to allow the use of native components in Java applications as easily as using the Swing component library.
I have been experimenting with this library and have managed to get the Web Browser and HTML Editor samples to compile and run in Netbeans 6.8.
Over the next couple of weeks I will be preparing some posts about how to configure the projects to be able to work in Netbeans.
I have been experimenting with this library and have managed to get the Web Browser and HTML Editor samples to compile and run in Netbeans 6.8.
Over the next couple of weeks I will be preparing some posts about how to configure the projects to be able to work in Netbeans.
Thursday, April 8, 2010
Latitude/Longitude Converter Class Library
A few weeks ago I found an old photograph taken while we were doing a 4wd tour on the Mid North Coast of NSW. I wanted to scan and post this photo to the blog along with a Google Maps location.
The issue with this was I only had a rough idea where the photo was taken. During this 4wd tour we followed the directions in a printed book. This was 10 years ago and we did not have the use of a GPS to record our track. All I had to go on was the directions in the book. These directions made little sense trying to follow them on Google Maps as in many cases the tracks we followed are not named or marked in Google Maps.
However, the book did give GPS co-ordinates for key points on the tracks (major intersections or landmarks). I decided these could be used to provide a rough path followed and allow me to get my bearings while trying to follow the directions on Google Maps.
Once I tried to plot each of these points in Google Earth I realised it would be a slow process to import each of these points. An easier way would be to create a KML file of the points and load that into Google Earth. I had already written some code to produce a KML file of points from a CSV file so it was just a matter of loading the GPS co-ordinates into the CSV file and running the program.Unfortunately, KML files need GPS co-ordinates in Decimal Degrees and all my co-ordinates were in Degrees, Minutes and Seconds.
At this point I could have used any number of web based conversion pages to convert each co-ordinate manually. Instead, I decided to write a JAVA class library to convert co-ordinates between Degrees, Minutes and Seconds and Decimal Degrees.
The code was reasonably simple but as I had not been able to find an equivalent class on the net I decided that I would try to make it as versatile as possible with the aim to releasing it onto the web for anybody to use. It would also be a good learning exercise for me as I have created a Java class library previously.
After a weeks worth of coding I have now got the library to the point that I feel comfortable releasing a alpha version of the library to the net. There is a simple tutorial available and I am currently developing the Javadocs to go with the library.
Eventually, I will also post the source under an open source license to allow others to build or improve the library.
The issue with this was I only had a rough idea where the photo was taken. During this 4wd tour we followed the directions in a printed book. This was 10 years ago and we did not have the use of a GPS to record our track. All I had to go on was the directions in the book. These directions made little sense trying to follow them on Google Maps as in many cases the tracks we followed are not named or marked in Google Maps.
However, the book did give GPS co-ordinates for key points on the tracks (major intersections or landmarks). I decided these could be used to provide a rough path followed and allow me to get my bearings while trying to follow the directions on Google Maps.
Once I tried to plot each of these points in Google Earth I realised it would be a slow process to import each of these points. An easier way would be to create a KML file of the points and load that into Google Earth. I had already written some code to produce a KML file of points from a CSV file so it was just a matter of loading the GPS co-ordinates into the CSV file and running the program.Unfortunately, KML files need GPS co-ordinates in Decimal Degrees and all my co-ordinates were in Degrees, Minutes and Seconds.
At this point I could have used any number of web based conversion pages to convert each co-ordinate manually. Instead, I decided to write a JAVA class library to convert co-ordinates between Degrees, Minutes and Seconds and Decimal Degrees.
The code was reasonably simple but as I had not been able to find an equivalent class on the net I decided that I would try to make it as versatile as possible with the aim to releasing it onto the web for anybody to use. It would also be a good learning exercise for me as I have created a Java class library previously.
After a weeks worth of coding I have now got the library to the point that I feel comfortable releasing a alpha version of the library to the net. There is a simple tutorial available and I am currently developing the Javadocs to go with the library.
Eventually, I will also post the source under an open source license to allow others to build or improve the library.
Labels:
google earth,
gps,
java,
mapping,
open source,
software
Subscribe to:
Posts (Atom)


