Show Posts
Pages: [1] 2 3 ... 68
1  Using Arduino / Networking, Protocols, and Devices / Re: How to connect two MPU6050? on: August 06, 2014, 09:28:20 pm
Sparkfun uses solder to connect AD0 either to GND or VCC (3.3V).
https://www.sparkfun.com/products/11028

You can use the multiplexer for the I2C SDA signal. Is that what you want to do ?
2  Using Arduino / Networking, Protocols, and Devices / Re: How to connect two MPU6050? on: July 29, 2014, 10:22:05 am
Do you mean this new section : http://playground.arduino.cc/Main/MPU-6050#multiple
No one has tried it yet, as far as I know.

If you have a 5V Arduino, you have to adapt the selection signal to 3.3V for the 4 AD0 lines.
You can start your project with two MPU-6050 modules. Connect one AD0 line to GND, the other to 3.3V. Try to make a sketch that reads both.
3  Using Arduino / Sensors / Re: Easily Changing I2C Address Of MPU6050 Accelerometer + Gyroscope on: July 15, 2014, 01:58:29 pm
Yes, and if you want to use more then two if them. Set all but the one you address to low, or high and the one you want to address, the opposite.
steinie44, can you check this paragraph : http://playground.arduino.cc/Main/MPU-6050#multiple
I hope I explained it well.
4  Using Arduino / Programming Questions / Re: DS1302_clock_burst_write function problem on: July 15, 2014, 01:53:31 pm
You have two things mixed in your code.
You read the 'seconds', but don't convert it with bcd2bin. When you print the seconds, you print the raw register value.
Since the register value is bcd instead of binary, you get that jump from 9 to 16 (16 is actually '1' '0', meaning "ten").
5  Using Arduino / Programming Questions / Re: DS1302_clock_burst_write function problem on: July 13, 2014, 08:13:35 am
You forgot the ground wire ?
Seperate voltages should not be a problem as long as you have the grounds connected.

The DS1302 is strange chip. If you want to do something serious, use the DS1307.
6  Using Arduino / Programming Questions / Re: DS1302_clock_burst_write function problem on: July 11, 2014, 08:31:13 pm
The Halt or WriteProtect should not clear the data in the registers of the DS1302.
I have seen libraries that set the WriteProtect after writing every time. Just to be sure that it is not accidently written.
The Halt bit can be cleared just once or every time.

Perhaps your DS1302 is not working. If you bought a cheap module from Ebay, it can have many problems with voltage, battery or crystal. Or do you use a breadboard with bad connections ?
The RTC modules from Adafruit.com or Sparkfun.com do work.

You use a Arduino Nano with pins 6, 7, 8 ? Are you sure that you have the right pins ? Could you check the wiring once more ? Could you make a photo of it ?

You can do a test. Run an empty sketch, so the Arduino pins are not set yet. Measure the voltage of the three wires to the DS1302. Those three wires should be low, since the DS1302 has internal pull-down resistors.
7  Using Arduino / Programming Questions / Re: DS1302_clock_burst_write function problem on: July 10, 2014, 07:37:56 am
It has been a while since I wrote the page: http://playground.arduino.cc/Main/DS1302
I wrote it because the timing and use of the toggle was wrong in many other example code.
The code is okay, and I started to make a class around it, but never finished that.

Reading in a burst and writing in a burst is done with "uint8_t", those are bytes. I did that because the functions might be used in another way, they only read and write bytes in a burst.

As far as I understand, when you read from the DS1302, you are only reading zeros ?
It could be a hardware problem. Perhaps you are not communicating with the chip at all.
Could you try the normal read function "DS1302_read(int address)" to read a few bytes from the chip ?
8  Development / Other Software Development / Re: MultiSpeed I2C Scanner - 50,100,200,400 KHz. on: February 10, 2014, 01:01:39 am
I have added a link to your MultiSpeed I2C Scanner in http://playground.arduino.cc/Main/I2cScanner
See the "Interesting Links" section.
But I don't like that link to reply 4.

