DHT11 Library for Arduino 1.0

2

Category : Arduino, Electronics

DHT11 is a cheap and easy to use temperature and humidity sensor. But since it’s digital and only uses one pin there is a great library for it!

Of course it has some problems compiling on Arduino 1.0 and the one I found on the arduino.cc playground had problems. So I modified it, and put both the library and the example in a nice and easy to unzip package. The example sends data on serial back to the pc, so it looks like this when posting results:

Credit goes to the arduino playground for the library and example code.

Download Arduino DHT11 Sensor Library

Tutorial: C# Communicating with Arduino over Serial

11

Category : Arduino, Electronics, Windows

In this tutorial I’ll try to show you how to easily tell an arduino what to do from a C# program using serial communication. The only thing the C# program does is send a byte to the arduino, and the arduino program will then set pin 13 to HIGH or LOW.

Lets start with the C# sourcecode, it’s written in C# Express 2010 which you can download for free here. Get the C# project files:

Download CSharpEasySerialSource.zip

I tried to comment the code so that it should explain most of the stuff going on. But it’s pretty basic, you select the current comport then hit Connect. If you selected the correct port that the arduino is using it should now be connected. The textbox only takes numbers, writing text there will only result in it being converted to bytes.

When you click Send it will try to send the contents of the textbox to the arduino. In my example code I used “0” and “1” for turning off an on the LED. Lets look at the Ardunio example:

What the program does it’s listening on the serial port. And when it receives a “1” pin 13 goes HIGH, and if it receives “0” it goes LOW. Pin 13 is in most cases a LED thats on the arduino board, so you only need a bare arduino to test it. And if you don’t know any C# and just want to use the program to control a arduino I’ve created a zip file containing only the .exe file for the program:

Download CSharpEasySerial.zip

Arduino, LEDs that blinks to the Music!

3

Category : Arduino, Electronics

I always wanted to make something out of the microphone sensor I got, it’s just been laying in a compartment-box until recently when I got the idea of a music beat blinker.

Basically it just reads the analog value from the mic and converts it to a 0-1023 value, but since the microphone sensor I got is meant for 12 volts, it only ranges from 0 – 5-600 on 5 volts. But it works just as good, only it’s not as sensitive as it should be. When playing music that is never a problem hehe.

The microphone sensor I use is one I found on eBay some time ago, just search for “Arduino Sound Sensor Module” they cost around 5$. And are very easy to use, only ground it and feed it with 5 volts and stick the output to a analog input on the Arduino. I’ll also post the program code for the Arduino, it’s the same thats used in the video below. If you want to make something like this yourself using my example, you only need 5 LEDs or more. And just wire them to the digital pins 2-5, and of course the mic to analog 0. Code example can be found in the bottom of this article.

Here is a video showing the LEDs blinking to the music.

Program code example:

 

Cheap arduino nano from DX!

Category : Arduino, Electronics

Looking for yet another cheap & tiny arduino?

For only 16.90$ you get a Arduino Nano V3 clone from dealextreme!
Ever since modified electronics stopped making the pico I’ve been looking for another arduino in the same price range and size, and now dx got just the right one.

– Digital I/O Pins: 12 (D2~D13)
– Analog Input Pins: 8 (A0~A7)
– TTL serial data receive and transmit pins: RX/TX
– PWM Output Pins: 6 (D3/D5/D6/D9/D10/D11)
– Microcontroller: Atmel Atmega328P-AU
– Small mini-B USB for programming and serial monitor (cable included)
– Supports external 5V~12V DC power supply or 9V battery
– ICSP header for direct program download
– Cable length: 108cm

 

Ultrasonic HC-SR04 Sensor

Category : Arduino, Electronics

I’ve stumbled by this neat little sonar sensor on eBay a few days ago, I’ve had some bad experiences with other similiar ultrasonic sensors so I was kind of skeptic to this one. But for the low price I couldn’t resist. Anyhow, it turned out to be a great sensor. It’s accurate down to 1 cm, which is perfect and in most cases more than enough. You get it for around 5$ on eBay.

 

Only problem I ran into when using it with arduino was the library, got some nasty compiling errors. So I changed a few lines in the library and made it work with Arduino 1.0 and older arduino IDEs.

Download HC-SR04 Library for Arduino 1.0

Also wrote a little example for using it with a serial display:

 

How to make a security alarm using LDR and Laser!

1

Category : Arduino, Electronics

How about a easy and simple tutorial on how to make a sort of security sensor using laser and a light dependent resistor?

