Show Posts
Pages: [1] 2 3 ... 68
1  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 :
I hope I explained it well.
2  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").
3  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.
4  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 or 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.
5  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:
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 ?
6  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
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.
7  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.
8  Using Arduino / Motors, Mechanics, and Power / Re: Using 12V for Piezo buzzer issue on: September 13, 2013, 06:59:44 am
...driven anti-phase...
9  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.
10  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,
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.
11  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.
12  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.
13  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:

        pinMode(pin, OUTPUT);
        digitalWrite(pin, LOW);
        digitalWrite(pin, HIGH);
        pinMode(pin, INPUT);

But this works as well:

        // 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);
        pinMode(pin, INPUT_PULLUP);
        // The DHT11 will react in 20 - 40us.
        // Let's wait 50 to be sure it has responded.

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.
14  Using Arduino / Audio / Re: Why the Sparkfun Si4735 radio shield is all wrong on: June 08, 2013, 03:25:36 am
Surface solder points and surface scratchable/breakable traces are okay for me.

What about solder points for a single row header for an add-on board ?
The same way a shield is connected to an Arduino board.

The default Arduino 100kHz I2C bus is good enough. You are not going to stream audio via the I2C. Selecting a radio station is only done once, and reading RSSI a few times a second is all that is needed.

Are you going to use that tuned-antenna circuit (with the 18pF and 180nH) ? I hope not. I would like 100pF to the FM input with protection diodes, and perhaps an inductor 1u ... 4u7 as a filter for the SW.

I see many designs without a capacitor on the FM antenna, but I break too many FM modules by accidently touching the antenna with a DC voltage.
15  Using Arduino / Audio / Re: Why the Sparkfun Si4735 radio shield is all wrong on: June 07, 2013, 07:09:50 pm
I would like to tune to LW, AM, FM, SW from the Arduino.
So I want to be able to switch the antenna for FM and SW, and also switch between a AM ferrite and LW ferrite antenna. At least I want to be able to add that myself.
Pages: [1] 2 3 ... 68