Monday, 24 December 2012

Keypad code available on BitBucket

You can now download the code for the Keypad/LCD code from BitBucket

This is my first attempt using BitBucket so please let me know if there are any problems

Saturday, 25 August 2012

New courses

We will be offering a range of classes in the next few weeks depending on demand....

- our basic class

More Fun with Arduinos 
- introduces interrupts, timers, servos, seven segment LED as a programming example.....

Communicating with the Arduino
- shows how to interface LCD and Keypad to the Arduino

And we intend to have our first class showing the Arduino with Ethernet shield 
(i.e. Ethernet and SD card)

Check CURICA for details.
GeekCampSG 2012 has come and gone. Not fantastic timing - on the last day of Ramadan - leaving me to prepare notes in the middle of the night - while travelling etc. But for some reason, people seemed to like the talk entitled Hardware is not Boring where I used an Arduino to control the speed of toy racing cars in response to commands sent from mobile phones.

You can find the slides on SpeakerDeck

The video is missing - as is one other slide which did not get included for some reason.... but the essence is there.

The demo did not go as smoothly as hoped - they never do. I should not have used the Scalextric Micro - the cars have magnets that make them hard to move.
When I tried it on the full sized Scalextric later it went like a dream. It also managed to power little Ali's Thomas the Tank Engine as well.

For once I finished in record time - so I finished up showing something I had hacked together half an hour before - using an Arduino Leonardo and a 3D Accelerometer to work as a mouse.

We are looking at having Arduino classes again soon at Hackerspace SG. Please check  either at Hackerspace,  on Curica or back here for details

Sunday, 22 July 2012

Anybody who has succeeded in using MKNetworkKit?

I am having a bit of trouble following this. I am using XCode 4.2 on Snow Leopard

I am trying to evaluate using MKNetworkKit to replace some hairy network code I wrote a year or so ago....

So I am testing out the Upload Photo project at FiestyGoat

I used GitHub to download MKNetworkKit to my documents folder.

I built MKNetworkKit-IOS

I started by creating a new workspace (Uploader) and then a new project (Upload) as a single view application using storyboards. The project is in Desktop/Xcode Projects/Upload.

I then dragged the MKNetworkKit subfolder (i.e. the one that contains Reachability & Categories) to the project
copying the files across

I then dropped into Finder and removed the two unwanted files (NSAlert+.....h/m) and cleaned the project.

Then I modified Upload-Prefix.pch

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    #import "MKNetworkKit.h"

Then I tried to build it and I get an error "'MKNetworkKit.h' file not found"

Now I am pretty sure that I am missing something pretty simple but cannot figure out what. I am pretty sure that if I was supposed to change project settings somebody would have mentioned it.....

Any idea what my stupid error is?

Wednesday, 18 July 2012

Using an LED as a light sensor

We are working on Power Control Systems now. So we were sitting in the library and we started talking about solar panels and how they worked.

It was around this point that I remembered Jolyon's habit of using things backwards - like using a loud speaker as a microphone and using a 12v transformer to create 240V from a chopped 12V supply...

And I remembered reading about using an LED back to front to act as a light sensor. So I rigged up this  little circuit as a quick demo right there in the library....
LED as a sensor

A few lines of code and it was up and running........

Pretty simple eh?

I just used my iPhone as a light source using Torchlight - one of the many free apps that use the phone's LED... and the results were pretty astounding.....

This must be one of the most simple Arduino circuits and it works because when light hits the PN junction of the LED it generates a SMALL voltage that you can read on the analog input pin.

Because the voltage is so small, we need to add upp a large number of cycles to ensure that our reading is not from random noise.

Wednesday, 11 July 2012

Ethernet, LCD's, Keyboards and more

We've been kinda busy.....

Alvin at Hackerspace arranged with SGBotic to promote the courses on their website and the response was kind of fantastic.... and agreeing to it blew my idea of starting an Arduino store right out of the water but to be honest it is quite a relief.

We will still be putting some Arduino stuff together (special kits maybe) - and I am seriously thinking of doing something to jump start the Malaysian Arduino scene but I will not bite the hand that feeds me especially when they are getting me some robot toys to play with....

Since the last post we have had a couple more intro courses which were really well attended and the long awaited "Communicating with the Arduino".