It’s just as simple as this, the LDR reacts when it gets less light than the laser-dot in the center of it. Which is when something comes in the lasers way. So then you know when something passes the invisible line between the laser and the LDR.

Lets begin with what components you need:

1x Laser Emitter/Pen
1x LDR
1x Resistor 10k (doesn’t have to be 10k ohms)
1x Piezo Buzzer (you can use a LED or anything else you want)

And of course a Arduino board of your choice, and some wires.

Lets wire it all up like this:

Things to notice, buzzer is grounded and the + wire is on the digital 10. Laser is just ground and +5v to make it light constantly. The LDR is in a voltage divider with a resistor, we take out the readings in the middle where the yellow wire is, and it’s attached to the analog 0.

A picture of the LDR.¨

When all this is wired up, just put this code and run it.

[youtube=http://www.youtube.com/watch?v=IzEDspdWjxU;ap=%2526fmt%3D18&w=425&h=344]

Pico Protoshield Kit!

Category : Arduino, Electronics, Uncategorized

I was just checking out if there was anything new on Modified Electronics, those who makes these genius small pico arduinos.

And yes! A very nice shield for use with the pico, Pico Protoshield Kit!
Of course the small breadboard and the pico arduino is sold separately!

NetDuino a rather interesting board

Category : Electronics

I just came over this Arduino clone if I may say, it’s called NetDuino It looks almost the same as the Duemilanove board. Anyhow, you program it in Visual Studio C# Express using the .NET Micro Framework.

Netduino is an open source electronics platform using the .NET Micro Framework.
Featuring a 32-bit microcontroller and a rich development environment.
Suitable for engineers and hobbyists alike.

Netduino is an open source electronics platform using the .NET Micro Framework.
Featuring a 32-bit microcontroller and a rich development environment.
Suitable for engineers and hobbyists alike.

Specifications are:

Atmel 32-bit microcontroller
Speed: 48MHz, ARM7
Code Storage: 128 KB
RAM: 60 KB

all 20 digital and analog pins: GPIO
digital pins 0-1: UART 1 RX, TX
digital pins 2-3: UART 2 RX, TX
digital pins 5-6: PWM, PWM
digital pins 7-8: UART 2 RTS, CTS
digital pins 9-10: PWM, PWM
digital pins 11-13: SPI MOSI, MISO, SPCK
analog pins 4-5: I2C SDA, SCL

And for only 34,95 USD it’s very interesting 🙂

New stuff arrvied! :D

2

Category : Arduino, Electronics

Yupp, just a short little update.

I got the RF sender & receiver from Sparkfun today!

RF Link 2400bps Receiver – 315MHz
RF Link Transmitter – 315MHz

Also a 20×4 serial LCD, gonna be useful for advanced applications. Anyhow, if you got the RF kit, and was like me wondering how to get it working. I found this nice guide at LMR.

Now it’s just to find a nice way to use the RF links, it’s only one-way communication, but it’s gonna be awesome to use it as a remote for one of my robots!

My Arduino Robots

Category : Arduino, Electronics

Thought I write some about my two robot projects! They both use a Modified Pico, since it’s the smallest Arduino I’ve found. And it also fits on a small breadboard!

Botty 2:

This is the most advanced robot I’ve built, but it’s not nearly finished.

It’s current task is to drive straight forward until it senses a object with it’s IR-sensor, then drive away from it until it’s cleared, and continue in that direction. Really simple 😛

It uses a Sharp-IR sensor, mounted ontop of a servo, so it scans the horizon while driving forward. The sonar in the picture isn’t in use, since I actually like the IR sensor better.

[youtube=http://www.youtube.com/watch?v=pscYXg-Rkp0;ap=%2526fmt%3D18&w=425&h=344]

BewBit:

Simple and yet fun to make arduino bot. Just follows the strongest light source. Using two LDRs, a modified pico and 1xAA and 2xAA battery packs, to give out 4,5 volts. Just enough to power theSN754410 and motors. But it gets around. It also includes a low-voltage alarm, which beeps when the voltage goes low.

Had a little accident, it drove over a carpet, or it came about 30cm into it and some funny gear-whining noise came 😛 A lot of hair in the gearbox, had to take it apart and clean it.

Future plans:

* Crash sensor, a small micro switch in front.
* Speaker, plays sound according to light source 😛
* Better code

[youtube=http://www.youtube.com/watch?v=kRqkj8t63pA;ap=%2526fmt%3D18&w=425&h=344]