Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/dfmoore/notes.binarytree.org/textpattern/lib/txplib_db.php on line 14
Notes: Arduino

Notes

 
 

Mold Tracker: Notes

Temperature & Humidity Sensor

About this project

I think I may have some leaks in my apartment walls. I occasionally hear drips splashing down. I’d like to insert a sensor into my walls and measure how much humidity is kicking around, since mold needs water to grow. Appreciable levels of humidity will be a good indicator that something is wrong.

Since most of the Arduino community relies on website resources, I’m going to document my sunday afternoon project. I’ll be using the RHT03 sensor, available on SparkFun. I’ll be reporting data back to a MySQL database, and then using Processing to graph the data over time.

Background Information

Sensor Description
Datasheet
Arduino Library


Pinout looking directly at the part:
(1) (2) (3) (4)
Vdd Data Null Gnd

NB: Vdd and Vcc both mean the positive supply voltage. The naming convention comes from the type of IC or part it’s powering; VCC typically labeled for BJT’s, and VDD for FETs. What does this mean? It’s the + pin for your power supply, and GND is the -.

Vdd
Supply part with 3.3v ->6v DC. It’s okay to connect to the 5v pin on your arduino.

Data
We’ll be using a digital pin on the arduino that we can access with interrupts: Pin 7.
Connect a 4.7kohm resistor between VDD and the data pin. This is a pullup resistor and helps eliminate spurious ‘floating input’ data.

Null
This pin gets no connection. Just leave it be.

Gnd
Connect up to your arduino’s ground pin.

Outline

1. Getting data with the Arduino
2. Sending data to the computer
3. MySQL database queries
4. Graphing the data with Processing

Posted Jan 22, 12:27 PM by Dylan Moore ·


Bluetooth Image Light Writer



Bluetooth, a simple microcontroller, and an RGB LED. I stream image data over to the micro from Processing, so I can change the color in real time, or by a preset image. It pauses after each row, so I can move the writer to a new position if I’d like. I’ll post more when I get better working with it.

//Bluetooth LightWrite —Dylan Moore 2008. Thanks, arduino!

void setup()

{
    Serial.begin(9600);
}
int r,g,b;
int incomingByte = 0; 
void loop()

{
    //PWM:
    analogWrite(9,r); //R
    analogWrite(11,g); //G
    analogWrite(10,b); //B
    //Serial.println(“heartbeat”);
    if (Serial.available() > 0) 
        {
        incomingByte = Serial.read();
        if(incomingByte==255) //this will be the transition number while (Serial.available()<=0); 
        incomingByte = Serial.read();
        r=incomingByte;
        while(Serial.available()<=0);
        incomingByte = Serial.read(); g=incomingByte;
        while(Serial.available()<=0);
        incomingByte = Serial.read(); b=incomingByte;
        }
}

Posted Dec 9, 09:38 AM by Dylan Moore ·


I2C class notes

Want to get REAL i2c working with arduino?

read more

Posted Dec 2, 10:32 AM by Dylan Moore ·


Arduino I2C

First of all: Do not use Wiring. It, while well intentioned, does not do what it should. I have appropriated a chunk of code from the avrlibc library (http://www.nongnu.org/avr-libc/)

read more

Posted Nov 23, 07:02 AM by Dylan Moore ·