I am ill today and needed to distract me some bit.
I added a LM35 temperature sensor to my Arduino. Since someone did the work already, I only needed to copy some code and setup the wiring on a breadboard. I used the same wiring like in the link. Below is an image of the wiring made with Fritzing. I am using a LM335 for this because there where no LM35 as a Fritzing part available...
I changed some parts of the code to only print the temperature as String to serial. In the original code the data was sent as (byte) over serial to read the value with an application created using Processing. Feel free to change this again... ;) This is the code I used:
int tempPin = 0;
temp = analogRead(tempPin);
temp = temp * 0.48828125;
My output in the serial monitor of the Arduino IDE looks like this:
I got this nice Tiny2313 header board on Friday from Alex. Thanks for that nice piece of work!
It seems that I bought the last ones because there are currently no more of them in his shop available... :( But I think you could get one in the near future again. If not take a look at his site. All code and schematics are freely available there.
Soldering was a lot of fun and very easy to do. After successful soldering I build the small circuit at the end of the howto and flashed the microcontroller using the Makefile provided by Alex. I needed to change some things to make it work right on my Linux box using avrdude and the Atmel AVRISP mkII.
I changed the PROGRAMMER line to:
PROGRAMMER = -P usb -c avrispmkII
If you even get errors, try to add the parameters "-F" and "-D" to $PROGRAMMER. Call "avrdude --help" to get a description of these parameters... ;)
Don't forget to add an external power supply to the header board since the AVRISP not seems to provide enough power. I got strange errors in the output of avrdude. After adding more power everything worked as expected.
The result: A blinking LED. Yeah! :)
Rafael found an application called Yenka in the web. This software is wonderful! You could use it for simulating many things. We are using it for designing and simulating electronic circuits but other stuff like mathematics and physics are available too. It is a very nice application for teaching and learning...
Below is an image of a simple transistor switch designed with Yenka.
You could simulate the circuit. When switching the button in the lower left corner. You could measure the Voltage and Ampere at every point of the circuit... ;) Now I don't need so much time to solder anymore... even it is a lot of fun soldering own devices.
You could download it for free and use it completely for free when using it at home! With all features!!! There is a version for Mac, Windows AND Linux available.
I got this great book yesterday: "Make: Electronics". It was exactly what I needed. It describes in a very hackish way how electronics works...
I got the german translation and read a lot in it within the first day. It has many examples of analog circuits for building funny and useful stuff by yourself. DIY!
Thank you very much for this book! I love it!