In "Communicating with the Arduino", the second of our intermediate classes, we left our students to make some of the decisions - e.g. pin assignments. As expected, some guys, made the same mistakes that I did (and others) which was an excellent opportunity to teach more debugging techniques as well as some underlying principles.

And then - really cool - I was asked to give a talk to IOS Dev Scout about using the Arduino with the iPhone. This meant it was time to start preparing our new intermediate class which I had been thinking about for sometime about "Arduinos on the net"

I presented an Arduino acting as an HTTP server, a TELNET server and a custom protocol server. In the last case I made the Arduino emulate a Cytech Comfort Home Automation System  and control it with the IOS App that I wrote for Cytech last year.

Finally we logged into the Cytech demonstration system (a Dolls House in their office in UBI with loads of lights) and arbitrarily turned lights on and off while watching it on a live webcam feed.

So keep tuned - we will try to present this course on a Saturday afternoon in the next month.

Sunday, 1 April 2012

I couldn't help it…..

The processing class was great.

It all started with a piece of paper….

We had three people signed up - one couldn't make it - but in a way that made it even more fun.

Hackerspace SG processing class
left -> right : Zul (far left), Kit Sunde and Bjorn Andersson

Kit & Bjorn were great - they got all the demos working and we got through all the material in record time which gave us time to go into "workshop mode"….

We took the last tutorial and started turning it into a game……

Then over the weekend I was stuck with a really lousy internet connection so I started adding music and a final image to it. You can see the results on the ioblocks site

It may never win the world gaming awards but it was fun…. 

Thanks to Kit and Bjorn - and for Zul for both being a better lecturer than me and for turning my crazy ideas into a decent lesson plan and notes :-)


Dazzle your friends with Processing!

A couple of years ago I came across Processing in a Ken Olsen's blog where he was using an Arduino to control a model railway layout which implemented a shunting puzzle. He used Processing to create a simulation of it.

Later when we built a 3D visual inspection system I decided to use Processing to visualise the data we were getting back from the system. It was never very pretty (i didn't spend enough time on it) but it served its purpose...

3D Visualisation of semiconductor leadframe

But the main thing was that Processing was pretty easy to use. The next time I used it was when I was mentoring some students who built a data logger for a 3D accelerometer - I helped them playback the position and orientation of the sensor.

Each time, the code required was really minimal compared to traditional programming languages.

To sum up processing - you can start getting results in two or three lines of code - and you don't need to be a programmer to write them.

Come along and start dazzling your friends!

30th March
HackerSpace SG
70A Bussorah St @ 7.00 p.m.

Thursday, 15 March 2012

Control things with the Arduino! (repeat)

The guys at Hackerspace were so happy with our last two sessions that we have been invited back!

We are holding another introductory class on Friday 23rd. We have also been asked to do an advanced class on a weekend.....

Come along on the 23rd to discover how you, at very little cost, can build some really cool stuff.

We introduce a bit of programming and some simple electronics and at the end of the session you will have it singing and dancing. Well - not really dancing but flashing lights, playing tunes and reacting to its environment.....

Last time we conducted the course, quite a few guys were already starting their own projects and one guy had almost finished his before we finished....

See you there!

70A Bussorah Street
7 p.m. to 10 p.m.
(longer if we have enough fun)

Sunday, 26 February 2012

More Fun with the Arduino

We have been planning a second class in our "Control Things with the Arduino" series since the positive feedback made a repeat session of the basic class necessary.

We knew what we would cover - Keypads and LCD's - but the ones we found locally were so expensive that we started sourcing them ourselves... and got stuck with horrible lead times... and we are still waiting for the stuff to be in. You can see a video of one of the demos that we made on Youtube

So finally we decided to do a different session first. We thought for a bit and worked out some useful things to cover - a mix of hardware and software which we hope will come in handy.

This session we will cover

1. Use of Serial port for
       Input (interaction)
2. Interrupts
3. Timers
4. Seven Segment LED
5. Servo Motors

This time we will be building things up as we go along so combine what we learn into a small project.

Class date - 1st March 2012 at 7.00 p.m.
70B Bussorah Street

Cost: S$ 45 per head, a portion of which goes to HackerspaceSG