robtillaart, could you give your Multispeed I2C Scanner it's own place and adjust that link in the i2c_scanner ?
You could add it to the i2c_scanner page, but perhaps that is confusing for new users, that page is very simple now, and that is better for new users.
Another option to edit your first post, and make that the main article and for your scanner.
9  Using Arduino / Audio / Re: Why the Sparkfun Si4735 radio shield is all wrong on: November 21, 2013, 05:42:03 pm
I can't find it on Ebay.
It is okay if you post a (commercial) link to your Ebay item, after puttting so many work in it.
10  Using Arduino / Motors, Mechanics, and Power / Re: Using 12V for Piezo buzzer issue on: September 13, 2013, 06:59:44 am
...driven anti-phase...

http://playground.arduino.cc/Code/ToneAC
11  Using Arduino / Networking, Protocols, and Devices / Re: How to connect two MPU6050? on: September 03, 2013, 01:17:42 pm
Are you sure the INT is open collector and can be tied together ?
The 'dmp' sketch sets a default for the sample rate to be placed in the fifo. That is not ment for two devices, so perhaps you can't do all the calculations in the example. Don't add a delay in the sketch.

This all I can think of at the moment.
12  Development / Other Software Development / Re: yet another DHT11 Class for Arduino on: July 18, 2013, 10:21:16 pm
The same goes for the DHT lib, http://playground.arduino.cc/Main/DHTLib
The datasheet of the DHT22 tells: "...then MCU will pulls up and wait 20-40us for RHT03's response". The only way to wait for a response is to let the pull-up resistor make the signal high, and not by making the output high with the Arduino pin.
13  Development / Other Software Development / Re: yet another DHT11 Class for Arduino on: July 11, 2013, 05:19:55 pm
The point is: In my code I let the Arduino never output 5V. The high level of the signal is only done by the resistors. This also prevents a shortcut when the Arduino outputs 5V and the sensor tries to pull it to ground.
14  Using Arduino / Sensors / Re: Using GY-521 Accelerometer + Gyro on: July 10, 2013, 01:02:42 pm
I used the datasheet(s) as a framework to set up a basic sketch.
The idea is that if the code has been proven to be okay (it is), someone might use it to extend it and put it in a class.

So all the defines are the registers and the bits in the registers. I named them the same as in the datasheet(s).
You have to keep the datasheet next to it, to know what it is about.

But that is not all, there are also undocumented registers.
If you take a look at the code by Jeff Rowberg, you see he has more registers.
http://www.i2cdevlib.com/
https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050.h
15  Development / Other Software Development / Re: yet another DHT11 Class for Arduino on: June 12, 2013, 08:47:53 am
Rob Tillaart,

I don't know if I open an old issue, but I'm not convinced that the Arduino should set the line high. I read the datasheet over and over again, and I think it is not very clear but I read the datasheet as if the resistor pulls the line high.

The datasheet tells that the "DHT pulls up voltage...", but I assume it is an open collector output. So they mean the pull-up resistor. So when the datasheet tells that the "MCU pulls up voltage...", I think they mean it in the same way.


Your code:

Code:
        pinMode(pin, OUTPUT);
        digitalWrite(pin, LOW);
        delay(18);
        digitalWrite(pin, HIGH);
        delayMicroseconds(40);
        pinMode(pin, INPUT);

But this works as well:

Code:
        // The line should be set as INPUT_PULLUP.
        // Make it output to pull it down.
        // Wait at least 18ms, so let's wait 25ms
        pinMode(pin, OUTPUT);
        digitalWrite(pin, LOW);
        delay(25);
        pinMode(pin, INPUT_PULLUP);
        // The DHT11 will react in 20 - 40us.
        // Let's wait 50 to be sure it has responded.
        delayMicroseconds(50);

I use the resistor to make the pullup. So there will be no shortcut when the DHT11 pulls the line down.
I also wait 25ms, since 18ms is the minimum.
And I wait 50us, to be sure that the DHT11 has already pulled the line down.
Pages: [1] 2 3 ... 68