Hi!
i wonder if it is possible to connect a srf02 i2c sensor and a HH10D humidity i2c sensor to a arduino mega 2560.
Saw that there is only on scl and sda....
if so, how?
Hi!
i wonder if it is possible to connect a srf02 i2c sensor and a HH10D humidity i2c sensor to a arduino mega 2560.
Saw that there is only on scl and sda....
if so, how?
The i2c-bus is designed for a single master (the Arduino) and many slaves (all the devices and sensors).
You see, the master sends an address on the i2c-bus, and if an i2c slave detects its own address, it will react with an acknowlegde. All other slaves don't react.
These are your sensors:
http://www.robot-electronics.co.uk/htm/srf02techI2C.htm
The only problem is when two sensors have the same i2c-address. So that's why some chips can be set to a different i2c-address. But I think those two sensors have different i2c-addresses.
in the program is written that F-out for the HH10D is Digital pin 5 in the arduino Uno.....what pin is this on the mega2560?
tried the same pin but nothing happends.
do i have to have a level-shifter?
I have checked the datasheet, and the sensor puts out an frequency. I didn't know that.
Digital pin 5 is also 'T1', which is TIMER1 input. I don't know if that special function is used.
This was mentioned in this forum : https://spreadsheets.google.com/spreadsheet/pub?key=0AtfNMvfWhA_ccnRId19SNmVWTDE0MEtTOV9HOEdQa0E&gid=0
You probably don't need a level shifter : Arduino Playground - I2CBi-directionalLevelShifter
On the Arduino Mega, SDA is digital pin 20 and SCL is 21.
my wiring is correct.. i can start the sensitivity and offset program and that works fine,but i cant get the RH to work with mega, but the uno works fine.
Next time, please add links in your messages (just copy the url), now I have to find everything myself.
I think you use the FreqCounter library : http://interface.khm.de/index.php/lab/experiments/arduino-frequency-counter-library/
I mentioned in my previous post that T1 could be a problem. In the file FreqCounter.cpp, the T1 is used indeed for an external clock. On the Arduino Mega, the T1 is not available.
It is possible to use FreqCounter on the Arduino Mega, but you have to make some changes : Logger Shield and FreqCounter for the Mega 2560 | Kevin Kessler's Projects
But I don't know if that is for Arduino 1.0.