Thursday, 24 January 2008
To be continued....
Unfortunately, I have not been able to create a successful connection between the Arduino and the web server, due to unexpected problems and a limited knowledge of Programing. however, I have tried my best to create a smart little gadget and I've had fun in the process. For now, I have only managed to make my Arduino project into a kind of USB disco! Although I feel I have learnt a lot in theory, and in practice and will definitely be pursuing SITELITE further to finally get that connection working. Here are some videos of how it looks so far.... enjoy the light show!
Not much Luck!
Unfortunately, I'm not having much luck getting the Arduino to connect to a server properly. I have been looking further into how the scripting language 'Python' works, and it's a bit more complex than what I was expecting. Further research into other projects and codes that have similarly connected the Arduino to a server has shown me that using Python is not the only way in which to connect the device. Some have connected directly to their server through USB. However to do this, you must have a local server in place with an available port, which would then need to be activated. The server that I currently use is based in Gloucester, ! so that kinda creates a problem!
Tuesday, 22 January 2008
Python - Scripting Language
After researching a number of sites, I have found that in order to complete my project, being an LED blinker that is triggered by website activity, would have to be connected through another programming language like Python.. Running python would then read data from the website every 10 or so seconds, and then send that data to the Arduino through it's serial port. I have downloaded the Python software and had a quick look at it, and found some examples of code that I can try out. Hopefully I can get this to work.. it clear that the process is more complex than I originally thought!
On to the tricky stuff...
Now that I have determined a stable connection with my controller, it's time to look at how I can use the Arduino set-up I have to interact with the internet through a web-server or other. Recently I have been looking at other people's projects, and how they have incorporated the Arduino into a web / physical project...
Here's one example - Tinkerlog
Tinker log, is a project that takes a 'hitcount' from the blog itself, and then every ten seconds connects with the server-side coding, Python, and establishes wether or not there has been any action (more hits). If there has, the Python code then tells the Arduino to carry out an action, if not the cycle is looped until the next ten second interval. Pretty smart!
This project uses three stages of Software programming, including PHP, Python and the Arduino language, so it immediately appealed to me. I knew that I if I was going to use my Arduino circuit to connect to the Internet, then PHP was a major factor and I needed to research how other people have gone about completing their set-ups. I read into the code that this creator had used, It states in his blog, that he has used PHP, Python Syntax, which I have never heard of, but seems to be an open source scripting language similar to Applescript, however a lot more efficient. I have downloaded the Python environment to try and get to grips with it, maybe this is something that I will need to use to bridge the gap between the Internet and my arduino. Whatever the outcome, it has certainly given me hope that creating a connection to my Arduino based upon online variables is fairly easily feasible....
One small step for Mankind, One GIANT LEAP for me..!
This was the circuuit set up and talking to the Arduino environment for the first time... I made it blink at intervals of '1000', being 1 second.
Installing the Arduino Environment....
Today I have taken the gadget back to pieces and am going to try and talk to the Arduino through it's environment... Initially, I have found many problems... Without the necessary help, the whole programming of micro-controllers is new to me...!
When I tried installing the software initially, I had some problems getting the drivers to work.. After a while fiddling with that I managed to create a successful connection with the arduino.. I had defined the serial port, and opened the initial example, "Blinking LED" to see if I could get the basic's from the equipment. I tried time after time to upload the example code to the Arduino, but I had no response, except for error messages, that meant nothing to me!!
By this point I was fiddling with it for at least 3 hour's and still could not figure out why it was not working, Maybe the bootloader was not installed? I tried all kinds of things... Anyway, It turns out in the end, after endless searching and reading on the Arduino.cc site that I had not defined the micro-controller itself. I was trying to upload to a model 'Atmega168' micro-controller, When in fact my Arduino NG uses the 'Atmega8'... A Simple error, that has cost me valuable time. However, When That LED finally started blinking, and I was able to determine factors such as the length of time between flash's etc, I was so excited..! Amazing how something so small can encourage you to see the positives of such task's!
PURE POWER...
So now that the basic set-up of my Arduino board and circuit is up and running.. It's purely powering from the USB port of my computer and as a result the LED is constantly lit.... no blinking or any other activity... I believe this is because I am using the 5V port on the Arduino, and so far have not attempted to Program the micro-controller itself.. However, For me to have got this far, I am extremely happy. There seem's to be light around the corner after all..!
So the next step is to get my head around the programing stuff! Which is again something I have very little experience in!.. I guess now is the time to learn, and fast..
Monday, 21 January 2008
It's ALL coming together!



Now that I have ALL of my components including the product housing, It's time to see if it all fit's... Which to my surprise, is 'mm' perfect..! The pod neatly contains the Arduino board, allowing room for the Bread board, (which would obviously be a smaller printed microchip when put in production), and allows just about enough space to play around with the diffusion of light! Also with my slight adaption, the USB cable fit's nicely through the hole and ALL of this can be easily accessed throughout my production stages....! Just pull the top off!
some adaptions!

As you can see, This soap box, or as I will now call, my pod..! has a small problem, it's 100% enclosed, and so I needed to make a small hole, big enough to allow the USB cable to pass, but small enough so as not to ruin the aesthetics.. I managed to snap some of the plastic out with some plyer's and the rest carved out with a knife... I do not recommend this however it worked for me, and the final result is pretty surprisingly smooth!
The POD....



I went out to look around some shop's to see if I could find something similar to that which I required... I thought about toys, or existing gadgets, but their casing was fixed and would need to be broken in order to easily access.... I was going to need something that was easy to keep taking apart and re-assembling again... So I thought about a Soap Box =].... I went to super drug and hey presto, there was the perfect case that I visualised... and at only £1.35, bargain!!! here's what it looks like...
SITELITE Cosmetics...
Although the development of the product is still in progress, I am beginning to think about the cosmetic side of the project, and how the product could be housed. Initially I was thinking that this would be a major issue, and would never find anything suitable to house the circuit. All I knew is that I wanted something small, preferably frosted white so as to diffuse the glow of the LED's inside and create an evenly dispersed light. I wanted to try and re-create the modern POD look that seems to be appearing in the form of gadgets more and more.... People like simple design that look clean and tidy on their desk... Obviously I will not be able to create and mould the casing which would be the only sensible option should this gadget get to commercial development stage, however I am aiming to create a prototype of the product, so I feel there should be something out there that I can incorporate into my project's aesthetic look. THE HUNT BEGINS...!
Is the Arduino Alive?
Now that I have the required components to build my prototype, I have been playing around with lighting different LED's using different Resistor's and powering the Arduino through the USB port of my Mac.. So far, so good... I have managed to create a successful circuit that lights the LED. I have tried testing it out with more and more LED's, however it seem the inevitable has occurred...! The LED's seem to dim the more I ad, which I guess is due to the power source being the computer and only limited to 5V. This may only be enough to power one LED... Which is not exactly what I had planned! I will try some other options, maybe Less powerful LED's so as to include more than one, either way, I do not want to include an external power device for the gadget as this would mean having to compromise the final size of the device. As I am not running physical sensors in my circuit, it makes so much more sense to try and get the most out of the USB port's power.
FINAL VERDICT; Yes.. the power LED comes on when the Arduino is connected, and the LED on my bread board is lighting up...
Getting the Parts!

I went to my local Maplin store today to try and find some of the parts that I will need for my project. I was a little confused as to which resistors I would need and which LED's would be suitable, again due to my inexperience of building electronics.. However, I managed to buy some LED's that came with some resistors of different types.. So I thought I'd be able to experiment with different components.. I also brought some Jumper wires, a small solderless bread-board.
More intial Schematics....
Some intial Schematics...
THE PLAN....
Right, so the plan for the next stage of SITELITE is going to be planning what components I am going to need to build the gadget, and the feasibility of actually making this work. If the project is to be by the use of the internet, then no physical sensor's will be required, like movement or light sensors.. This may help me when it comes to the complexity of building the circuit as I have no practical experience of working with physical computing.. In theory all I would need would be a few LED's, bright ones that are compatible with a particular voltage due to the device being powered from the computer itself, and as it will need to be connected in order to operate, this would be the most practical means. In future however, the device could be adapted to use Bluetooth connectivity in which case the device itself would need an alternate power source. Perhaps a simple AA battery could be installed and power the device for a number of hours standalone. The only problem I would see here is that the Bluetooth connection would draw a lot of power and quickly....
Back to the point... I would require resistor's, in order to control the flow of current to the LED's, some Jump cables and my solderless Bread-board, I have managed to buy a small one from the local Maplin store, it has enough space to work with and should fit inside a small product case for prototyping, and also the Arduino itself including the USB cable to connect it to a computer.
SITELITE.
SITELITE is a new project idea that I recently created. It involves the interaction of a website, and the Arduino. The basic use of the device will be a light gadget that someone can then plug into their PC or Mac and carry on with whatever they were doing. Then when their desired website, usually your own personal site, (Or could even be developed later so that the device is compatible for Facebook) is visited, the gadget will glow brightly giving the user a warmm feeling of knowing their site is being used at that moment...
The gadget will be in realtime, and will work by using the Arduino board to 'talk' to the computer which will recognise that the the action of somebody visiting the site through the use of PHP, that will include a small snippet of code installed into the header of the desired website, from what I have found so far....
A new 'Similar' Direction..!
So, after all the hype of the old project, it seems I have hugely underestimated the complexity of such a task... I have been thinking hard about the direction in which I intend to head next and as a result have come up with some similar projects idea's, but on a smaller scale. so hopefully are fully feasible.. I wanted very much to stick with the colour theme, and how colour effects us as humans in ways that go unnoticed....
Subscribe to:
Posts (Atom)